0

How can I number the initial slides in beamer, while leaving the very last one unnumbered? I tried specifying that I want the last slide's style to be plain and thus without numbering. However, the page number of this last slide still appears, just shifted downwards. What's the problem?

MWE:

\documentclass{beamer}
\usepackage[english]{babel}

\beamertemplatenavigationsymbolsempty

\addtobeamertemplate{navigation symbols}{}{\insertframenumber}

\begin{document}
    \begin{frame}
        This slide is numbered, as it should be.
    \end{frame}

    \begin{frame}[plain]
        This slide is also numbered, but I don't want it to be.
    \end{frame}
\end{document}
5
  • What you're trying to obtain is the empty page style, no the plain one.
    – Bernard
    Apr 28, 2022 at 9:21
  • @Bernard This leads to the same problem.
    – Zuy
    Apr 28, 2022 at 15:27
  • \addtobeamertemplate{navigation symbols}{}{} makes the number disappear. Apr 28, 2022 at 19:01
  • @SimonDispa What if I want the first slides to be numbered, but the last one not?
    – Zuy
    Apr 28, 2022 at 19:45
  • Please expand you code to multiple slides an explain in your question how you want them numbered. Apr 28, 2022 at 20:55

1 Answer 1

1

Try this code.

\documentclass{beamer}
\beamertemplatenavigationsymbolsempty

%\setbeamertemplate{footline}{% add only the frame number
%   \hfill%
%   \setbeamertemplate{page number in head/foot}[framenumber]%
%   \usebeamertemplate*{page number in head/foot}\kern1em\vskip3pt%
%}

\setbeamertemplate{footline}[frame number]% frame number /total frames

\begin{document}

    \begin{frame}
        This slide 1 is numbered, as it should be.
    \end{frame}
    
    \begin{frame}[plain]
    %   \addtocounter{framenumber}{-1} % OPTIONAL start next frame with #2
        This slide 2 is also numbered, but I don't want it to be.
        
        (Not anymore)   
    \end{frame}

    \begin{frame}
        This slide 3 is numbered, as it should be.
    \end{frame}

    \begin{frame}[plain]    
        This slide 4 is the last one and it is also not numbered.
    \end{frame}
    
\end{document}

b

c

Frames are numbered as frame number /total number of frames.

If you want only the frame number replace

\setbeamertemplate{footline}[frame number]

by

\setbeamertemplate{footline}{% add only the frame number
        \hfill%
        \setbeamertemplate{page number in head/foot}[framenumber]%
        \usebeamertemplate*{page number in head/foot}\kern1em\vskip3pt%
    }

If you want the third slide start with the number 2 instead of 3 add to the second frame

\addtocounter{framenumber}{-1}
1
  • Perfect, thank you.
    – Zuy
    Apr 29, 2022 at 4:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .