Search code examples
hyperlinklatexbeamercross-reference

hyperlink specific item/ after pause in beamer


this code works perfectly, until I insert a \pause. I need to click enter to see where I hyperlink. Is there any way to get around with this?

    \documentclass[]{beamer}
\usetheme{Madrid}

\usenavigationsymbolstemplate{}

\title{Main Title} 
\author{Jane Doe}
\institute{University A}
\date{\today}

\begin{document}
    
    \begin{frame}
        \titlepage % Print the title page as the first slide
    \end{frame}
    
    \begin{frame}
        \frametitle{First Page}
        \begin{exampleblock}{Example}
            This is an example which will be used later.
        \end{exampleblock}
    \end{frame}
    
    \begin{frame}[label={important}]
        \frametitle{Second Page}
        \begin{itemize}
            
            \item Item 1
            \pause
            \item \hyperlink{foo}{Item 2}
        \end{itemize}
    \end{frame}
    
    \begin{frame}[label={foo}]
        \frametitle{Third Page}
        \begin{itemize}
            
            \item Item 1
            \pause
            \item \hyperlink{important}{Item 2}
            \item \hyperlink{important}{Item 3}
        \end{itemize}
    \end{frame}
    
\end{document} 

Solution

  • You can use the syntax \hyperlink{important<2>}{Item 2} to jump to a specific overlay within the frame:

    \documentclass[]{beamer}
    \usetheme{Madrid}
    
    \usenavigationsymbolstemplate{}
    
    \title{Main Title} 
    \author{Jane Doe}
    \institute{University A}
    \date{\today}
    
    \begin{document}
        
        \begin{frame}[label={important}]
            \frametitle{Second Page}
            \begin{itemize}
                
                \item Item 1
                \pause
                \item \hyperlink{foo<2>}{Item 2}
            \end{itemize}
        \end{frame}
        
        \begin{frame}[label={foo}]
            \frametitle{Third Page}
            \begin{itemize}
                
                \item Item 1
                \pause
                \item \hyperlink{important<2>}{Item 2}
                \item \hyperlink{important}{Item 3}
            \end{itemize}
        \end{frame}
        
    \end{document}