I have a TikZ tree. Now I want to make the nodes click-able directing to relevant sections in the document (or directed to URLs). Some of the content in the nodes are not text. Is it possible to turn the nodes into links, and if so, how? I would prefer the nodes themselves to be links, and not the text they contain.
Addition: I am not really good at it, and still learning, but here is a skeletal outline of the idea I am working on… (a graphical table of contents)
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzstyle{level 1}=[sibling distance=60mm]
\tikzstyle{level 2}=[sibling distance=25mm]
\node[circle,draw,grow=down] {\textbf{COOL TOC}}
child {node {installation}
child {node {Linux}}
child {node {Mac}}
child {node {Windows}}
}
child {node {Get Started}
child {node {do A}}
child {node {do B}}
}
child {node {Looking Further}
child {node {manual}}
child {node {online}}
}
child[grow=up] {node {troubleshoot}
child {node {if X happens}}
child {node {if Y happens}}
};
\end{tikzpicture}
\end{document}
There are fancier examples for example this one would make for a great TOC.
Best Answer
Here's a new TikZ style called
hyperlink node=<target>
that takes ahypertarget
reference. It works by measuring the node it is supplied to, and then placing a new invisible node on top of that. The new node has the content\hyperlink{<target>}{\phantom{\rule{<width of node>}{<height of node>}}
, so it has the same size as the original node, but the whole area is clickable.