在投影仪手册,命令\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}
。
它的工作原理是我想要的。谢谢。 – basweber 2010-05-10 16:40:18