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

tikz: reset \tikz@expandcount more frequent #969 #970

Merged
merged 5 commits into from
Jan 4, 2021

Conversation

muzimuzhi
Copy link
Member

@muzimuzhi muzimuzhi commented Dec 28, 2020

This makes \tikz@expandcount get reset every time a token is handled
in tikz path scanning.

Motivation for this change

Fixes #969

Checklist

Please check the boxes to explicitly state your agreement to these terms:

This makes \tikz@expandcount get reset every time a token is handled
in tikz path scanning.
@@ -358,7 +358,7 @@
\def\tikz@lib@cal@calendar{%
\begingroup%
\let\tikz@lib@cal@ifs=\pgfutil@empty%
\tikz@expandcount=1000\relax%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1000 seemed really excessive. It was probably set to 1000 because it would never be reset.

@hmenke hmenke force-pushed the reset-tikz@expandcount branch from 2f23682 to 5a56134 Compare December 30, 2020 09:07
@muzimuzhi
Copy link
Member Author

appreciate the cleaning up

@hmenke hmenke force-pushed the reset-tikz@expandcount branch from 5a56134 to 442b0d4 Compare January 1, 2021 20:03
@hmenke
Copy link
Member

hmenke commented Jan 2, 2021

@muzimuzhi What do you think about a9a0f97?

@muzimuzhi
Copy link
Member Author

very well, even impressive (except for the lua emulated \pgfsys@strcmp because I know little about luatex)

@muzimuzhi
Copy link
Member Author

@hmenke Are there any concerns that blocked this PR to be merged? Considering its current title, I think it has included well enough changes/improvements.

@hmenke
Copy link
Member

hmenke commented Jan 4, 2021

Should we discuss again the “\relax on a path” issue? We could add another case distinction like

{\relax}{\relax\tikz@scan@next@command}%

Which would reinsert \relax and continue scanning. Does that solve the \ifnum\x=\y\relax thing?

@muzimuzhi
Copy link
Member Author

Ah, I mistakenly though the \relax would be handled in another PR.

Yes I guess that would solve the \ifnum... thing, and will test it soon. Noticed \par is already handled as {\par}{\tikz@scan@next@command}, using {\relax}{\relax\tikz@scan@next@command} looks convincing.

@muzimuzhi muzimuzhi force-pushed the reset-tikz@expandcount branch from 5ba4f1c to 8d3f64d Compare January 4, 2021 16:51
@hmenke
Copy link
Member

hmenke commented Jan 4, 2021

TeX Live failed to update. Let's see if rerunning helps.

@hmenke hmenke merged commit 70f814b into pgf-tikz:master Jan 4, 2021
@muzimuzhi muzimuzhi deleted the reset-tikz@expandcount branch January 4, 2021 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

tikz should reset \tikz@expandcount more frequent
2 participants