找到以下代码这里当我们使用从第二张幻灯片开始的自动编号框架标题时,更改该标题allowframebreaks
,但我不希望框架标题从第二张幻灯片开始。那么我该如何删除它们呢?
\documentclass{beamer}
\setbeamertemplate{frametitle continuation}[from second][(contd.)]
\begin{document}
\begin{frame}[allowframebreaks=0.8]{Frame Title}
.
\framebreak
.
\end{frame}
\end{document}
答案1
您可以向 frametitle 模板添加一个测试,测试它是否是第一张幻灯片:
\documentclass{beamer}
\setbeamertemplate{frametitle continuation}{}
\makeatletter
\setbeamertemplate{frametitle}{%
\ifnum\insertcontinuationcount=1
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[sep=0.3cm,left,wd=\the\@tempdima]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fteleft\endcsname\fi%
\strut\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...
\end{beamercolorbox}%
\fi}
\makeatother
\begin{document}
\begin{frame}[allowframebreaks=0.8]{Frame Title}
.
\framebreak
.
\end{frame}
\end{document}