也许这是一个愚蠢的问题,但我无法实现答案中给出的关于目录中部分的解决方案https://tex.stackexchange.com/a/243530/79682:
\documentclass{beamer}
\title{Title}
\subtitle{Subtitle}
\author{Author Of Presentation}
\newcommand{\makepart}[1]{ % For convenience
\part{Title of part #1} \frame{\partpage}
\section{Section} \begin{frame} Section \end{frame}
\subsection{Subsection} \begin{frame} Subsection \end{frame}
\subsection{Subsection} \begin{frame} Subsection \end{frame}
\section{Section} \begin{frame} Section \end{frame}
}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
Part I:
\tableofcontents[part=1]
Part II:
\tableofcontents[part=2]
\end{frame}
\makepart{1}
\makepart{2}
\end{document}
有人能给我举一个包含以下内容的文档示例:a)两部分(“部分 foo”和“部分费用”),以及 b)每部分之间有不同的幻灯片(“部分 foo 介绍”和“费用介绍”)?
答案1
您可以(sub-)section in toc
像这样更改模板:
\documentclass{beamer}
\title{Title}
\subtitle{Subtitle}
\author{Author Of Presentation}
\newcommand{\makepart}[1]{ % For convenience
\part{Title of part #1} \frame{\partpage}
\section{Section} \begin{frame} Section \end{frame}
\subsection{Subsection} \begin{frame} Subsection \end{frame}
\subsection{Subsection} \begin{frame} Subsection \end{frame}
\section{Section} \begin{frame} Section \end{frame}
}
\newcounter{mypart}
\setbeamertemplate{section in toc}{\inserttocsection\ of part \themypart\par}
\setbeamertemplate{subsection in toc}{\leavevmode\leftskip=1.5em\inserttocsubsection\ of part \themypart\par}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
Part I: \addtocounter{mypart}{1}
\tableofcontents[part=1]
Part II: \addtocounter{mypart}{1}
\tableofcontents[part=2]
\end{frame}
\makepart{1}
\makepart{2}
\end{document}
或者它应该是自由格式的文本而不仅仅是数字:
\documentclass{beamer}
\title{Title}
\subtitle{Subtitle}
\author{Author Of Presentation}
\newcommand{\makepart}[1]{ % For convenience
\part{Title of part #1} \frame{\partpage}
\section{Section} \begin{frame} Section \end{frame}
\subsection{Subsection} \begin{frame} Subsection \end{frame}
\subsection{Subsection} \begin{frame} Subsection \end{frame}
\section{Section} \begin{frame} Section \end{frame}
}
\def\currentpart{}
\setbeamertemplate{section in toc}{\inserttocsection\ of \currentpart\par}
\setbeamertemplate{subsection in toc}{\leavevmode\leftskip=1.5em\inserttocsubsection\ of \currentpart\par}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
Part I: \def\currentpart{Part I}
\tableofcontents[part=1]
Part II: \def\currentpart{Part II}
\tableofcontents[part=2]
\end{frame}
\makepart{1}
\makepart{2}
\end{document}