I have several theorems in a document with the proofs in the appendix. After some theorem, I want to refer to the proof and, using the hyperref
package, I want to make the reference clickable to avoid scrolling.
However, adding a label to the proof and then referring to it (I am also using the cleveref
package) refers and links to the respective section which holds the proof instead, in my example to the appendix.
MWE:
\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}
\newtheorem{theorem}{Theorem}
\begin{document}
\section{Theorems}
\begin{theorem}\label{thm:some-theorem}
This is a theorem.
\end{theorem}
For an initution, see the proof.
For an intiution, see \cref{proof:some-theorem}.
\appendix
\section{Proofs}
\begin{proof}[Proof of \Cref{thm:some-theorem}]
\label{proof:some-theorem}
This is a proof.
\end{proof}
\end{document}
How can I get the reference to print "proof" (or "proof of Theorem 1") instead, with the hyperlink also linking to the proof?
Best Answer
You can make bidirectional links using the same label.
The picture shows that the link “proof” refers to the correct proof. Raising the
\hypertarget
is needed or the link would point to the baseline of the proof's first line.