-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add missing operators code #26024
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
Add missing operators code #26024
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Is it in draft mode as some of these should also have proper spacing (#25933)?
I think the spacing is alright unless I missed something? |
I think that some of these operators should/could also go into the list that you modified in #25933. |
lib/matplotlib/_mathtext_data.py
Outdated
'leftangle' : 10216, | ||
'rightangle' : 10217, | ||
'langle' : 10216, | ||
'rangle' : 10217, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to collide with
matplotlib/lib/matplotlib/_mathtext_data.py
Lines 467 to 468 in 515cce4
'langle' : 0x27e8, | |
'rangle' : 0x27e9, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the rangle
and langle
I verified that both entries are the same, should I keep the decimal or the hex version?
(According to #26029, the whole list requires an overhaul for the formatting.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the hex is easier to read, but I am indifferent, my concern is just that we do not have two identical entries (very far from each other) in the file.
Can we at least smoke test that these work? |
Not sure what you mean here? We cannot really have tests for all symbols? The best thing is probably to check the doc build to see that they look OK? An option is of course to automatically generate an image of all defined symbols, but that would then require updating when new symbols are added. |
I may be a bit confused, but each of these can be accessed via |
Yes, these are all accessible through \XYZ. I am quite sure that some of the entries are tested, so the basic mechanism should be tested, just not that we test each and every dict-entry. |
Instead of generating new images, is it feasible to obtain the Mathtext output and check whether the |
To check the changes are not throwing an error, I've included a test for the newly added mathtext operators. Should I include all operators for check or is this sufficient for testing? |
PR summary
Closes #26015
Checking the LaTeX names for the corresponding Unicode values:
U+221F
is defined asrightangle
but there already exists arightangle
mapping which on checking is defined asrangle
in the LaTeX symbols docs.U+221B
andU+221C
are cube root and fourth root symbols which are presently not included in this list.PR checklist