[Tex/LaTex] Adding clickable table of contents for part of Beamer document

beamerlinkstable of contents

I have a presentation with many 'backup' slides for Q&A.

I want a way to easily navigate to any desired backup slide via a table of contents just for the backup slides.

After the main body of the presentation, but before the backup slides, I want a table of contents, or a screen with thumbnails of all the backup slides.

And on each backup slide I'd like a link back to the table of contents slide.

How can I implement these two tasks?

Best Answer

I always use \appendix to separate the main presentation from the backup slides.

A (clickable) table of contents is easily created with the standard command \tableofcontents. It will list all \sections after \appendix. (No fancy stuff as thumbnails.)

To create a link to the slide listing the table of contents, use a hyperlink, \hyperlink{<label>}{<name>}. In the MWE below, I've added this in a new environment called appendixframe.

\documentclass{beamer}

% appendixframe includes a hyperlink to the frame labeled ‘questions’.
% The ‘\vskip’ commands are only included so that this button always
% appears on the bottom of the frame.
\newenvironment{appendixframe}[1]
  {\begin{frame}[environment=appendixframe]\frametitle{#1}}
  {\vskip0ptplus1filll%
    \hyperlink{questions}{\beamerreturnbutton{return}}%
    \vskip2ex\end{frame}}

\begin{document}
\section{Main presentation}
\begin{frame}{Frame in Main}
  Main part of the presentation.
\end{frame}

\appendix
\begin{frame}[label=questions]{Questions}
  \tableofcontents
\end{frame}

\section{How To Insert a Table of Contents?}
\begin{appendixframe}{A Table of Contents?}
  Use \texttt{\string\tableofcontents}!
\end{appendixframe}

\section{How To Link Back to the TOC?}
\begin{appendixframe}{Links Back}
  Use a \texttt{\string\hyperlink}!
\end{appendixframe}
\end{document}