乳胶打底机:防止一次出现TOC [英] latex beamer: prevent showing the TOC at one occasion
问题描述
我通常使用
\AtBeginSection[]
{
\begin{frame}<beamer>{Gliederung}
\tableofcontents[currentsection]
\end{frame}
}
在实现新章节开始前的序言中,
突出显示了现在开始的章节.
in my preamble to achieve that before a new sections starts the TOC is shown with the now starting section highlighted.
在谈话中,我实际上正在准备,我有一个特别的部分,我不想这样做.从上一节开始的过渡应该是静默的".所有其他部分都应该像现在一样开始.
In the talk I am actually preparing I have one special section for which I do not want this behavior. The transition from the section before should be "silent". All the other sections should start like they do now.
我确信这是有可能的.
推荐答案
在Beamer手册中,命令\AtBeginSection
的解释如下:
In the beamer manual, the command \AtBeginSection
is explained as follows:
\AtBeginSection[special star text]{text}
如果使用星号命令\section*
声明特殊部分,则不会显示部分内容表.这是第一个想到的解决方案,但可能会更改该部分在文档中的表示方式.
If you declare the special section with the star command \section*
, the section table of content will not appear. This solution is the first that comes to mind but may change the way the section is represented in the document.
另一种方法(实验性的,我从未测试过)是使用布尔参数.如果设置了布尔参数,则不打印代码.然后,您可以正常地声明您的部分,但可以在代码周围设置布尔值.
Another approach (experimental, I never tested it) would be to use a boolean parameter. If the boolean parameter is set, then the code is not printed. Then you declare your section normally but you set the boolean value around your code.
下面是应该完成技巧的代码示例:
Here is a code sample that should do the trick :
\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}
.
Then in the document, just declare your special section as \toclesssection{My section without the toc}
.
这篇关于乳胶打底机:防止一次出现TOC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!