4

I’m writing a paper, and I need to quote a theorem by a mathematician whom we’ll call Genius. This theorem already goes by a well-known name, say Genius’ Special Theorem. I’d like to cite this theorem a number of times in my paper, but I have trouble doing so without a theorem counter popping up everywhere. Here is my working example:

\documentclass{amsart}
\usepackage{hyperref}

\newtheorem{Thm}{Theorem}
\newtheorem{Genius}{Genius' Special Theorem}

\newcommand{\Thmautorefname}{Theorem}
\newcommand{\Geniusautorefname}{Genius' theorem}

% ----------

\begin{document}

Let us begin with the following theorem.

\begin{Thm}
Blah, blah, blah.
\end{Thm}

Now, we have the following theorem discovered by Genius.

\begin{Genius} \label{Genius}
Ha, ha, ha.
\end{Genius}

More text here.

According to \autoref{Genius}, we get...

\end{document}

When I preview the PDF document, I see

According to Genius’ theorem 1, we get...

However, what I’d like is

According to Genius’ theorem, we get...

because that’s the only theorem by Genius I’m ever going to use in the paper. I tried to remedy this by using \newtheorem*{Genius}{Genius' Special Theorem}, but then I get

According to Theorem 1, we get...

Somehow, the asterisk causes \autoref to ignore the command Genius and causes it to latch on to the command Thm instead.

Could anyone kindly resolve this issue? Thank you so much!

2
  • Do you want Genius' theorem numbered?
    – egreg
    Nov 9, 2014 at 20:10
  • @egreg: No, not at all. When I introduce Genius’ theorem for the first time in the paper, I’d like it to be called Genius’ Special Theorem, and in all subsequent references to the theorem, I’d like to use Genius’ theorem. The thing is, I could have typed this manually, but each time I refer to Genius’ theorem, I’d like to have a link that takes the reader back to the original statement, which is supposed to be the function of \autoref. Nov 9, 2014 at 20:20

1 Answer 1

5

The purpose of \autoref is to add the counter's name (or whatever one decides in place of the counter's name) to the number. In your case you just need \ref:

\documentclass{amsart}
\usepackage{hyperref}

\newtheorem{Thm}{Theorem}
\newtheorem*{innerGenius}{Genius' Special Theorem}
\makeatletter
\newenvironment{Genius}
  {\innerGenius\phantomsection\def\@currentlabel{Genius' Theorem}}
  {\endinnerGenius}
\makeatother
\newcommand{\Thmautorefname}{Theorem}

% ----------

\begin{document}

Let us begin with the following theorem.

\begin{Thm}
Blah, blah, blah.
\end{Thm}

Now, we have the following theorem discovered by Genius.

\begin{Genius} \label{Genius}
Ha, ha, ha.
\end{Genius}

More text here.

According to \ref{Genius}, we get...

\end{document}

enter image description here

Note that \newtheorem* needs amsthm that's autoloaded by amsart, so with other classes you should add \usepackage{amsthm}.

Note that using \newtheorem* only wouldn't create the reference for \label. So the reference is created in the Genius environment by setting \@currentlabel manually, adding also \phantomsection for creating the anchor.

1
  • Thanks! I actually deleted my comment because I thought it was rather stupid of me to ask it. Nov 9, 2014 at 20:42

You must log in to answer this question.

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