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

libxpdf: Syntax Error: AcroForm field object is wrong type when mixing tikzexternal with animate #1331

Open
JasonGross opened this issue May 10, 2024 · 2 comments
Labels

Comments

@JasonGross
Copy link

Brief outline of the bug

Mixing animateinline with \tikzexternalize seems to result in a slew of libxpdf: Syntax Error: AcroForm field object is wrong type. I can't tell if this is actually breaking anything, though. Sorry my example is not quite as minimal as it could be.

Minimal working example (MWE)

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\DeclareUnicodeCharacter{2212}{−}
\usepgfplotslibrary{groupplots,dateplot}
\usetikzlibrary{patterns,shapes.arrows}
\pgfplotsset{compat=newest}
\pgfplotsset{title/.append style={align=center}}
\usepackage{animate}
\usetikzlibrary{external}
\tikzexternalize
\def\basefigurename{test}
\usepackage{currfile}
\tikzsetfigurename{\basefigurename-\currfilebase-figure}
\begin{document}
\begin{filecontents*}[overwrite]{pics.tex}
\begin{animateinline}[autoplay,autoresume,controls,loop]{20.0}
\definecolor{darkgray176}{RGB}{176,176,176}
\definecolor{lightgray}{RGB}{211,211,211}
\definecolor{steelblue31119180}{RGB}{31,119,180}

% Frame 1
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 8}]
\nextgroupplot[tick align=outside,tick pos=left,x grid style={darkgray176},xmin=-1.5, xmax=1.5,xtick style={color=black},
y grid style={darkgray176},ymin=-1.5, ymax=1.5,ytick style={color=black}]
\addplot [semithick, black]
table {%
0 0
0.0752933174371719 0.0355731099843979
};
\addplot [semithick, black, mark=*, mark size=4, mark options={solid}]
table {%
0.0752933174371719 0.0355731099843979
};
\addplot [semithick, black]
table {%
0 0
-0.02556380815804 -0.0197121165692806
};
\end{groupplot}
\end{tikzpicture}


\newframe
\definecolor{darkgray176}{RGB}{176,176,176}
\definecolor{lightgray}{RGB}{211,211,211}
\definecolor{steelblue31119180}{RGB}{31,119,180}
% Frame 2
\begin{tikzpicture}
\begin{groupplot}[group style={group size=2 by 8}]
\nextgroupplot[tick align=outside,tick pos=left,x grid style={darkgray176},xmin=-1.5, xmax=1.5,xtick style={color=black},
y grid style={darkgray176},ymin=-1.5, ymax=1.5,ytick style={color=black}]
\addplot [semithick, black]
table {%
0 0
0.196652069687843 0.0978278592228889
};
\addplot [semithick, black, mark=*, mark size=4, mark options={solid}]
table {%
0.196652069687843 0.0978278592228889
};
\end{groupplot}
\end{tikzpicture}
\end{animateinline}
\end{filecontents*}
\input{pics.tex}
\end{document}
@hmenke
Copy link
Member

hmenke commented May 10, 2024

The external library is currently unmaintained and it is unlikely that any bugs are going to be fixed in the future, due to the inherent defective design of the library. However, there are other third-party libraries for externalization which have learned from these past mistakes and which seem to be quite usable:

Both are included in TeX Live 2024.

@JasonGross
Copy link
Author

Thank you @hmenke ! Neither of those packages work out of the box for me (I've just reported leo-colisson/robust-externalize#43 and sasozivanovic/memoize#19), but I'm trying to regenerate my code from tikzplotlib with tables pre-externalized and I'll see if I can get them working.

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

No branches or pull requests

2 participants