在單一部分的開頭隱藏目錄,同時保留部分編號

在單一部分的開頭隱藏目錄,同時保留部分編號

我通常使用以下內容在每個部分的開頭顯示目錄:

 \AtBeginSection[]{%
 \begin{frame}
     \tableofcontents[currentsection, subsectionstyle=show/show/hide]
 \end{frame}
 }

因此,如果我使用\section*{title},那麼該部分的開頭就沒有目錄。但是,我希望章節標題出現在目錄中,並且我希望對該章節進行編號。

答案1

您可以在章節開頭暫時切換自動目錄:

\documentclass{beamer}

 \AtBeginSection[]{%
 \begin{frame}
     \tableofcontents[currentsection, subsectionstyle=show/show/hide]
 \end{frame}
 }
\begin{document}

\section{section with toc}
\begin{frame}
content...
\end{frame}

{
\AtBeginSection[]{}
\section{section withou toc}
\begin{frame}
content...
\end{frame}
}

\section{section with toc}
\begin{frame}
content...
\end{frame}

\end{document}

相關內容