[Tex/LaTex] Beamer: Hyperlink to specific slide in frame

beamerhyperrefoverlays

I know that one can jump to different frames using hyperlinks and beamer buttons as in

\hyperlink{label}{\beamerbutton{displayed text}}

However, is there also a way to jump to, say, the fourth slide ("build stage") of a frame?

To be more concrete, suppose my frame is

\frame{
  \only<4>{Some text}
}

Then what link would directly lead me to the pdf page that displays "some text"?

Best Answer

Sure you can do it. \hypertarget is overlay aware, so you can say something like

\hypertarget<4>{label}{\beamerbutton{I'm on the fourth slide}}

to place the target just on the fourth slide of a frame and then elsewhere use

\hyperlink{label}{\beamerbutton{I jump to fourth slide of next frame}}

to activate a button that will take you to the fourth slide previously targeted.

A complete example:

\documentclass{beamer}

\begin{document}

\begin{frame}
\hyperlink{label}{\beamerbutton{I jump to fourth slide of next frame}}
\end{frame}

\begin{frame}
\begin{itemize}[<+->]
\item First.
\item Second.
\item Third.
\item Fourth.\hypertarget<4>{label}{\beamerbutton{I'm on the fourth slide}}
\item Fifth.
\end{itemize}
\end{frame}

\end{document}

In your example, you can also use

\documentclass{beamer}

\begin{document}

\begin{frame}
\hyperlink{label}{\beamerbutton{I jump to fourth slide of next frame}}
\end{frame}

\begin{frame}
  \only<4>{Some text\hypertarget{label}{\beamerbutton{I'm on the fourth slide}}}
\end{frame}

\end{document}
Related Question