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

pgfmath: reset " catcode inside parser #1070

Closed
wants to merge 1 commit into from

Conversation

hmenke
Copy link
Member

@hmenke hmenke commented Nov 2, 2021

Motivation for this change

Fixes #1062

This will prevent the use of babel hyphens in pgfmath quoted text, but I'm pretty sure that this is a very niche use-case. See also discussion in the issue thread.

Checklist

Please signoff your commits to explicitly state your agreement to the Developer Certificate of Origin. If that is not possible you may check the boxes below instead:

Copy link
Member

@muzimuzhi muzimuzhi left a comment

Choose a reason for hiding this comment

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

This won't fix use cases when the math expression is already tokenized before being parsed by pgfmath, hence I doubt if this really "fixes" #1062.

To allow an active quote as operator, more tricks are needed.

@hmenke
Copy link
Member Author

hmenke commented Nov 3, 2021

@muzimuzhi I've update the approach. Now the parser is scanning for active ", but I wonder whether we have to generalize this for all the other special characters as well. Maybe a catcode-agnostic string comparison would be more appropriate in most places. This, however, will require some large refactoring and we should wait with this until we have the testsuite running.

@hmenke
Copy link
Member Author

hmenke commented Nov 11, 2021

Superseded by #1073

@hmenke hmenke closed this Nov 11, 2021
@hmenke hmenke deleted the pgfmath-quotes branch November 11, 2021 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

PGFMath not parsing {"two"}[0] with \usetikzlibrary{babel}
2 participants