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

Skip to content

Commit 3832a4b

Browse files
committed
Try [strings] option for underscore pkg
1 parent 5343942 commit 3832a4b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/tests/test_usetex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_usetex_packages(pkg):
102102

103103
@pytest.mark.parametrize(
104104
"latex_statement",
105-
[r"\usepackage[full]{textcomp}", r"\usepackage[strings]{underscore}"],
105+
[r"\usepackage[full]{textcomp}", r"\usepackage{underscore}"],
106106
)
107107
def test_latex_pkg_already_loaded(latex_statement):
108108
plt.rcParams["text.latex.preamble"] = latex_statement

lib/matplotlib/texmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def _get_preamble(self):
176176
self.get_custom_preamble(),
177177
# Use `underscore` package to take care of underscores in text
178178
r"\makeatletter"
179-
r"\@ifpackageloaded{underscore}{}{\usepackage{underscore}}"
179+
r"\@ifpackageloaded{underscore}{}{\usepackage[strings]{underscore}}"
180180
r"\makeatother",
181181
# textcomp is loaded last (if not already loaded by the custom
182182
# preamble) in order not to clash with custom packages (e.g.

0 commit comments

Comments
 (0)