Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d17bfe8

Browse files
authored
Merge pull request #27017 from jklymak/doc-clarify-usetex-mathtext
DOC: clarify usetex versus mathtext
2 parents 4aa7efe + 7d89a38 commit d17bfe8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

doc/users/prev_whats_new/whats_new_3.8.0.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ This allows users to set the location of the legend in a more flexible and consi
327327
Mathtext improvements
328328
=====================
329329

330+
Improvements are to Mathtext, Matplotlib's native TeX-like mathematics parser
331+
(see :ref:`mathtext`, not to be confused with Matplotlib using LaTeX directly:
332+
:ref:`usetex`).
333+
330334
Boldsymbol mathtext command ``\boldsymbol``
331335
-------------------------------------------
332336

galleries/users_explain/text/mathtext.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
================================
99
1010
Matplotlib implements a lightweight TeX expression parser and layout engine and
11-
*Mathtext* is the subset of Tex markup that this engine supports. Any string can
12-
be processed as Mathtext by placing the string inside a pair of dollar signs
13-
``'$'``. Mathtext often contains many backslashes ``'\'``; so that the backslashes
14-
do not need to be escaped, Mathtext is often written using raw strings. For
15-
example:
11+
*Mathtext* is the subset of Tex markup that this engine supports. Note that
12+
Matplotlib can also render all text directly using TeX if :rc:`text.usetex` is
13+
*True*; see :ref:`usetex` for more details. Mathtext support is available
14+
if :rc:`text.usetex` is *False*.
15+
16+
Any string can be processed as Mathtext by placing the string inside a pair of
17+
dollar signs ``'$'``. Mathtext often contains many backslashes ``'\'``; so that
18+
the backslashes do not need to be escaped, Mathtext is often written using raw
19+
strings. For example:
1620
"""
1721

1822
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)