9

I have a problem that i cannot find anywhere else. Consider the MWE below:

\documentclass{beamer}
\usepackage{cleveref}

\begin{document}

\begin{frame}
    \frametitle{toto}
    \begin{equation}
    0 = 1
    \label{titi}
\end{equation}
Wonderfull \cref{titi}, \ref{titi}
\end{frame}

\end{document}

In the pdf beamer output, compiled with pdflatex or latex + dvipdfm, the hyperlink produced by cref in not working (in fact, there is nowhere to click), while the one with ref works fine. If instead of beamer, i use article and load hypperref, both are ok. What am I missing ?

thanks

1

1 Answer 1

11

As a bandaid fix you could redefine the \cref command and explictely add the hyperlink, which will give you the desired result.

\documentclass{beamer}
\usepackage{cleveref}

\let\chyperref\cref % Save the orginal command under a new name
\renewcommand{\cref}[1]{\hyperlink{#1}{\chyperref{#1}}} % Redefine the \cref command and explictely add the hyperlink. 

\begin{document}

\begin{frame}
    \frametitle{toto}
    \begin{equation}
    0 = 1
    \label{titi}
    \end{equation}
Wonderfull \cref{titi}, \ref{titi}
\end{frame}

\end{document}
2
  • What is amazing is that this works. Every \newlabel links to Doc Start. The actual hypertarget names are stored in the snm file and always point to the top of the page. (Beamer is a world unto itself!) Sep 6, 2015 at 19:56
  • thanks! That's awesome. I wonder why I never found this anywhere on internet. There is some mention about label in the cref manual, but that's all, and it was never mentioned that this would cause problem.
    – Napseis
    Sep 7, 2015 at 8:56

You must log in to answer this question.

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