pgf-tikz / pgf

A Portable Graphic Format for TeX
https://pgf-tikz.github.io/
1.15k stars 108 forks source link

No clickable links with hyperref and tikzexternalize #1356

Closed amblafont closed 2 months ago

amblafont commented 2 months ago

Brief outline of the bug

Cross-references are not clickable when using the hyperref package with the tikzexternalize feature (texlive 2024).

Minimal working example (MWE)

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize
\usepackage{hyperref}

\begin{document}
\begin{equation}
A
\label{eq:eq}
\end{equation}

\begin{tikzpicture}
% The reference is not clickable
\node {\ref{eq:eq}};
\end{tikzpicture}

\end{document}
hmenke commented 2 months ago

This is a natural limitation of \includegraphics and can only be worked around with external tooling. See https://tex.stackexchange.com/questions/26128/embedding-a-pdf-file-with-clickable-external-links-into-a-latex-document