12

I have to prepare a beamer presentation, but depending on the audience, during the presentation I might decide to skip some material. Is there a way to do this without having to skip quickly through the slides? I seem to remember that there was a command, but I forgot what it was and anyway I never succeeded in having it work. Thanks for your help!

3
  • Never worked with beamer presentation, but have you tried the hyperref package and \label and \ref?
    – Shade
    Apr 3, 2018 at 16:39
  • Ok, thanks. It was not what I was looking for but perhaps it works. Thank you to you and to Patrick.
    – Tanda
    Apr 3, 2018 at 20:52
  • if you give us an MWE, we can have a more sorrow look into it. With the question you've asked, hyperref is a completely satisfying solution.
    – Shade
    Apr 3, 2018 at 21:11

4 Answers 4

11

Beamer offers a variety of navigation buttons for such purposes. Together with the \hyperlink command they can be used to conveniently jump to other slides or frames.

\documentclass{beamer}

\begin{document}
\begin{frame}
1

\hyperlink{foo}{\beamerskipbutton{skip slide}}

\end{frame}

\begin{frame}
2
\end{frame}

\begin{frame}[label=foo]
3
\end{frame}
\end{document}

For more examples, please see section 11.1 Adding Hyperlinks and Buttons from the beamer user guide.

1
  • 3
    [label=foo] doesn't work for me. I need to use \label{foo} instead for this to work.
    – luchonacho
    Jan 15, 2020 at 14:53
11
  1. Add \usepackage{hyperref} to the preamble. (Or, immediately above \begin{document})

  2. Label the frame you want to go to. For this, add \label{SOME_NAME} after \begin{frame}.

  3. Where needed, place the icon that links to that slide:

     \hyperlink{SOME_NAME}{\beamerbutton{link}}
    

which produces this:

enter image description here

You can change the icon style and text accordingly.

  1. If you want to go back to the slide you were before, you can add another link button as above. For neatness, (e.g. if going back to a slide shown before), this button can be invisible. For instance, add this:

     \hyperlink{back}{\hspace{3cm}}
    

where back is the label of the original slide.

0
0

For reference, here's a way to have buttons in the footline. A "go back" button takes you to the table of contents from any slide.

\documentclass{beamer}

\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}{%
  \hfill%
  \usebeamercolor[fg]{page number in head/foot}%
  \usebeamerfont{page number in head/foot}%
  \insertframenumber/\inserttotalframenumber%
  \hspace*{2em}%
  \parbox[c]{2pt}{\makebox[0pt][c]{% doesn't use any horizontal space
    \hyperlink{frameTOC}{\beamerreturnbutton{}}%
  }}%
  \usebeamertemplate*{page number in head/foot}\kern1em\vskip2pt%
}

\begin{document}

\begin{frame}[label=frameTOC]\thispagestyle{empty}
\frametitle{Table of Contents}
\begin{itemize}
\item[\hyperlink{labelOne}{\beamergotobutton{}}] Go to first target slide
\begin{itemize}
\item[] There is a filler side in between to check that navigation works
\end{itemize}
\item[\hyperlink{labelTwo}{\beamergotobutton{}}] Go to second target slide (third slide in the deck)
\end{itemize}
\end{frame}

\begin{frame}[label=labelOne]
\frametitle{Some More Content}
This slide is labeled and used as first target. The button in the bottom right corner takes you back to the table of content.
\end{frame}

\begin{frame}
\frametitle{Some Content}
This slide is not labeled and not used as target.
\end{frame}

\begin{frame}[label=labelTwo]
\frametitle{Some Extra Content}
This slide is labeled and used as second target.
\end{frame}

\end{document}

enter image description here

enter image description here

EDIT: I noticed problems with \hyperlink when compiling with XeLaTeX. Inserting the following right at the top seemed to fix it. It also increases the size of the white arrows inside the buttons, which I happen to like. To use the other beamer buttons with empty text and xelatex, one would have to redefine their symbol in the same manner.

\def\insertgotosymbol{$\blacktriangleright$}% fix hyperlink with empty text when compiling with XeLaTeX
\def\insertreturnsymbol{$\blacktriangleleft$}% fix hyperlink with empty text when compiling with XeLaTeX
2
  • 1
    xelatex does not deal well with non-text content in hyperlinks.It also causes some other problems with beamer. I would suggest to use lualatex instead if that's compatible with your document. Jan 28 at 11:15
  • thanks @samcarter_is_at_topanswers.xyz. I'll give lualatex a try!
    – PatrickT
    Jan 29 at 10:37
-2

You could use the hyperref package and create references to the slides you want to view.

You must log in to answer this question.

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