質問

通常、私は使用します

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

新しいセクションが開始される前にそれを達成するための私の前文で、TOCは現在開始セクションが強調表示されて表示されます。

講演では、実際に準備しているため、この動作を望んでいない特別なセクションが1つあります。以前のセクションからの移行は「サイレント」でなければなりません。他のすべてのセクションは、今のように開始する必要があります。

私はそれが可能であるに違いないと確信しています。

役に立ちましたか?

解決

ビーマーマニュアルでは、コマンド \AtBeginSection 次のように説明されています:

\AtBeginSection[special star text]{text}

Star Commandで特別なセクションを宣言する場合 \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}.

他のヒント

別のアプローチは、一時的にコンテンツを変更することです \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}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top