I've a question about the usepackage hyperref. I just link to the different theorems, lemmas etc. in my paper, writing

Theorem \ref{text}

I get a red or green (depends if it is a literature reference or not) box around the accordant number of the Theorem. Suppose there are Theorems, named after a Person. Is it possible to get this red box around the name? For example, suppose I stated the Einsteins Theorem on page 2, \label{einstein}. On page 10 I refer to this Theorem. I would like to write, "by Einsteins Theorem" an get a red box around Einstein. How can I do this?

Edit: Here is my preamble (a part of it):

\usepackage{graphicx}   % if you want to include graphics files


    \@removefromreset{theorem}{chapter}% just in case ... (no harm done)
    \@removefromreset{theorem}{section}% just in case ... (no harm done)

   % The preamble is also a good place to define new commands and macros.
   % This part of the preamble is strictly optional according to your taste.

      \newcommand{\R}{{\mathbb R}}
      \newcommand{\N}{{\mathbb N}}
      \newcommand{\A}{{\marhcal A}}
  • You can use the command \href. Try \href{einstein}{y Einsteins Theorem}. May 2 '12 at 9:42
  • @MarcoDaniel: You surely meant \hyperref[einstein]{by Einsteins Theorem}, didn’t you?
    – Speravir
    May 2 '12 at 18:17
  • @Speravir: I didn't test it ;-). I can do a test. May 2 '12 at 18:18

You can use aliascnt to create a counter similar to theorem.

%------------------for refering to Einstein-----------------------------
\newtheorem{lemmaa}[lemmaa]{Einstein's theorem}
\providecommand*{\lemmaaautorefname}{Einstein's theorem}
%------------------for using lemma-----------------------------
We will use \autoref{a} to prove \autoref{b}.
Nobody knows.
Nobody ever knows anything.
Nobody is right.
My reference~\autoref{a} says that~\autoref{c} is wrong. 

enter image description here

  • @ Harish Kumar: Thank you for your answer. How ever, I've some question. How do I have to change my preamble, see my code, added in my question. I do not know why you are defining a new lemmaa? Thanks for your help
    – m. th
    May 2 '12 at 12:08
  • @math: I defined lemmaa so that you can still use lemma. Put the lines enclosed between dashed lines in my code preamble right after \newtheorem{theorem}{Theorem}[section] in your preamble.
    – user11232
    May 2 '12 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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