# How to create a hyper link from slide A to B and again back from slide B to A

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,
\end{frame}

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

\end{document}

• Are you using beamer for your slideshow? – L. F. Mar 23 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 Mar 23 at 8:24

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}}
\end{frame}

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

\begin{frame}{\hypertarget{frame:B}{Frame B}}
\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:

(10 frames in between)

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}