我怎样才能在 Beamer 中为初始幻灯片编号,而让最后一张幻灯片不编号?我尝试指定最后一张幻灯片的样式为普通样式,因此不编号。但是,最后一张幻灯片的页码仍然显示,只是向下移动了。问题出在哪里?
梅威瑟:
\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}
答案1
尝试一下这个代码。
\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}
帧的编号为帧号/总帧数。
如果你只想要帧号替换
\setbeamertemplate{footline}[frame number]
经过
\setbeamertemplate{footline}{% add only the frame number
\hfill%
\setbeamertemplate{page number in head/foot}[framenumber]%
\usebeamertemplate*{page number in head/foot}\kern1em\vskip3pt%
}
如果希望第三张幻灯片以数字 2 而不是 3 开头,请添加到第二帧
\addtocounter{framenumber}{-1}