乳胶投射器:防止在一次出现TOC

ckn*_*oll 8 latex beamer

通常我用

\AtBeginSection[]
{
  \begin{frame}<beamer>{Gliederung}
    \tableofcontents[currentsection]
  \end{frame}
}
Run Code Online (Sandbox Code Playgroud)

在我的序言中,在新部分开始之前实现该目标,显示TOC,并突出显示现在的起始部分.

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

我相信一定是可能的.

Loh*_*run 11

在beamer手册中,命令\AtBeginSection解释如下:

\AtBeginSection[special star text]{text}
Run Code Online (Sandbox Code Playgroud)

如果使用star命令声明特殊部分,\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}
}
Run Code Online (Sandbox Code Playgroud)

然后在文档中,只需将您的特殊部分声明为\toclesssection{My section without the toc}.