Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/pgf/foreach/count is unscoped #702

Closed
hmenke opened this issue Jun 26, 2019 · 1 comment
Closed

/pgf/foreach/count is unscoped #702

hmenke opened this issue Jun 26, 2019 · 1 comment

Comments

@hmenke
Copy link
Member

hmenke commented Jun 26, 2019

The count variable in \foreach seems to be unscoped unlike the list variable.

\documentclass{article}
\usepackage{pgffor}
\begin{document}
Testing the acute accent í í í ...
\show\listitem\show\i
\foreach \listitem [count=\i] in {1,...,4} {x}
\show\listitem \show\i
Testing the acute accent í í í ...
\end{document}
> \listitem=undefined.
l.6 \show\listitem
                  \show\i
? 
> \i=macro:
->\OT1-cmd \i \OT1\i .
l.6 \show\listitem\show\i
                         
? 
> \listitem=undefined.
l.8 \show\listitem
                   \show\i
? 
> \i=macro:
->4.
l.8 \show\listitem \show\i
                          
? 

Using pdflatex this results in:
test

Thanks @u-fischer for the original report: https://chat.stackexchange.com/transcript/message/50829169#50829169

hmenke added a commit to hmenke/pgf that referenced this issue Jun 26, 2019
@hmenke hmenke self-assigned this Jun 26, 2019
@hmenke hmenke added the pgffor label Jun 26, 2019
hmenke added a commit to hmenke/pgf that referenced this issue Jun 26, 2019
hmenke added a commit to hmenke/pgf that referenced this issue Jul 3, 2019
@hmenke
Copy link
Member Author

hmenke commented Jul 3, 2019

Fixed in 7fbaa86.
Let's see how hard it breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant