0

Maybe this is a stupid question, but I am unable to implement the solution regarding parts in table of contents, given in answer 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}

Can somebody give me an example of a document with: a) two parts ("part foo" and "part fee"), and b) different slides between each part ("Introduction of foo" and "Introduction of fee")?

hyriusen
  • 167

1 Answers1

2

You could change the (sub-)section in toc templates like this:

\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}

enter image description here


Or if it should be free-form text and not just a number:

\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}