[Tex/LaTex] How to loop back to a slide after showing conditional slides in Beamer

beamerconditionals

I am working on a presentation that has conditional slides, using the formatting suggested here: Conditionally hidden slides in beamer

I would like to be able to continue with my presentation after the conditional slides using some sort of loop technique that does not require pressing a button at the end of the conditional slides.

Two options I have imagined would be possible that I do not know how to implement are 1) skipping the conditional slides entirely if the button is not clicked, else have the slides show in the middle of the presentation, or 2) at the end of the slides do some sort of "on click" command that links back.

1)

\documentclass{beamer}
\usetheme{Warsaw}
\title{The Title}
\author{The Author}
\date{\today}
\begin{document}
\section{One}
\begin{frame}
I suspect someone might ask about supplemental material
\hyperlink{supplemental}{\beamerbutton{here}}.
\end{frame}
\begin{frame}[label=supplemental] %(Hide these slides)
Supplemental content.
\end{frame}
\begin{frame}
Slides continue after supplemental material
\end{frame}
\end{document}

2)

\documentclass{beamer}
\usetheme{Warsaw}
\title{The Title}
\author{The Author}
\date{\today}
\begin{document}
\section{One}
\begin{frame}
I suspect someone might ask about supplemental material
\hyperlink{supplemental}{\beamerbutton{here}}.
\end{frame}
\begin{frame}[label=aftersupplemental]
Slides continue after supplemental material
\end{frame}
\appendix
\begin{frame}[label=supplemental] %(Hide these slides unless the button is clicked)
Supplemental content.
\end{frame} %(On "next slide click" go back to aftersupplemental frame)
\end{document}

Best Answer

For this, the PDF specification provides navigation nodes. However, this feature is only implementeded in Adobe Reader and it works only in Full Screen mode

The following example contains two supplementary slides.

To jump over them during a presentation,

  1. Adobe Reader must be used,
  2. which must be in Full Screen mode (Ctrl-L),
  3. the left and right mouse buttons, or the arrow buttons --> and <-- must be used to advance/move backwards between the slides. (PgDown, PgUp, arrow down and arrow up don't work properly.)

As requested, the supplementary slides are only shown when the link is clicked.

Code example for pdflatex:

\documentclass{beamer}
\usetheme{Warsaw}
\title{The Title}
\author{The Author}
\date{\today}
\begin{document}
\section{One}

\begin{frame}{Intro}
  \dots
\end{frame}

\pdfpageattr{
  /PresSteps <<
    /Next <<
      /NA <<
        /S/GoTo/D (aftersupplemental)
      >>
    >>
  >>
}
\begin{frame}[label=beforesupplemental]{The story begins}
I suspect someone might ask about supplemental material
\hyperlink{supplemental}{\beamerbutton{here}}.
\end{frame}
\pdfpageattr{}

%%%%%%%%%%%%%%% begin of hidden slides %%%%%%%%%%%%%
\begin{frame}[label=supplemental]{Extra information}
Something you don't really need to know.
\end{frame}

\begin{frame}{More extras}
Even more additional stuff.
\end{frame}
%%%%%%%%%%%%%%% end of hidden slides %%%%%%%%%%%%%

\pdfpageattr{
  /PresSteps <<
    /Prev <<
      /PA <<
        /S/GoTo/D (beforesupplemental)
      >>
    >>
  >>
}
\begin{frame}[label=aftersupplemental]{Regular information}
Slides continue after supplemental material
\end{frame}
\pdfpageattr{}

\begin{frame}{The End}
\dots
\end{frame}
\end{document}