-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: matplotlib 3.8: new mathtext feature "\text" fails. #26968
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
You are running with usetex = True, in which case you need to add something like |
@anntzer Yes, that fixes it. Thanks! |
Is https://matplotlib.org/devdocs/users/explain/text/text_intro.html the best place to add this note, maybe in addition to the release notes? Or perhaps https://matplotlib.org/devdocs/users/explain/text/usetex.html? |
I guess that there are two things here:
Maybe this should be formulated differently (if we now want to officially support it). I am not really sure what @anntzer is referring to though. For the release note, the only thing I can see is to add the work "mathtext" to the text (and not just in the heading)? |
There is also https://matplotlib.org/devdocs/users/explain/text/mathtext.html which is focusing on mathtext (although the title doesn't really say so), but at the same time most parts of it works as a LaTeX guide. |
"Mathtext" is our jargon, so not really clear in the links above that it means I'm not sure if the jargon is defined anywhere explicitly. It should be. Probably https://matplotlib.org/devdocs/users/explain/text/mathtext.html is the right place. |
@2sn I'm assuming you are actually have |
We could have a list of tex commands we support in mathtext, and, for each of them, whether they need an additional usepackage to be used with usetex. |
@anntzer, I think "mathtext" refers to our built-on math handling, which doesn't interact with LaTeX packages in any way? |
It doesn't, but it does emulate certain features provided by e.g. |
Oh I see - I mis-parsed his sentence. |
Bug summary
It seems for me the most welcomed
\text
command inmathtext
does not seem to work (yet).At least not out of the box.
My apologies if I am just missing something.
Code for reproduction
Actual outcome
Expected outcome
the figure from
https://matplotlib.org/stable/users/prev_whats_new/whats_new_3.8.0.html#mathtext-now-supports-text
Additional information
fresh start, nothing else (all my matplotlib 3.7 code seems to work)
Operating system
Fedora 38
Matplotlib Version
3.8.0
Matplotlib Backend
GTK4Agg
Python version
3.11.4 (build from source)
Jupyter version
IPython 8.16.0
Installation
pip
The text was updated successfully, but these errors were encountered: