File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,9 +144,16 @@ commands such as fractions or sub/superscripts::
144144 Fonts
145145-----
146146
147- The default font is *italics * for mathematical symbols. To change
148- fonts, eg, to write "sin" in a Roman font, enclose the text in a font
149- command::
147+ The default font is *italics * for mathematical symbols.
148+
149+ .. note ::
150+
151+ This default can be changed using the ``mathtext.default `` rcParam.
152+ This is useful, for example, to use the same font as regular
153+ non-math text for math text, by setting it to ``regular ``.
154+
155+ To change fonts, eg, to write "sin" in a Roman font, enclose the text
156+ in a font command::
150157
151158 r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$'
152159
@@ -223,6 +230,12 @@ selected using the ``mathtext.fontset`` parameter in
223230
224231.. image :: ../_static/stixsans_fontset.png
225232
233+ Additionally, you can use ``\mathdefault{...} `` or its alias
234+ ``\mathregular{...} `` to use the font used for regular text outside of
235+ mathtext. There are a number of limitations to this approach, most
236+ notably that far fewer symbols will be available, but it can be useful
237+ to make math expressions blend well with other text in the plot.
238+
226239Custom fonts
227240~~~~~~~~~~~~
228241
You can’t perform that action at this time.
0 commit comments