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

dario
  • 303
  • 1
    A suggestion: a couple of copies of the thank you slide to absorb a misclick or two – Chris H Jan 13 '17 at 15:37
  • Thought that ... yet if a "clean" solution is available it would be preferable – dario Jan 13 '17 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 Jan 13 '17 at 15:46
  • yep, you can define an \appendix, which can be managed differently respect to the main body, but could not find a way to stop the scrolling at the end of the main body – dario Jan 13 '17 at 16:00
  • Same here -- my reading of the manual suggested that you should be able to stop scrolling but no. – Chris H Jan 13 '17 at 16:03
  • and \againframe inserts another page into the pdf rather than looping using a hyperlink – Chris H Jan 13 '17 at 16:18
  • It turns out that this has already been asked -- I only found the original when I tried to follow the same approach myself – Chris H Jan 13 '17 at 16:18
  • Having voted to close, the modifications required to make the duplicate work here were a little more than I thought. But I have a working answer (@samcarter) – Chris H Jan 13 '17 at 16:25
  • 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 Jan 13 '17 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 Jan 13 '17 at 16:39
  • Wait for the question to be reopened. Hope this happens soon. – AlexG Jan 13 '17 at 16:43
  • @samcarter : Would you please reopen this question? – AlexG Jan 13 '17 at 16:45
  • @ChrisH the question is open again – samcarter_is_at_topanswers.xyz Jan 13 '17 at 17:05
  • @samcarter thanks. My answer is on my Dropbox so I'll see if I can paste it. It's very heavily based on the near duplicate but with subtleties I couldn't explain in a comment (@ dario) – Chris H Jan 13 '17 at 17:20

2 Answers2

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}
AlexG
  • 54,894
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}
Chris H
  • 8,705
  • 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 Jan 13 '17 at 17:24
  • 1
    I just tried to fix the formatting. Can you please check if everything is ok? – samcarter_is_at_topanswers.xyz Jan 13 '17 at 17:27
  • This does not work to me: scrolling twice when in "TheEnd" frame it moves to the backup slide – dario Jan 13 '17 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 Jan 13 '17 at 17:46
  • using Adobe Reader XI ... JS seems to be activated – dario Jan 13 '17 at 17:49
  • I wonder if they've done something to presentation mode between X and XI then. I've got a feeling about a presentation mode and a separate fullscreen mode. How do you launch it? I use ctrl+L. – Chris H Jan 13 '17 at 17:51
  • presentation mode (ctrl+L) – dario Jan 13 '17 at 17:54
  • @ChrisH Works for me also with XI – samcarter_is_at_topanswers.xyz Jan 13 '17 at 18:06
  • @ChrisH But it seems one can not follow any links to the backup slides. (tried with the \hyperlink/\hypertarget syntax from the other answer.) – samcarter_is_at_topanswers.xyz Jan 13 '17 at 18:09
  • @samcarter The GoBack action is bugged in Readers X and XI. If you upgrade to AR DC or old AR-9 the backlinks work. – AlexG Jan 13 '17 at 18:15
  • 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 Jan 13 '17 at 18:31
  • It's sounds like the repeat code might be too early but I don't have access to a Windows machine over the weekend. – Chris H Jan 13 '17 at 19:04