Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Synchronize mathtext docs and handling#26173
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
oscargus commentedJun 23, 2023
Another change is that the extension prints the rendered symbols as above. Which clearly showed that |
oscargus commentedJun 23, 2023
The failing test is because mathtext adds space around the "spaced operators" in subscripts as well, while LaTeX doesn't. ( |
oscargus commentedJun 23, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Here is the outcome:https://output.circle-artifacts.com/output/job/0c35025a-735d-4800-a574-b790431306bd/artifacts/0/doc/build/html/users/explain/text/mathtext.html A bit annoyingly *, +, and - are all interpreted as list bullets... |
7abdc11 to8f656baCompareQuLogic commentedJul 6, 2023
Should maybe be fixed? Perhaps a backslash prefix will work? |
| _mathtext.Parser._arrow_symbols], | ||
| ["Dot symbols", | ||
| 4, | ||
| r"""\cdots \vdots \ldots \ddots \adots \Colon \therefore \because""".split()], |
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.
Aren'ttherefore andbecause in Relation operators?
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.
Yes, they are. As well.
I just saw some table with "dot symbols" somewhere (do not remember where, maybe the "List of LaTeX symbols..." or whatever it is called), where they were included, so thought that it may make sense. Easy to modify though.
oscargus commentedJul 7, 2023
Indeed. Just had no idea how to obtain it. Have tried to read up, but haven't found anything. I guess making an HTML table directly is a way to go though? |
QuLogic commentedJul 7, 2023
Usually, a backslash before characters will stop reST from treating them as whatever markup, so pretty sure that'll work for the bullets as well. |
d52726a tod7f95e6Compareoscargus commentedJul 13, 2023
Fixed. Seems to work. |
oscargus commentedAug 9, 2023
I think this should go in 3.8 since there are "half-made" changes towards this and this is the final step. |
| 'O' :216, | ||
| 'hookleftarrow' :8617, | ||
| 'trianglerighteq' :8885, | ||
| 'nsime' :8772, |
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.
Has this just been wrong from 2006 ?!
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 guess so. However, I do not think it was documented so I wonder if someone ever used it?
tacaswell left a comment
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 have some concern about thensime ->nsimeq change, however it appears thatnsimeq is the correct symbol.
https://milde.users.sourceforge.net/LUCR/Math/mathpackages/txfonts-symbols.pdf
If we need an API change note, we can add that in a follow up PR.
| 'hermitmatrix' :8889, | ||
| 'barvee' :8893, | ||
| 'measuredrightangle' :8894, | ||
| 'varlrtriangle' :8895, |
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 looks to have been correct?lrtriangle is U+25ff (9727) andvarlrtriangle is U+22bf (8895).
reference:https://ctan.mirrors.hoobly.com/fonts/stix/doc/stix.pdf
Both are triangles, but stix assigns this the same as the old name
lib/matplotlib/_mathtext_data.py Outdated
| 'barvee' :8893, | ||
| 'measuredrightangle' :8894, | ||
| 'varlrtriangle' :8895, | ||
| 'lrtriangle' :8895, |
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.
| 'lrtriangle' :8895, | |
| 'varlrtriangle' :8895, |
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'll add lrtriangle then. DIdn't make sense to have varlrtriangle if we don't have lrtriangle...
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'm wondering if one should script the source of the STIX documentation and add all those symbols? The problem is just to add them to the documentation...
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.
Reverted to varlrtriangle. Any additional symbols will be in another PR.
| \cup \triangleright \ddagger | ||
| \uplus \lhd \amalg | ||
| \dotplus \dotminus'''.split()) | ||
| \dotplus \dotminus \Cap |
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 is going to change how some things render, do we need a note about this?
ksunden commentedAug 10, 2023
The doc build seems to still be getting Seems to be due to matplotlib/doc/sphinxext/math_symbol_table.py Lines 79 to 80 in655ec51
Probably the thing to do is to add just this one here. |
oscargus commentedAug 10, 2023
Ah, that may have been an additional reason for the name change... |
oscargus commentedAug 12, 2023
This is updated |
…173-on-v3.8.xBackport PR#26173 on branch v3.8.x (Synchronize mathtext docs and handling)
Uh oh!
There was an error while loading.Please reload this page.
PR summary
Solves parts of#26174 (second commit).
This sort of guarantees that (at least in a while), there will be no discrepancy between which symbols are supported and that those are supported correctly. That is, if a symbol is listed as a relational operator, there will be spaces surrounding it.
Also adds a few new sections to the supported symbols list. Not sure if "Western Europe" is the best description for å, Å etc (although they are used in Swedish and some of the other are used in Norwegian etc.).
Listed directly supported script, fraktur and black board characters. If nothing else to see which works and which should maybe be added...
The ones that are not yet added are:
The accents should probably be removed as they are handled separately. For example
ddotis mapped tocombiningdiaeresis.Then, one may wonder if we want to openly state that we support
\plusrather than simply using+?PR checklist