Open ouboub opened 8 months ago
Hi
I found a solution for the required functionality but it relies on cleveref, any comments are welcome.
regards
Uwe Brauer
\documentclass{beamer}
\hypersetup{colorlinks=true}
\usepackage{nameref}
\newtheorem{thm}{Theorem}
\usepackage{cleveref}
\Crefname{thm}{Theorem}{Theorems}
% fix for cleverref
\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.
%
\newcommand*{\fullcleveref}[1]{%
\hyperref[{#1}]{\Cref{#1} (\nameref*{#1})}%
}
\newcommand*{\hypercleveref}[1]{%
\hyperref[{#1}]{\Cref{#1}}%
}
\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{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 and the equation}
\hypercleveref{eq:beamer-auto-nameref:1}
\fullcleveref{thr:beamer-auto-nameref:1}
\end{frame}
\end{document}
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
andnameref
. I attach a minimal example and would appreciate any adviceand the pdf file
beamer-auto-nameref.pdf