Increase page numbers in LaTeX Beamer
Asked Answered
J

3

10

in LaTeX Beamer, the total number of slides includes those that only contain the table of contents before each section/subsection, which increases the total number of slides unnecessarily. Is there any way to prevent this?

In other words: I don't want slides containing the TOC to have page numbers.

Kind regards, mefiX

Jonell answered 3/9, 2010 at 11:46 Comment(1)
there is a special SE site for LaTeX tex.stackexchange.comTabbitha
H
27

Add the line

\addtocounter{framenumber}{-1}

on each frame you wish to exclude from total count.

See also this other Question here on Stackoverflow, which might assist you further.

Haematoma answered 6/9, 2010 at 13:31 Comment(1)
This does not exclude from total count. This only decrease the counter. It has some bad side effects: With \usepackage{appendixbeamerpackage}, the counter on the first slide is 0 (while it should not appear), the counter on my last slide prints 12/13 and appendix question slide is 1/13.Friary
L
5

The frame option noframenumbering will exclude certain frames from increasing the framenumber. I would recommend to use it in combination with the plain option, otherwise it might look that the frames with the toc will show the same frame number as the frame before.

\documentclass{beamer}

\setbeamertemplate{footline}[frame number]

\AtBeginSection[]{%
    \begin{frame}[noframenumbering,plain]
    \tableofcontents[currentsection]
    \end{frame}
}

\begin{document}

\section{title}
\begin{frame}
\end{frame}

\end{document}
Loseff answered 27/2, 2019 at 23:56 Comment(0)
L
1

Add [plain] to not display the header and the footer. Finally, add \addtocounter{framenumber}{-1} to not increment page number.

\AtBeginSection[]{%
    \begin{frame}[plain]
    \addtocounter{framenumber}{-1}
    \tableofcontents[currentsection]
    \end{frame}
} 
Liberty answered 4/6, 2021 at 22:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.