\documentclass{article} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{hyperref} \begin{document} \section{A graph for Omer} \begin{tikzpicture} \node(A) at (0,0) {$A$}; \node(B) at (10,0) {$B$}; \draw[->] (A)-- node[below]{\hyperlink{tikz_thm1}{Theorem 1}} (B); \end{tikzpicture} \begin{theorem}\label{thm1}\hypertarget{tikz_thm1} 1+1+2. \end{theorem} \end{document}
Graphics, Figures & Tables ⇒ hyperlinks in tikz
hyperlinks in tikz
I wish to have a figure with numerous hyperlinks to theorems in the paper. I have the following construction:
However, I would much prefer if I could use the theorem labels already in place, instead of having a separate hypertarget anchors, and if the link text could be created automatically, similarly to using \ref{thm1} in the above context (or better yet \cref{thm1} with cleveref.) Can this be done?
NEW: TikZ book now 40% off at Amazon.com for a short time.

hyperlinks in tikz
you mean, like this?
KR
Rainer
Code: Select all
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{hyperref}
\begin{document}
\section{A graph for Omer}
\begin{tikzpicture}
\node(A) at (0,0) {$A$};
\node(B) at (10,0) {$B$};
\draw[->] (A)-- node[below]{\autoref{thm1}} (B);
\end{tikzpicture}
\begin{theorem}\label{thm1}
1+1+2.
\end{theorem}
\end{document}
Rainer