pgf-tikz / pgf

A Portable Graphic Format for TeX
https://pgf-tikz.github.io/
1.15k stars 108 forks source link

\foreach initial value stored for remember key is actually in <macro> #1340

Open robert-g-liu opened 5 months ago

robert-g-liu commented 5 months ago

Version

3.1.10

Details

For this key "/pgf/foreach/remember=\<variable> as \ (initially \<value>)" the document explains "By default the value of \<variable> is zero for the first iteration, however, the optional (initially \<value>) statement, allows the \<macro> to be initially defined as \<value>."

It's more appropriate to say by default the value of \<macro> is zero for the first iteration. The \<variable> gets a value out of the list, or gets evaluated in some way, in current iteration.