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

Skip to content

Commit 2016c6e

Browse files
committed
Update whats_new to be more vocal about mathtext.default settings
1 parent 96f019f commit 2016c6e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

doc/release/next_whats_new/mathnormal.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ Mathtext distinguishes *italic* and *normal* font
22
-------------------------------------------------
33

44
Matplotlib's lightweight TeX expression parser (``usetex=False``) now distinguishes between *italic* and *normal* math fonts to closer replicate the behaviour of LaTeX.
5-
Italic font is selected with ``\mathit``, whereas the normal math font is selected by default in math environment but can be explicitly set with the new ``\mathnormal`` command.
5+
The normal math font is selected by default in math environment (unless the rcParam ``mathtext.default`` is overwritten) but can be explicitly set with the new ``\mathnormal`` command. Italic font is selected with ``\mathit``.
66
The main difference is that *italic* produces italic digits, whereas *normal* produces upright digits. Previously, it was not possible to typeset italic digits.
7+
Note that ``normal`` now corresponds to what used to be ``it``, whereas ``it`` now renders all characters italic.
8+
**Important**: In case the default mathematics font is overwritten by setting ``mathtext.default: it`` in ``matplotlibrc``, it must be either commented out or changed to ``mathtext.default: normal`` to preserve its behaviour. Otherwise, all alphanumeric characters, including digits, are rendered italic.
79

810
One difference to traditional LaTeX is that LaTeX further distinguishes between *normal* (``\mathnormal``) and *default math*, where the default uses roman digits and normal uses oldstyle digits. This distinction is no longer present with modern LaTeX engines and unicode-math nor in Matplotlib.

0 commit comments

Comments
 (0)