Closed stefan11 closed 4 years ago
This is due to memoization.
I have figured out what's wrong, but I'm not yet sure how to best resolve the problem. The problem is explained in the following issue in the memoize
repo: https://github.com/sasozivanovic/memoize/issues/1
Until the issue is resolved, there is a workaround. For each shading, include the following well before the shading is used:
\setbox0=\hbox{\memoizeset{disable}\begin{tikzpicture}
\node[<shading spec>]{dummy};
\end{tikzpicture}}
(The text of the node is irrelevant.) For example,
\setbox0=\hbox{\memoizeset{disable}\begin{tikzpicture}
\node[top color=white,bottom color=black!20]{dummy};
\end{tikzpicture}}
This will typeset a dummy node with the given shading and throw it away. But there will be an effect: even if the dummy picture is thrown away, the shading will be defined on that page, and any graphics externalized afterwards can use it.
The workaround will not work if you need a shading on the first page. I hope you don't.
fixed in xelatex, use nomemo for creation of the final PDF until we use texlive 2021
Figures should look like the last figure.