我想一步步、一段接著一段地展示我的簡報的整個目錄。為此,我想我必須重新排列序言的這一部分,如下所示:\AtBeginSubsection[]
我該如何解決這個問題?
\documentclass{beamer}
\setbeamertemplate{section in toc}{\hspace*{1em}\inserttocsectionnumber.~\inserttocsection\par}
\setbeamertemplate{subsection in toc}{\hspace*{2em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}
\setbeamertemplate{subsubsection in toc}{\hspace*{3em}\inserttocsectionnumber.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber.~\inserttocsubsubsection\par}
\AtBeginSubsection[]
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
currentsection,
sectionstyle=show/show,
subsectionstyle=show/shaded/hide,
subsubsectionstyle=show/shaded,
]
\end{frame}
}
\begin{document}
\begin{frame}{outline}
\tableofcontents
\end{frame}
\section{Section title}
\begin{frame}{Section frame}
\end{frame}
\subsection{Subsection title}
\begin{frame}{Subsection frame}
\end{frame}
\subsubsection{Subsubsection title}
\begin{frame}{Subsubsection frame}
\end{frame}
\end{document}
答案1
在每個新部分中,目錄包含本部分之前並包括該部分的所有條目。
\AtBeginSection
{
\begin{frame}
\frametitle{Outline}
\tableofcontents[sections={1-\thesection}]
\end{frame}
}
整體程式碼
\documentclass{beamer}
\setbeamertemplate{section in toc}{\hspace*{1em}\inserttocsectionnumber.~\inserttocsection\par}
\setbeamertemplate{subsection in toc}{\hspace*{2em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}
\setbeamertemplate{subsubsection in toc}{\hspace*{3em}\inserttocsectionnumber.\inserttocsubsectionnumber.\inserttocsubsubsectionnumber.~\inserttocsubsubsection\par}
%\AtBeginSubsection[]
\AtBeginSection
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[
sections={1-\thesection},
% currentsection,
% sectionstyle=show/show,
% subsectionstyle=show/shaded/hide,
% subsubsectionstyle=show/shaded,
]
\end{frame}
}
\begin{document}
\begin{frame}{outline}
\tableofcontents
\end{frame}
\section{First section title}
\begin{frame}{Section frame}
\end{frame}
\subsection{Subsection title}
\begin{frame}{Subsection frame}
\end{frame}
\subsubsection{Subsubsection title}
\begin{frame}{Subsubsection frame}
\end{frame}
\section{Second section title}
\begin{frame}{Section frame}
\end{frame}
\subsection{Subsection title}
\begin{frame}{Subsection frame}
\end{frame}
\subsubsection{Subsubsection title}
\begin{frame}{Subsubsection frame}
\end{frame}
\section{Third section title}
\begin{frame}{Section frame}
\end{frame}
\subsection{Subsection title}
\begin{frame}{Subsection frame}
\end{frame}
\subsubsection{Subsubsection title}
\begin{frame}{Subsubsection frame}
\end{frame}
\end{document}