在 Beamer 中显示条件幻灯片后,如何循环返回上一张幻灯片?

在 Beamer 中显示条件幻灯片后,如何循环返回上一张幻灯片?

我正在制作一个包含条件幻灯片的演示文稿,使用此处建议的格式:在投影机中有条件地隐藏幻灯片

我希望能够在条件幻灯片之后使用某种循环技术继续我的演示,而不需要在条件幻灯片末尾按下按钮。

我想到有两个可能的选择,但我不知道如何实现:1)如果未单击按钮,则完全跳过条件幻灯片,否则让幻灯片在演示文稿的中间显示,或者2)在幻灯片结束时执行某种“单击”命令以链接回来。

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}

答案1

为此,PDF 规范提供了导航节点。不过,该功能仅在Adobe Reader并且它只适用于全屏模式

下面的示例包含两个补充幻灯片。

为了在演示过程中跳过它们,

  1. 必须使用 Adob​​e Reader,
  2. 必须处于全屏模式 (Ctrl-L),
  3. 鼠标左键和右键,或者箭头按钮--><--必须用于在幻灯片之间前进/后退。(PgDown、PgUp、向下箭头和向上箭头无法正常工作。)

根据要求,仅当单击链接时才会显示补充幻灯片。

代码示例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}

相关内容