使用具有維爾茨堡外部和倒角內部主題的投影儀,我創建了一個包含 100 多張幻燈片的長簡報。 9張投影片後的幀數未正確對齊,總幀數是可見的,但當前幀數位於其上方,我沒有找到正確對齊它的方法。
在最後 30 幀的 MWE 中嘗試了這裡的解決方案:將頁尾文字新增至 Beamer 中的所有投影片但這刪除了原來的腳線背景(顏色主題)。如果取消註釋,則\usecolortheme{shark}
當前幀號消失的原因會更明顯。
\documentclass{beamer}
\mode<beamer>{
\useoutertheme[glossy]{wuerzburg}
\useinnertheme[shadow,outline]{chamfered}
\usecolortheme{shark}
}
\setbeamertemplate{navigation symbols}{}
\usepackage{blindtext}
\begin{document}
\begin{frame}[allowframebreaks]{Original footline}
\blindtext[100]
\end{frame}
\setbeamertemplate{footline}[text line]{%
\parbox{\linewidth}{\vspace*{-8pt}some text\hfill\insertframenumber/\inserttotalframenumber}
}
\begin{frame}[allowframebreaks]{Different footline}
\blindtext[50]
\end{frame}
\end{document}
答案1
假設你使用https://github.com/pmagwene/beamer-theme-collection/blob/master/beamerouterthemewuerzburg.sty您可以像這樣更改腳線定義:
\documentclass{beamer}
\useoutertheme[glossy]{wuerzburg}
\useinnertheme[shadow,outline]{chamfered}
\usecolortheme{shark}
\setbeamertemplate{navigation symbols}{}
\usepackage{blindtext}
\makeatletter
\setbeamertemplate{footline}{%
\ifbeamer@wuerzburg@nofootline
\else
\leavevmode%
\pgfuseshading{beamer@bottomshade}
\ifbeamer@wuerzburg@glossy%
\pgfuseshading{beamer@headfootshade}
\vskip-3.5ex
\hbox{%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=2.25ex,dp=1ex,left,ignorebg]{headfoot}%
\usebeamerfont{author in head/foot}%
\hspace*{3.5ex}%
\insertshortauthor{}%
\beamerwuerzburgthemeadddelimiter{\insertshortinstitute}%
\beamerwuerzburgthemeadddelimiter{\insertshortdate}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,right,ignorebg]{headfoot}%
\usebeamerfont{date in head/foot}%
\insertframenumber{} / \if\thelastframecounter0\inserttotalframenumber\else\thelastframecounter\fi \hspace*{3.5ex}
\end{beamercolorbox}}
\else%
\hbox{%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=2.25ex,dp=1ex,left]{headfoot}%
\usebeamerfont{author in head/foot}%
\hspace*{3.5ex}%
\insertshortauthor{}%
\beamerwuerzburgthemeadddelimiter{\insertshortinstitute}%
\beamerwuerzburgthemeadddelimiter{\insertshortdate}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,right]{headfoot}%
\usebeamerfont{date in head/foot}%
\insertframenumber{} / \if\thelastframecounter0\inserttotalframenumber\else\thelastframecounter\fi \hspace*{3.5ex}
\end{beamercolorbox}}
\fi%
\vskip0pt%
\fi
}
\makeatother
\begin{document}
\begin{frame}[allowframebreaks]{Original footline}
\blindtext[100]
\end{frame}
\end{document}