pgf-tikz / pgf

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

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

Open robert-g-liu opened 3 months ago

robert-g-liu commented 3 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.