我正在尝试编写/编辑我自己的beamer
模板,该模板当前定义默认框架以显示框架标题,并在其上方显示幻灯片在演示文稿中出现的部分标题,即
%% beamerouterthemeMyTheme.sty
...
% Position the frame title so that it would get into the headline
\setbeamertemplate{frametitle}{
\vspace{\dimPlaceTitleInHeader} %% Some predefined dimension elsewhere
\usebeamerfont{section title}\color{black!20}%
\ifnumcomp{\thesection}{=}{0}{%
\par%
}
{%
\insertsection\par
}
\vspace{-1pt}\usebeamerfont{frametitle}%
%% I do not understand why if I remove this the title does not appear
\ifdefstring{\bWhiteFrame}{true}{\color{white}}{\color{black}}% %% \bWhiteFrame is just some boolean variable that in my context is always false.
\insertframetitle
\vspace{\dimAfterFrameTitleOffset}
}
现在,在我的演示序言中,我使用以下代码,让目录出现在每个\section
定义之后:
\RequirePackage{ifthen} % package required
\newboolean{sectiontoc}
\setboolean{sectiontoc}{true} % default to true
\AtBeginSection[]{% %% Do nothing for starred sections
\ifthenelse{\boolean{sectiontoc}}{%
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection]
\end{frame}
}
}
问题是,这样每次显示目录时,它也会显示在顶部section title
(重复currentsection
目录中显示的),我想避免这种情况,只显示带有标题的目录Outline
,但保留演示文稿中所有其他框架的默认样式(即部分标题+标题)。
我不知道是否以及如何能够实现这一目标。