In an earlier question, I asked how to create zoomed highlights of a larger image automatically. User Jake provided an excellent solution using TikZ. However, when subcaptions and hyperref are added to the mix, we start getting multiply defined label warnings. Can anyone help diagnose the simplified example below?
When I compile this, I get the warning Label 'test' multiply defined.
Code example, courtesy of Jake:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{spy}
\begin{document}
\begin{figure}\centering
\begin{tikzpicture}[spy using outlines]
\node{\label{test} Testcontent};
\spy on (0,0) in node (0,0);
\end{tikzpicture}
\caption{Testfigure}
\end{figure}
\end{document}
spylibrary will process the content multiple times. In this case this also includes the labels. – Martin Scharrer Aug 12 '11 at 14:51spy? Thanks. – SSilk Aug 12 '11 at 15:13\def\label#1{}before the\spydoesn't help. – Caramdir Aug 12 '11 at 16:10