2010-05-08 75 views
7

通常我使用乳胶投影仪:防止显示了在一个场合TOC

\AtBeginSection[] 
{ 
    \begin{frame}<beamer>{Gliederung} 
    \tableofcontents[currentsection] 
    \end{frame} 
} 

在我的序言,以实现一个新的章节开始TOC显示与现在开始部分突出了。

在谈话中,我实际上正在准备我有一个特殊的部分,我不希望这种行为。从以前的部分过渡应该是“沉默”。所有其他部分应该像现在这样开始。

我相信这一定是可能的。

回答

9

在投影仪手册,命令\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}

+0

它的工作原理是我想要的。谢谢。 – basweber 2010-05-10 16:40:18