10

通常我使用

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

在我的序言中,为了在新的部分开始之前实现这一点,TOC 会突出显示现在开始的部分。

在我实际上正在准备的演讲中,我有一个特殊的部分我不想要这种行为。从之前的部分过渡应该是“无声的”。所有其他部分应该像现在一样开始。

我相信这一定是可能的。

4

2 回答 2

16

在 beamer 手册中,该命令\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}.

于 2010-05-10T08:32:53.743 回答
1

另一种方法是临时更改 的内容\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}
于 2019-02-27T14:37:19.833 回答