Remove the slide count from Beamer footer
Asked Answered
G

3

11

I would like to remove the slide count (e.g., SLIDE_NUMBER / TOTAL_SLIDES) from the footer (footline) of a Beamer presentation, without removing the footer entirely. I am using the Boadilla theme, which uses the infolines outer theme. In the beamerouterthemeinfolines.sty file, we find the following definition for the footline:

\defbeamertemplate*{footline}{infolines theme}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}

I need to essentially redefine this outer theme such that it doesn't have the \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} in it, or otherwise define a new outer theme that inherits everything else from the infolines theme. How can I do this?

Related question: How to Remove Footers of LaTeX Beamer Templates?

Gerdi answered 23/2, 2010 at 18:39 Comment(0)
P
8

If you like you can simply change the file beameroutertheminfolines.sty which might be not that of a good idea. So instead you simply take the code of the footline into your .tex file and delete the line for the frame numbers or, as i did, simply turn it into a comment. So you copy the exact part from beameroutertheminfolines.sty into your .tex file:

 \documentclass{beamer}
    %#comment out the Boadilla theme and uses only the header bar
    %\usetheme[]{Boadilla} 
    \usetheme[secheader]{Boadilla}

      %#make sure to change this part, since it is predefined
      %\defbeamertemplate*{footline}{infolines theme}
      \setbeamertemplate{footline}
        {
      \leavevmode%
      \hbox{%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
        \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}\insertshorttitle
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}

    %#turning the next line into a comment, erases the frame numbers
        %\insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 

      \end{beamercolorbox}}%
      \vskip0pt%
    }
Pneumatometer answered 23/2, 2010 at 19:57 Comment(2)
This solution works well, but make sure to swap the # to a % in the comment "#turning the next..." or this will not compile (the # breaks the compilation).Gerdi
This worked well for me and allowed me additional modification (keep slide number but remove "/ \inserttotalframenumber"Paulin
V
15

As beameroutertheminfolines.sty has changed since 2010, for now it's enough to put

\setbeamertemplate{page number in head/foot}{}

in preamble.

Vulgarism answered 8/10, 2018 at 22:0 Comment(0)
P
8

If you like you can simply change the file beameroutertheminfolines.sty which might be not that of a good idea. So instead you simply take the code of the footline into your .tex file and delete the line for the frame numbers or, as i did, simply turn it into a comment. So you copy the exact part from beameroutertheminfolines.sty into your .tex file:

 \documentclass{beamer}
    %#comment out the Boadilla theme and uses only the header bar
    %\usetheme[]{Boadilla} 
    \usetheme[secheader]{Boadilla}

      %#make sure to change this part, since it is predefined
      %\defbeamertemplate*{footline}{infolines theme}
      \setbeamertemplate{footline}
        {
      \leavevmode%
      \hbox{%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
        \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute)
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}\insertshorttitle
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
        \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}

    %#turning the next line into a comment, erases the frame numbers
        %\insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 

      \end{beamercolorbox}}%
      \vskip0pt%
    }
Pneumatometer answered 23/2, 2010 at 19:57 Comment(2)
This solution works well, but make sure to swap the # to a % in the comment "#turning the next..." or this will not compile (the # breaks the compilation).Gerdi
This worked well for me and allowed me additional modification (keep slide number but remove "/ \inserttotalframenumber"Paulin
G
-2
\setbeamertemplate{footline}{%
  \raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[10pt]{\scriptsize\insertframenumber}}}}

from https://latex.org/forum/viewtopic.php?t=6694

Granoff answered 10/5, 2021 at 8:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.