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):
\documentclass[10pt,twoside,openright]{thesis}
\usepackage{graphicx} % if you want to include graphics files
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{enumerate}
\usepackage[pdftex,citecolor=green,linkcolor=red]{hyperref}
\usepackage{aliascnt}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem*{claim}{Claim}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\makeatletter
\newcommand\settheoremtochp{%
\@removefromreset{theorem}{chapter}% just in case ... (no harm done)
\@removefromreset{theorem}{section}%
\@addtoreset{theorem}{chapter}%
\renewcommand\thetheorem{\thechapter.\arabic{theorem}}}
\newcommand\settheoremtosec{%
\@removefromreset{theorem}{chapter}%
\@removefromreset{theorem}{section}% just in case ... (no harm done)
\@addtoreset{theorem}{section}%
\renewcommand\thetheorem{\thesection.\arabic{theorem}}}
\makeatother
% 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{\nil}{\varnothing}
\newcommand{\N}{{\mathbb N}}
\newcommand{\A}{{\marhcal A}}
\href
. Try\href{einstein}{y Einsteins Theorem}.
\hyperref[einstein]{by Einsteins Theorem}
, didn’t you?