-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Tweak mathtext/tex docs. #22364
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
Tweak mathtext/tex docs. #22364
Conversation
Times and Palatino each have their own accompanying math fonts, while the other | ||
Adobe serif fonts make use of the Computer Modern math fonts. | ||
|
||
To enable LaTeX and select a font, use e.g.:: |
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 isn't terribly clear terminology, so maybe needs a bit more explanation. Is "font.family": "Helvetica" supposed to be a shortcut or are we claiming "Helvetica" is actually a font family? To me a "font family" is a set of fonts that provides serif/sans-serif/different weights, etc. But thats not how we are using it here?
Given that most folks using usetex are probably familiar with this from latex, is it not helpful to state explicitly what package is used?
I'm not sure this change is right or desirable, though the previous text could be fixed as well...
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.
"Helvetica" is a "font family" (see e.g. https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) (it's a called a family because it can exist in bold/italic/etc.). Note that this is like setting font.family: DejaVu Sans
in non-usetex mode. This terminology is also consistent with tex (see e.g. table 3 in http://mirrors.ctan.org/macros/latex/required/psnfss/psnfss2e.pdf). I slightly tweaked the wording, does it help?
I made the change because this was describing a relatively more complex way to set the font, whereas a simpler approach is now available.
I agreed that listing the tex packages is probably helpful, now done.
"power-cycled" to re-run CI against current main. |
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.
Anyone can merge on green.
Doesn't seem to have re-run docs; maybe a rebase would do? |
- Fix typos/mismatched parentheses/markup in mathtext.py. - Make the title of pgf.py consistent with the title of usetex.py. - Prefer "modern" approach for setting fonts in usetex.py, but keep the old approach around (as the new API is only on Matplotlib 3.5). - Clarify non-standard tex settings.
rebased. |
old approach around (as the new API is only on Matplotlib 3.5).
PR Summary
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).