pgfplots
pgfplots copied to clipboard
Fix infinite loop in the example on Loops over list of items provided under Section 2.6.2 of TeX-programming-notes.tex
Fixes a bug in the example on Loops over list of items provided under Section 2.6.2 of TeX-programming-notes.tex.
How to locally build TeX-programming-notes.pdf from source
Pre-requisite
wget https://mirrors.ctan.org/macros/latex/contrib/acrotex.zip
unzip arotex.zip
DEST=$(kpsewhich -var-value TEXMFHOME)/tex/latex
mkdir -p $DEST
mv acrotex $DEST/
cd $DEST/acrotex
# Entering Ctrl-D whenever stuck
for i in $(ls *.ins); do
lualatex $i
done
Build the pdf
git clone [email protected]:hansonchar/pgfplots.git
cd pgfplots/doc/latex/pgfplots
git checkout -b Section2.6.2-infiniteloop origin/Section2.6.2-infiniteloop
# Enter 'X' when error out for the first time
make notes
# Second time should generate the pdf without a TOC
make notes
# Third time to generate the final TeX-programming-notes.pdf
make notes
This fix fails if the item iterated over starts with two identical tokens. Example: \listingloop\x in{aa}{...}.
It seems to me the "proper" fix is to remove the \par in the definition of \listingloopENDMARKER, ie.
\def\listingloopENDMARKER{\listingloopENDMARKER}
This fix fails if the item iterated over starts with two identical tokens. Example:
\listingloop\x in{aa}{...}. It seems to me the "proper" fix is to remove the\parin the definition of\listingloopENDMARKER, ie.\def\listingloopENDMARKER{\listingloopENDMARKER}
Thanks! Will make the changes as you suggested.