如何在 Beamer 演示文稿中逐步显示整个目录?

如何在 Beamer 演示文稿中逐步显示整个目录?

我想逐步、逐节地展示我演示文稿的整个目录。为此,我认为我必须重新排列序言的这一部分,就像我的 MWE 中显示的那样:\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}

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

相关内容