During a live slide presentation, it is sometimes necessary to jump several slides back to remind the audience of a formula or a picture. You don't want to page through 17 slides to go to that particular slide and back through 17 slides to return to where you were.
Hyperlinks in a pdf file enable you to jump from one slide to any other slide with one mouse click.
The following input file defines two slides. You should imagine that these are among a large number of slides which are not shown here to save space.
One slide is identified by the label=intro tag on its
\begin{frame} command. This is our target slide.
The other slide contains the code \hyperlink{intro}{here}.
The word "here" will appear in red in the pdf viewer.
When you click on "here", the viewer will jump to the frame labeled
intro.
Remark:
Actually, what I wrote above is not exactly true.
By default, hyperlinks are shown in the normal text color thus are not
distinguishable from surrounding text.
The red color of hyperlinks is prescribed in the hypersetup command
as shown in the sample code below.
Alternatively, a hyperlink may be drawn as a "beamer button". For
instance, to make a button with the text "here" on it, we do:
\hyperlink{intro}{\beamerbutton{here}}. Four different
button styles are available:
These buttons were made using:
\beamerbutton{here}
\beamergotobutton{here}
\beamerskipbutton{here}
\beamerreturnbutton{here}
They only look different; they all do the same thing. Use the one that fits your need.
OK, here a complete LaTeX file that illustrates these concepts:
% hyperlinks.tex
\documentclass{beamer}
\usetheme{default}
\hypersetup{colorlinks=true,linkcolor=red}
\begin{document}
%--- frame --------------------------------------------------%
\begin{frame}[label=intro]
\frametitle{Introduction}
The contents of the slide here
\end{frame}
%--- frame --------------------------------------------------%
\begin{frame}
\frametitle{Some other slide}
If you press \hyperlink{intro}{here}, you will jump to the frame
labeled "intro".
Similarly, pressing \hyperlink{intro}{\beamerbutton{here}} will
take you to that same frame.
\end{frame}
\end{document}
The second of the two frames defined above is shown in the figure below.
If in the pdf browser you click on the red word "here" or on the
blue button, the browser will jump to the first slide labeled intro.
It is difficult to illustrate the dynamic action of hyperlinks with words. I suggest that you cut and paste the code above into a file, compile, and try it yourself.
Now you know how to jump from page N1 to page N2. But how to you return to page N1? Well, you can page through all the intervening pages to get there, but that's not very professional.
To jump to the page where you came from in a single step, do:
Remark: Yet another way to return to the calling page would be by adding another hyperlink that works in the opposite way. Thus you put a hyperlink in page N1 that takes you to page N2, and put a hyperlink in page N2 that takes you to page N1. This trick is somewhat difficult to use in practice. Suppose that you have an important formula on page N1. You want to put links in pages N2 and N3 and N4, each of which takes you to page N1. But once in page N1, it could be confusing as to which of the pages N2 or N3 or N4 you are supposed to return to. The pdf viewer methods described above do not have this problem.