Closed Qrrbrbirlbel closed 1 year ago
You're right, looking at latex.ltx
then there are the lines:
\begingroup\@floatplacement\@dblfloatplacement
\makeatletter\let\@writefile\@gobbletwo
\global \let \@multiplelabels \relax
\@input{\jobname.aux}%
\endgroup
so the aux
file is read while within a group. The clearing and setting should therefore both be global. The \tl_clear_new:N
doesn't strictly have to be global, but LaTeX3 tries to avoid mixing local and global with the same variable so gclear
is better.
594a13e
Consider the following document.
This will save the following to the
aux
file (line formatted, of course).However, the log file will contain
even after the second compilation.
And indeed,
\tikz@intersect@path@name@box
is empty (not undefined because\tl_clear_new:N
makes sure the tl exists globally).With the following patch to
\spath_save_to_aux:Nn
where everything is done globally, it works as I expected it to. (The first patch is maybe not even necessary because even\tl_clear_new:N
makes sure the tl exists globally but this is too deep into L3 territory for me …)For reference:
https://github.com/loopspace/spath3/blob/bb6dc5037c9cb63a9c1ef59f6c973acdac9da5d8/spath3_code.dtx#L1676-L1690
I don't know much about the
aux
file but it looks like LaTeX usually\gdef
s stuff there which makes me think global definition is needed and it works the way I did it in this answer on TeX.SE before I realized,spath3
hassave to aux
.