0

I have a beamer-class document and I defined a label directly after a \phantomsection.

\begin{frame}
\phantomsection
\label{sec:rotation}
<TEXT>
\end{frame}

However, referencing to the label with \hyperref[sec:rotation]{rotation} in another place creates a link that does NOT lead to the section where it is defined, but to the beginning of the document. How to solve this?

1 Answer 1

2

beamer loads hyperref with option implicit=false. This influences behaviors of many user commands from hyperref. In your case, \phantomsection is now an empty macro (defined by \let\phantomsection\@empty).

To add a label to frame, you can use option label={<label name>} of frame environment.

\documentclass{beamer}


\begin{document}
\begin{frame}[label={sec:rotation}]
  content
\end{frame}

\begin{frame}
  % print "macro:->"
  \meaning\phantomsection 
  
  % clicking "rotation" jumps to first frame
  \hyperref[sec:rotation]{rotation}
\end{frame}
\end{document}

You must log in to answer this question.

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