Skip to content

Backport PR #28810 on branch v3.9.x (Document how to obtain sans-serif usetex math.) #28811

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions galleries/users_explain/text/usetex.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
:rc:`text.usetex`. As noted above, underscores (``_``) do not require
escaping outside of math mode.

.. note::
LaTeX always defaults to using a serif font for math (even when
``rcParams["font.family"] = "sans-serif"``). If desired, adding
``\usepackage{sfmath}`` to ``rcParams["text.latex.preamble"]`` lets LaTeX
output sans-serif math.

PostScript options
==================

Expand Down Expand Up @@ -129,19 +135,13 @@
:ref:`setting-windows-environment-variables` for details.

* Using MiKTeX with Computer Modern fonts, if you get odd \*Agg and PNG
results, go to MiKTeX/Options and update your format files
results, go to MiKTeX/Options and update your format files.

* On Ubuntu and Gentoo, the base texlive install does not ship with
the type1cm package. You may need to install some of the extra
packages to get all the goodies that come bundled with other LaTeX
distributions.

* Some progress has been made so Matplotlib uses the dvi files
directly for text layout. This allows LaTeX to be used for text
layout with the pdf and svg backends, as well as the \*Agg and PS
backends. In the future, a LaTeX installation may be the only
external dependency.

.. _usetex-troubleshooting:

Troubleshooting
Expand All @@ -150,7 +150,7 @@
* Try deleting your :file:`.matplotlib/tex.cache` directory. If you don't know
where to find :file:`.matplotlib`, see :ref:`locating-matplotlib-config-dir`.

* Make sure LaTeX, dvipng and ghostscript are each working and on your
* Make sure LaTeX, dvipng and Ghostscript are each working and on your
:envvar:`PATH`.

* Make sure what you are trying to do is possible in a LaTeX document,
Expand All @@ -159,8 +159,7 @@

* :rc:`text.latex.preamble` is not officially supported. This
option provides lots of flexibility, and lots of ways to cause
problems. Please disable this option before reporting problems to
the mailing list.
problems. Please disable this option before reporting problems.

* If you still need help, please see :ref:`reporting-problems`.

Expand Down