Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using pgfplots with externalize because my document has a lot of plots which causes problems with memory limitation in LaTeX. In one of my plots I have a reference to an equation. In the file main-figure0.pdf the reference shows up correclty with the hypertext link from the hyperref package. But the hypertext link doesn't show up in the main.pdf file.



\tikzexternalize[shell escape=-shell-escape]


        \node[draw, rectangle] (block) at (0,0) {\ref{eq}};

I compile with:

pdflatex -shell-escape -synctex=1 -src-specials main.tex
pdflatex -shell-escape -jobname "main-figure0" "\def\tikzexternalrealjob{main}\input {main}"
pdflatex -shell-escape -synctex=1 -src-specials main.tex

How do I get the hypertext link to show up in the actual document?

share|improve this question
If only one plot has that issue, you can disable the externalization for this one plot. –  T. Verron May 19 at 16:00
I suppose importing hyperlinks by means of an external graphics is unsupported, sorry. Perhaps The comment of @T.Verron should become the answer. –  Christian Feuersänger May 20 at 19:41
Thank you @T.Verron. I guess I can live with your solution although it's only some sort of workaround. Could you please make your comment to an answer? –  Pronk May 24 at 14:30
Sorry for the delay. ;) –  T. Verron May 30 at 10:52

1 Answer 1

up vote 2 down vote accepted

As far as I know, tikz imports external graphics as pictures, just like what you would do with \includegraphics. Hypertext links are indeed dropped.

If only a few plots include hypertext links, as a workaround, you can disable the externalization for these plots, by adding

\tikzset{external/export next=false}

before each of them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.