[Tex/LaTex] Conditionally hidden slides in beamer

beamerconditionalshyperref

When creating a presentation, I sometimes create extra slides that contain additional information, a more thorough explanation, or an extra plot pertaining to certain parts of my talk. These extra slides are usually in a separate PDF and the document is usually only opened if an audience member asks a question or requests information and one of my extra slides supplements my response nicely.

I am wondering if it's possible to insert these slides into my presentation with the two following options:

  1. The extra slides are skipped when progressing through the presentation unless
  2. I click on a hyperlink placed somewhere on the slide. If clicked, we traverse to the extra slide. From this slide, continuing to the 'next' slide would send us back to the slide that got us here originally.

The above can be accomplished with two (or more) PDFs (one with the presentation, one — or more — with the supplemental slides) via hyperref but ideally I would like to only have one document.

I am not familiar enough with ifthen to know if it can be done with that package.

Any help would be much appreciated.

Best Answer

See Beamer manual sections 10.7 and 11. Basically, you can use an appendix to make a set of slides after your main presentation (they don't show up in the main ToC). And you can use \hyperlink commands to jump to particular slides (or overlays of slides, even). Short example:

\documentclass{beamer}
\usetheme{Warsaw}
\title{The Title}
\author{The Author}
\date{\today}
\begin{document}
\section{One}
\begin{frame}[label=main]
I suspect someone might ask about supplemental material
\hyperlink{supplemental}{\beamerbutton{here}}.
\end{frame}
\appendix
\section{More}
\begin{frame}[label=supplemental]
Supplemental content.
Back to \hyperlink{main}{\beamerbutton{main}}.
\end{frame}
\end{document}

If you need to exclude the appendix slides from the slide counter, see this question.

Related Question