\documentclass[xcolor=dvipsnames]{beamer} \usepackage[T1]{fontenc} \usetheme{AnnArbor} \usecolortheme{whale} \setbeamercolor{title}{bg=RoyalPurple} \setbeamercolor{frametitle}{fg=white,bg=RoyalPurple} \usepackage{amsmath} \newcounter{exm} \makeatletter \newcommand\ExmT{% \refstepcounter{exm}% \protected@edef\@currentlabelname{Example\protect~\theexm}% \frametitle{% Example~\theexm}% } \makeatother \resetcounteronoverlays{exm} \begin{document} \frame{% \frametitle{Testframe} To avoid that exmaples and frames have the same number. } \frame{ \ExmT\label{ex:hilbert}% David Hilbert is a great Mathematician! } \frame{ \ExmT\label{ex:riemann}% Bernhard Riemann is another greatest mathematician in the history! } \frame{{How do you define Mathematics?} Mathematics is a language of sciences. Moreover, $\cdots$ } \frame{{Rmarks on \nameref{ex:hilbert}} {\color{red}\textbf{I am writing Remarks on Example~\ref{ex:hilbert} on page~\pageref{ex:hilbert} (on the title of this frame) manually but is there a way to reference \nameref{ex:hilbert} automatically?}} Not the frame number. } \end{document}