7

在 LaTeX Beamer 中,幻灯片的总数包括在每个部分/小节之前仅包含目录的幻灯片,这不必要地增加了幻灯片的总数。有什么办法可以防止这种情况发生吗?

换句话说:我不希望包含目录的幻灯片有页码。

亲切的问候,mefiX

4

3 回答 3

25

添加行

\addtocounter{framenumber}{-1}

在您希望从总数中排除的每一帧上。

另请参阅Stackoverflow 上的另一个问题,这可能会为您提供进一步的帮助。

于 2010-09-06T13:31:50.070 回答
3

帧选项noframenumbering将排除某些帧增加帧号。我建议将它与该plain选项结合使用,否则看起来带有 toc 的帧将显示与之前的帧相同的帧号。

\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}
于 2019-02-27T23:56:29.427 回答
1

添加[plain]不显示页眉和页脚。最后,添加\addtocounter{framenumber}{-1} 不增加页码。

\AtBeginSection[]{%
    \begin{frame}[plain]
    \addtocounter{framenumber}{-1}
    \tableofcontents[currentsection]
    \end{frame}
} 
于 2021-06-04T22:20:33.360 回答