TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my LaTeX documents, I am playing with a lot of axioms which I write under a theorem environment, while using the following math packages:


I define the axiom environment in the preamble,

\newtheorem{ax}{Fairness axiom}

then in the text I write,

\begin{ax}[name of the axiom]
\label{label of the axiom}
{definition of the axiom}

To refer to these axioms, I use \nameref{label of the axiom} through the following packages


In the article document class, \nameref{label of the axiom} does exactly what I want : a reference to the name of the axiom with an hyperlink to its definition.

But in the beamer class, \nameref{label of the axiom} instead refers to the name of the section in which the axiom is included.

Do you know why? Is there any way to make the beamer class behave like the article class in this matter?

share|improve this question
Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code – Corentin Oct 27 '12 at 11:08
Do things work if you insert a \phantomsection command immediately prior to the axiom environment? – Mico Oct 27 '12 at 12:11
No, unfortunately phantom section does not change anything :-s – Martin Van der Linden Oct 27 '12 at 13:02
up vote 13 down vote accepted

Class beamer stores the theorem name in \inserttheoremaddition. That needs to be passed at the right time to nameref:

\addtobeamertemplate{theorem begin}{%
share|improve this answer
Wonderful, adding this code to the preamble makes it work just fine! Many thanks – Martin Van der Linden Oct 27 '12 at 14:28
@user21434 I have also added this to the next versions of nameref (2.43) and zref-titleref (3.0). – Heiko Oberdiek Oct 27 '12 at 15:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.