為了達到在每個章節前面顯示目錄的效果,基本的思想是:在每個章節開始的時候新建一個幀(frame),幀的內容是當前的章節。具體來說,使用的是如下代碼。
\AtBeginSection[]
{
\begin{frame}{主要內容}
\transfade%淡入淡出效果
\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide] %這幾個參數我也不知道該如何准確地解釋,反正它們最終的效果是突出顯示當前章節,而其它章節都進行了淡化處理
\addtocounter{framenumber}{-1} %目錄頁不計算頁碼
\end{frame}
}