Skip to content

autoref and nameref seem not to work as exspected (i.e work like in article mode) #865

Description

@ouboub

Hi

A while ago in issue 750 I wrote that cleverref and beamer do not work together well, but also found a sort of fix.

Now I am facing the same problem with autoref and nameref. I attach a minimal example and would appreciate any advice

\documentclass{beamer}
\usepackage[spanish]{babel}
\makeatletter
\Hy@AtBeginDocument{%
  \def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true
  \def\@pdfborderstyle{/S/U/W 1}% Overrides border style set with colorlinks=true
                                % Hyperlink border style will be underline of width 1pt
}
\makeatother


\hypersetup{%
  colorlinks=true,% hyperlinks will be coloured
%  linkcolor=blue,% hyperlink text will be blue
  urlcolor=blue,% hyperlink text will be blue
%  linkbordercolor=red,% hyperlink border will be red
  urlbordercolor=red,% hyperlink border will be red
}
\usepackage{nameref}
\usepackage{thmtools}
\newtheorem{thm}{Theorem}
\begin{document}
\begin{frame}
  \frametitle{Equations are here}
  this is important
  \begin{equation}
    \label{eq:beamer-auto-nameref:1}
    \int f dx =0
  \end{equation}
\end{frame}
\begin{frame}
  \frametitle{Reference with autoref}
this is   \autoref{eq:beamer-auto-nameref:1}

But using eqref \eqref{eq:beamer-auto-nameref:1}
\end{frame}
\begin{frame}
  \frametitle{Now a theorem}
  \begin{thm}[Riemann's Hypothesis]
\label{thr:beamer-auto-nameref:1}
    Let 
  \end{thm}
\end{frame}


\begin{frame}
  \frametitle{Reference to the theorem}
\ref{thr:beamer-auto-nameref:1}

  Consider \autoref{thr:beamer-auto-nameref:1}

And \nameref{thr:beamer-auto-nameref:1}
\end{frame}
\end{document}

and the pdf file

beamer-auto-nameref.pdf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions