Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperref with bookmarks=true and tikzexternalize clashes in edge cases #223

Open
ORippler opened this issue Jan 14, 2022 · 1 comment
Open

Comments

@ORippler
Copy link

ORippler commented Jan 14, 2022

Hey,

After having faced the same issue as borisveytsman/acmart#436 when writing a paper with \documentclass{IEEEtran}, I decided to see which packages are related to the issue, and found that it's an interaction between hyperref's booktabs feature and tikzexternalize of tikz

MWE

Consider the following MWE (thanks @JasonGross for producing this).

%\PassOptionsToPackage{bookmarks=false}{hyperref} % This fixes the problem
\documentclass{acmart}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize
\begin{document}
\title{}
\begin{abstract} \end{abstract}
\maketitle
\section{XXXXXXXXX}\subsection{X XXXXXXXXXX XXXXXXX}\subsection{XXXXXXXX XX XXXXXXXXXXXXXXXXX XXXX}\subsection{XXX XXXXXXXX}
\section{XXXXXX XXXXXXXXXX XXX XXXXXXXXX}\subsection{XXX XXXXXXXX XX XXXX XXXXX}
\section{XXX XXXXXXXXX XX X XXXXXXXX}\subsection{XXXXXXXXXXXXXXXX XXXXXXXXXXX XXX XXXXXXXXXX}
\subsection{XXXXXX XXXXXXXXXXXX XXXXXXXX}
\section{XXXXXXX XXXXXXXXXX}\subsection{XXXXXXXX XXXXXXXXXXXX XXXX XX XXXXX}\subsection{XXXXXXX XXXXXXX XX XXXXXXX}
\subsection{XXXXX XXXX XXXX XXXXXXXXXX}\subsection{XXXX XXXXXXXXXX XXXX XXXXXXXX XXXXXXXXXXXXXX}
\subsection{XXXXXXXXXXX XXX XXXXXXXXXXXXX}
\section{XXXXXXXXXX}\subsection{XXXXXXXXXXXXXXX}
\begin{equation}\label{eq:equation}
    x+x^2
\end{equation}
\begin{tikzpicture}
    \begin{axis}
        \addplot [color=black,solid,line width=1.0pt,domain=0:1,samples=11]{x+x^2};
        \addlegendentry{Eq. \ref{eq:equation}};
    \end{axis}
\end{tikzpicture}
\subsubsection{XXXXXXXXX XXXXX XXXXXXX}\subsubsection{XXXXXXXXXXX XXXXXXXXXXX XX XXXXXXXXXXXXXXX XXXXXXXXX}
\subsubsection{XXXXXXX XXX XXXXXXXXX XXXXXXXXX}\subsubsection{XXXX XXXXXXXXX}\subsection{XXXXXXXXXXXXXXX XXXX XXXXXXXXXXXX}
\section{XXXXXXX XXXX}
\section{XXXXXX XXXX}
\end{document}

Compiling the above document with
docker run --rm -it --volume "`pwd`:/workdir" -w "/workdir" --user `id -u`:`id -g` registry.gitlab.com/islandoftex/images/texlive:TL2021-2022-01-09-04-05 pdflatex -shell-escape test.tex fails, and the ref used inside the tikzpicture is never resolved.
However, when providing \PassOptionsToPackage{bookmarks=false}{hyperref}, and thereby disabling the bookmarks functionality, the code compiles just fine and the ref is resolved properly.

Note that I also found the same clash to happen with \documentclass{IEEEtran}, which is why I guess that it's an interaction related between tikz and hyperref, rather than a problem with \documentclass{acmart}. Related package versions are,

Package: hyperref 2021-06-07 v7.00m
Package: tikz 2021/05/15 v3.1.9a (3.1.9a)

and full reproducibility should be given by the docker image.
Since I don't know the exact interactions which cause the issue and how to best resolve them, I have also crossposted the Issue to [tikz}(https://github.com/pgf-tikz/pgf/issues/1127).

Best,
ORippler

@ORippler ORippler changed the title Weird compilation failure with bookmarks=true and tikzexternalize hyperref with bookmarks=true and tikzexternalize clashes in edge cases Jan 14, 2022
@u-fischer
Copy link
Member

I commented on the parallel pgf issue pgf-tikz/pgf#1127 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants