Skip to content

Commit d4fc88d

Browse files
authored
Merge pull request #28811 from meeseeksmachine/auto-backport-of-pr-28810-on-v3.9.x
Backport PR #28810 on branch v3.9.x (Document how to obtain sans-serif usetex math.)
2 parents aefdb60 + 5fa2a00 commit d4fc88d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

galleries/users_explain/text/usetex.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@
102102
:rc:`text.usetex`. As noted above, underscores (``_``) do not require
103103
escaping outside of math mode.
104104
105+
.. note::
106+
LaTeX always defaults to using a serif font for math (even when
107+
``rcParams["font.family"] = "sans-serif"``). If desired, adding
108+
``\usepackage{sfmath}`` to ``rcParams["text.latex.preamble"]`` lets LaTeX
109+
output sans-serif math.
110+
105111
PostScript options
106112
==================
107113
@@ -129,19 +135,13 @@
129135
:ref:`setting-windows-environment-variables` for details.
130136
131137
* Using MiKTeX with Computer Modern fonts, if you get odd \*Agg and PNG
132-
results, go to MiKTeX/Options and update your format files
138+
results, go to MiKTeX/Options and update your format files.
133139
134140
* On Ubuntu and Gentoo, the base texlive install does not ship with
135141
the type1cm package. You may need to install some of the extra
136142
packages to get all the goodies that come bundled with other LaTeX
137143
distributions.
138144
139-
* Some progress has been made so Matplotlib uses the dvi files
140-
directly for text layout. This allows LaTeX to be used for text
141-
layout with the pdf and svg backends, as well as the \*Agg and PS
142-
backends. In the future, a LaTeX installation may be the only
143-
external dependency.
144-
145145
.. _usetex-troubleshooting:
146146
147147
Troubleshooting
@@ -150,7 +150,7 @@
150150
* Try deleting your :file:`.matplotlib/tex.cache` directory. If you don't know
151151
where to find :file:`.matplotlib`, see :ref:`locating-matplotlib-config-dir`.
152152
153-
* Make sure LaTeX, dvipng and ghostscript are each working and on your
153+
* Make sure LaTeX, dvipng and Ghostscript are each working and on your
154154
:envvar:`PATH`.
155155
156156
* Make sure what you are trying to do is possible in a LaTeX document,
@@ -159,8 +159,7 @@
159159
160160
* :rc:`text.latex.preamble` is not officially supported. This
161161
option provides lots of flexibility, and lots of ways to cause
162-
problems. Please disable this option before reporting problems to
163-
the mailing list.
162+
problems. Please disable this option before reporting problems.
164163
165164
* If you still need help, please see :ref:`reporting-problems`.
166165

0 commit comments

Comments
 (0)