通常我使用
\AtBeginSection[]
{
\begin{frame}<beamer>{Gliederung}
\tableofcontents[currentsection]
\end{frame}
}
我在导言中设置了一个功能,使得在新的章节开始之前,TOC(目录)会显示当前正在开始的章节。
但是,在我准备的演讲中,有一个特殊的章节,我不希望出现这种行为。前一个章节和这个章节之间的过渡应该是“静默”的。所有其他章节都应该像现在一样开始。
我相信这一定是可能的。
\AtBeginSection
的解释如下:\AtBeginSection[special star text]{text}
如果你使用星号命令\section*
声明特殊章节,那么章节目录将不会出现。这个解决方案是首先想到的,但可能会改变章节在文档中的表示方式。\RequirePackage{ifthen} % package required
\newboolean{sectiontoc}
\setboolean{sectiontoc}{true} % default to true
\AtBeginSection[]
{
\ifthenelse{\boolean{sectiontoc}}{
\begin{frame}<beamer>{Gliederung}
\tableofcontents[currentsection]
\end{frame}
}
}
\newcommand{\toclesssection}[1]{
\setboolean{sectiontoc}{false}
\section{#1}
\setboolean{sectiontoc}{true}
}
然后在文档中,只需将你的特殊部分声明为\toclesssection{My section without the toc}
。
\AtBeginSection
的内容:
最初的回答是修改\AtBeginSection
的内容:
\documentclass{beamer}
\AtBeginSection[]
{
\begin{frame}<beamer>{Gliederung}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\section{section with toc}
\begin{frame}
abc
\end{frame}
\begingroup
\AtBeginSection[]{}
\section{section without toc}
\begin{frame}
abc
\end{frame}
\endgroup
\section{section with toc}
\begin{frame}
abc
\end{frame}
\end{document}
\section*
会将整个章节从目录中移除,而我并不想要这样。第二部分使用布尔变量的方法完美解决了问题!谢谢! - snwflk