@@ -1232,7 +1232,8 @@ def _preprocess_math(self, s):
1232
1232
- If *self* is configured to use TeX, return *s* unchanged except that
1233
1233
a single space gets escaped, and the flag "TeX".
1234
1234
- Otherwise, if *s* is mathtext (has an even number of unescaped dollar
1235
- signs), return *s* and the flag True.
1235
+ signs) and ``parse_math`` is not set to False, return *s* and the
1236
+ flag True.
1236
1237
- Otherwise, return *s* with dollar signs unescaped, and the flag
1237
1238
False.
1238
1239
"""
@@ -1281,21 +1282,18 @@ def get_usetex(self):
1281
1282
1282
1283
def set_parse_math (self , parse_math ):
1283
1284
"""
1284
- Override switch to enable/disable any mathtext
1285
- parsing for the given `Text` object.
1285
+ Override switch to disable any mathtext parsing for this `Text`.
1286
1286
1287
1287
Parameters
1288
1288
----------
1289
1289
parse_math : bool
1290
- Whether to consider mathtext parsing for the string
1290
+ If False, this `Text` will never use mathtext. If True, mathtext
1291
+ will be used if there is an even number of unescaped dollar signs.
1291
1292
"""
1292
1293
self ._parse_math = bool (parse_math )
1293
1294
1294
1295
def get_parse_math (self ):
1295
- """
1296
- Return whether mathtext parsing is considered
1297
- for this `Text` object.
1298
- """
1296
+ """Return whether mathtext parsing is considered for this `Text`."""
1299
1297
return self ._parse_math
1300
1298
1301
1299
def set_fontname (self , fontname ):
0 commit comments