使用以下代码,如何设置 TOC 以在单独的页面上显示每个部分。
整个目录页应出现在文档的开头。
\documentclass{beamer}
\usepackage{verbatim}
\setbeamertemplate{navigation symbols}{}
% == begin Section/Subsection pages control ============
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\newcommand{\subsubsectionpage}{\usebeamertemplate{subsubsection page}}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}{\leavevmode\leftskip=0em\rlap{\hskip-2em\textcolor{violet}{\inserttocsectionnumber.\inserttocsubsectionnumber.}}\textcolor{violet}\inserttocsubsection\par}
\setbeamertemplate{subsubsection in toc}{\leavevmode\leftskip=2.0em\textcolor{purple}\inserttocsubsubsection\par}
\setbeamertemplate{section page}
{
\begingroup
\begin{beamercolorbox}[sep=10pt,center,rounded=true,shadow=true]{section title}
\usebeamerfont{section title}\thesection-~\insertsection\par
\end{beamercolorbox}
\endgroup
}
\setbeamertemplate{subsection page}
{
\begingroup
\begin{beamercolorbox}[sep=2pt,center,rounded=true,shadow=true]{section title}
\usebeamerfont{section title}\thesection-~\insertsection\par
\end{beamercolorbox}
\vspace*{-1.pt}
\begin{beamercolorbox}[sep=6pt,center,rounded=true,shadow=true]{subsection title}
\usebeamerfont{subsection title}\thesection.\thesubsection.~\insertsubsection\par
\end{beamercolorbox}
\endgroup
}
\setbeamertemplate{subsubsection page}
{%
\begingroup
\begin{beamercolorbox}[sep=6pt,center,rounded=true,shadow=true]{subsubsection title}%
\usebeamerfont{subsubsection title}\thesection.\thesubsection.\thesubsubsection.~\insertsubsubsection\par
\end{beamercolorbox}
\endgroup
}
%= begin defining Section/Subsection title pages
\setbeamercolor{section title}{bg=blue!40}
\setbeamercolor{subsection title}{bg=blue!20}
\setbeamercolor{subsubsection title}{bg=blue!20}
\setbeamerfont{section title}{size=\Large,series=\bfseries}
\setbeamerfont{subsection title}{size=\large,series=\bfseries}
\setbeamerfont{subsubsection title}{size=\large,series=\bfseries}
%= end defining Section/Subsection title pages
% == end Section/Subsection pages control ============
\begin{document}
\begin{frame}[t,allowframebreaks]
\frametitle{Table of Contents}
\tableofcontents
\end{frame}
\section{Section1}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\section{Section2}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\section{Section3}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\section{Section4}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\end{document}
而不是默认的:
答案1
嗯,以下内容不能 100% 满足您的要求,但也许足够了?
无论如何,MWE 都会part
对每个部分使用该选项:
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Table of Contents I}
\tableofcontents[part=1]
\end{frame}
\begin{frame}[t,allowframebreaks]
\frametitle{Table of Contents II}
\tableofcontents[part=2]
\end{frame}
\part{A}
\section{Section1}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\part{B}
\section{Section2}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\section{Section3}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\section{Section4}
\frame{\sectionpage}
\subsection{SubSection1}
\frame{\subsectionpage}
\subsection{SubSection2}
\frame{\subsectionpage}
\subsection{SubSection3}
\frame{\subsectionpage}
\subsection{SubSection4}
\frame{\subsectionpage}
\subsection{SubSection5}
\frame{\subsectionpage}
\subsection{SubSection6}
\frame{\subsectionpage}
\end{document}