
在我的演講開始時,我想展示以下內容。在第一張投影片上,我想顯示僅包含部分的目錄。也就是說,小節應該是不可見的,但它們應該在那裡。然後,在接下來的幻燈片中,各個小節將依序混合在一起。
使用選項pausesubsections
的\tableofcontents
缺點是第一張投影片上僅顯示第一部分。使用該選項hidesubsections
會完全刪除這些小節,因此不可能將它們一個接一個地混合在一起。
enumerate
我嘗試使用anditemize
和 using設定假目錄\pause
,但間距與「真實」目錄不同。下面提供了 MWE。
\documentclass{beamer}
\begin{document}
\begin{frame}{Outline}
\tableofcontents[pausesubsections]
\end{frame}
\section{One}
\subsection{OneOne}
\begin{frame}
There is nothing here.
\end{frame}
\subsection{OneTwo}
\begin{frame}
There is nothing here.
\end{frame}
\section{Two}
\subsection{TwoOne}
\begin{frame}
There is nothing here.
\end{frame}
\subsection{TwoTwo}
\begin{frame}
There is nothing here.
\end{frame}
\end{document}
答案1
隱藏該小節,同時保留其空間,可以透過將它們著色為背景顏色來輕鬆完成。
\documentclass{beamer}
\begin{document}
{
\setbeamercolor{subsection in toc}{fg=bg}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
}
\begin{frame}{Outline}
\tableofcontents[pausesubsections]
\end{frame}
\section{One}
\subsection{OneOne}
\begin{frame}
There is nothing here.
\end{frame}
\subsection{OneTwo}
\begin{frame}
There is nothing here.
\end{frame}
\section{Two}
\subsection{TwoOne}
\begin{frame}
There is nothing here.
\end{frame}
\subsection{TwoTwo}
\begin{frame}
There is nothing here.
\end{frame}
\end{document}
答案2
也許你想寫這樣的程式碼。這適用於投影機自己的命令。
在第一張投影片上,您會看到僅包含部分標題的大綱。輸入各部分後,將顯示一個新的大綱,其中插入並突出顯示了各小節的標題。
\documentclass{beamer}
\mode<presentation>{%
%% At the begin of a section, insert a short outline
\AtBeginSection[]{%
\begin{frame}<beamer>%
\frametitle{Outline}
\tableofcontents[currentsection,subsectionstyle=show/shaded/hide]%
\end{frame}%
}%
%%
%% Same for Subsections
\AtBeginSubsection[]{%
\begin{frame}<beamer>%
\frametitle{Outline}
\tableofcontents[currentsection,subsectionstyle=show/shaded/hide]%
\end{frame}}%
}
\begin{document}
\begin{frame}{Outline}
\tableofcontents[currentsection,sectionstyle=show,hideothersubsections]
\end{frame}
\section{One}
\subsection{OneOne}
\begin{frame}
There is nothing here.
\end{frame}
\subsection{OneTwo}
\begin{frame}
There is nothing here.
\end{frame}
\section{Two}
\subsection{TwoOne}
\begin{frame}
There is nothing here.
\end{frame}
\subsection{TwoTwo}
\begin{frame}
There is nothing here.
\end{frame}
\end{document}