You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use expl3 commands to generate tikz figures. I was trying to cache these tikz figures and I found out that expl3 variables are not expanded in tikzpicture environment when I use robust-externalize. MWE:
So here you have two issues, coming, I think, from the same mis-understanding: you have to remember that this library is not magical, what it does is quite simple:
it takes the code to cache (here everything around the tikzpicture) and put it into a .tex file with some code to compute its depth etc
it compiles this file and include back the pdf (with the proper depth)
You can inspect the file by inspecting robustExternalize/robExt-D5DF5E4E0CE8EC4C4E65E20E3EA09C13.tex (the hash is given in the error message). Here you realize 2 things:
first the line \tl_set:Nn \l_tmpa_tl {#1} is not present… which makes sense since it was before the tikzpicture
similarly, you can't see \ExplSyntaxOn… same reason, it was before the tikzpicture.
The fix is quite simple: put all the needed code in the tikzpicture. I tried to do:
In some cases, the macros used inside the function were defined much before, so you cannot easily add them inside you picture. That's why I created the notion of autoForward, that detects if a macro (marked as forwardable) is present, and if so copy backs its definition in the file. But at least with you current MWE this is not needed here.
I use expl3 commands to generate tikz figures. I was trying to cache these tikz figures and I found out that expl3 variables are not expanded in tikzpicture environment when I use robust-externalize. MWE:
The compilation fails because
\tl_use:N \l_tmpa_tl
is not expanded.The text was updated successfully, but these errors were encountered: