4

How to create a hyperlink such that from slide A to slide B, I will move by clicking that button. And again from slide B, I have to come to slide A by clicking the button in slide B. And there are 10 slides between slide A and B.

\documentclass{beamer}

\begin{document}

\begin{frame}{A}
Two set of admissible functions are generated for two set extreme stiffness values,
  \hyperlink{label}{\beamerbutton{click here}}
\end{frame}

\begin{frame}{B}
\only<10>{Some text\hypertarget{label}{\beamerbutton{B}}}
\end{frame}


\end{document}
2
  • Are you using beamer for your slideshow?
    – L. F.
    Commented Mar 23, 2019 at 8:19
  • yes , I am using Beamer. I know how to reach from A to B but don't know how to come back
    – vijay
    Commented Mar 23, 2019 at 8:24

2 Answers 2

6

It is no different from other hyperlinks. Just define the targets and construct the links as usual.

\documentclass{beamer}

\usepackage{pgffor} % For \foreach

\begin{document}

\begin{frame}{\hypertarget{frame:A}{Frame A}}
    \hyperlink{frame:B}{Go to Frame B} 
\end{frame}

\foreach \i in {1, ..., 10} {
    \begin{frame}{Dummy frame}
        \[ \i \]
    \end{frame}
}

\begin{frame}{\hypertarget{frame:B}{Frame B}}    
    \hyperlink{frame:A}{Go to Frame A} 
\end{frame}

\end{document}

The text "Go to Frame B" brings you to Frame B, and the text "Go to Frame A" brings you to Frame A:

The first frame

(10 frames in between)

The second frame

2

beamer has a dedicated frame option to add a label:

\documentclass{beamer}

\begin{document}

\begin{frame}[label=foo]
\frametitle{A}
Two set of admissible functions are generated for two set extreme stiffness values, \hyperlink{bar}{\beamergotobutton{B}}
\end{frame}

\begin{frame}[label=bar]
\frametitle{B}
\hyperlink{foo}{\beamergotobutton{A}}
\end{frame}


\end{document}

You must log in to answer this question.

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