-
-
Notifications
You must be signed in to change notification settings - Fork 290
Some matplotlib
mathtext yields a ParseFatalException
#318
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
Comments
This is a change from 2.4.7. ParseFatalExceptions were changed to actually be immediately fatal, rather than checking another alternative to see if it might be a match. In the case of this expression, "\cdot" is parsed as a This behavior (where ParseFatalException was not immediately reraised) has been this way for a long time, but was raised as an issue this past summer. I think the current behavior is the correct behavior for a ParseFatalException, but perhaps could be modified if mathtext raises a ParseSyntaxException (this would still require code change in pyparsing). I may just push out a 3.0.2 with this particular fix reverted, with a longer-term plan to get this working correctly. |
Note that this was already fixed (empirically...) in mpl master by https://github.com/matplotlib/matplotlib/pull/21454/files. I'm not really sure I understand your explanation, though, as we fixed that on symbol_name, rather than on single_symbol? |
Is this resolved now? |
We are trying to decide on the right fix on Matplotlib's side, perhaps you can comment on matplotlib/matplotlib#21606? |
Any further requirements on pyparsing here (other than "please stop breaking our stuff by making internal changes in pyparsing")? |
I think everything is good on Matplotlib's side now. |
Thanks, closing |
Minimal example
presently fails with
ParseFatalException: Unknown symbol: \cdot, found '\' (at char 2), (line:1, col:3)
.Looking at the
matplotlib
docs, this seems to be somehow related to their use ofpyparsing
https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/_mathtext.py#L15.The text was updated successfully, but these errors were encountered: