在LaTeX Beamer中增加页面编号

9

在LaTeX Beamer中,幻灯片的总数包括每个部分/子部分之前只包含目录的幻灯片,这会不必要地增加幻灯片的总数。有没有办法防止这种情况发生?

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

此致, mefiX


1
有一个专门的SE网站用于LaTeX http://tex.stackexchange.com - Lipis
3个回答

27

添加这行代码

\addtocounter{framenumber}{-1}

如果您想要从总计中排除每个帧,请参考这篇Stackoverflow上的其他问题,可能会进一步帮助您。


这不会从总数中排除。这只是减少计数器。 它有一些不好的副作用: 使用\usepackage{appendixbeamerpackage},第一张幻灯片上的计数器为0(而不应该出现),我的最后一张幻灯片上的计数器打印为12/13,附录问题幻灯片为1/13。 - Dimitri Lesnoff

4

框架选项 noframenumbering 将排除某些帧从增加帧编号。我建议将其与 plain 选项结合使用,否则它可能会看起来目录中的帧将显示与前一帧相同的帧号。

\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}

1
[plain]添加到不显示标题和页脚。最后,添加\addtocounter{framenumber}{-1}以不增加页面编号。
\AtBeginSection[]{%
    \begin{frame}[plain]
    \addtocounter{framenumber}{-1}
    \tableofcontents[currentsection]
    \end{frame}
} 

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接