2

I have some back-up slides at the end of my presentation, which are accessed by means of hyperlinks. For this reason, I would like to "stop" the scrolling of the slides (done by clicking PageUp / Page Down or rotating the mouse wheel ) at my last "actual" slide, preventig me to show the accessory slides by mistake during the presentation. Is this possible somehow ? I am not sure whether I made myself clear or not ...

MWE:

\documentclass{beamer}
\begin{document}

\begin{frame}[label=mainBody]
txt 1

\hyperlink{accessorySlide}{\beamerbutton{jump to accessory slide}}
\end{frame}

\begin{frame}
txt 2

\end{frame}

\begin{frame}
Thank you
\end{frame}

\begin{frame}[label=accessorySlide]
accessory information 
\hyperlink{mainBody}{\beamerbutton{jump back to main body}}
\end{frame}


\end{document}

I'd like, when in presentation mode, not to be possible to scroll beyond the "thank you" slide

15
  • 1
    A suggestion: a couple of copies of the thank you slide to absorb a misclick or two
    – Chris H
    Commented Jan 13, 2017 at 15:37
  • Thought that ... yet if a "clean" solution is available it would be preferable
    – dario
    Commented Jan 13, 2017 at 15:38
  • Section 5.1.4 of the beamer manual implies a clean solution. Note that \againframe gives a way to repeat a frame without copy-pasting
    – Chris H
    Commented Jan 13, 2017 at 15:46
  • 1
    I vote for reopening the question. The linked duplicate is more about automated looping for animation purposes. Here it was asked just to prevent the viewer from going past the final official slide. I have a neat solution too I would like to post here.
    – AlexG
    Commented Jan 13, 2017 at 16:34
  • 1
    I honestly don't see how the question can be considered answered. I've tried the solutions proposed in the other question and they don't work ...
    – dario
    Commented Jan 13, 2017 at 16:39

2 Answers 2

1

This is based on the answer to the previous question about looping a final slide or two. Instead it flips back to the final slide when a copy of that slide is advanced to. I've only tested it in Adobe reader X for Windows so far (in presentation mode).

\documentclass{beamer}

\begin{document}
\begin{frame}
    Title
\end{frame}
\begin{frame}
    Content
\end{frame}
\begin{frame}[label=TheEnd]
    Thank you
\end{frame}

\begingroup
\edef\x{\endgroup
  \pdfpageattr{
    \the\pdfpageattr /Dur 0.2
    /AA <<
      /O <<
        /S/JavaScript /JS(
          var retVal=app.setTimeOut( "this.pageNum--;", 10);
        )
      >>
    >>
  }%
}%
\x
\againframe{TheEnd} %auto-advancing frames


\begin{frame}
    Backup
\end{frame}
\end{document}
12
  • 1
    Formatting is stuffed up by the double-right-pointy-bracket. It's not really fixable from my phone but I'll edit when I'm on a computer.
    – Chris H
    Commented Jan 13, 2017 at 17:24
  • 1
    I just tried to fix the formatting. Can you please check if everything is ok? Commented Jan 13, 2017 at 17:27
  • This does not work to me: scrolling twice when in "TheEnd" frame it moves to the backup slide
    – dario
    Commented Jan 13, 2017 at 17:39
  • @dario what are you using to view it, and is javascript enabled? I'm now on a machine that doesn't have adobe reader (evince instead) and the javascript is ignored. If I had adobe reader I'd test reducing the "10" in the line with setTimeOut, I'd also test reducing /Dur 0.2. It might be possible to find a sweet spot where a double-tap gets you into the backup slides easily but you don't accidentally press twice too easily.
    – Chris H
    Commented Jan 13, 2017 at 17:46
  • using Adobe Reader XI ... JS seems to be activated
    – dario
    Commented Jan 13, 2017 at 17:49
1

This can be achieved using the sub-page navigation feature of the PDF specification. It works in Acrobat Reader DC and requires the Full Screen (Ctrl-L) mode.

Note that the backlinks (GoBack action) from the auxiliary slides are not functional in A-Readers X and XI. GoBack worked in AR-9 and is back in AR-DC, fortunately.

\documentclass{beamer}
\hypersetup{colorlinks}

\begin{document}

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

\begin{frame}{Slide 1}
  Read more \hyperlink{aux1}{here}.

  Read even more \hyperlink{aux2}{here}.
\end{frame}

\begin{frame}{Slide 2}
  Read more \hyperlink{aux2}{here}.

  Read even more \hyperlink{aux2}{here}.
\end{frame}

\begin{frame}{Slide 3}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% In FULL SCREEN mode of Acrobat Reader this code
% doesn't allow the viewer to go past the "Summary" page.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\edef\pdfpageattrSaved{{\the\pdfpageattr}}
\begingroup
\edef\x{\endgroup
  \pdfpageattr{%
    \the\pdfpageattr
    /PresSteps <<
      /NA<</S/Named/N/NOP>> %no-op on page open
      /Next<<
        /NA<</S/GoTo/D (slideSummary)>>
      >>
    >>
  }%
}%
\x
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Summary}\hypertarget{slideSummary}{}
  Thank you for your attention!
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% reset no normal behaviour
\expandafter\pdfpageattr\pdfpageattrSaved
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}{Aux slide 1}\hypertarget{aux1}{}
  Go \Acrobatmenu{GoBack}{back}.
\end{frame}

\begin{frame}{Aux slide 2}\hypertarget{aux2}{}
  Go \Acrobatmenu{GoBack}{back}.
\end{frame}

\end{document}
11
  • This does not work to me ... the presentation scroll from "slideSummary" to "Aux slide 1" and "Aux slide 2" ...
    – dario
    Commented Jan 13, 2017 at 17:27
  • @dario What pdf viewer are you using? I tested it with adobe and I don't scroll to the backup slide. Commented Jan 13, 2017 at 17:47
  • I'm using Adobe Reader XI
    – dario
    Commented Jan 13, 2017 at 17:52
  • @dario I have also AR XI. Commented Jan 13, 2017 at 18:05
  • Guys, don't know what to tell you ... I just copy the code, compile it, open the PDF and it scrolls through ALL the slides
    – dario
    Commented Jan 13, 2017 at 18:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .