We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46ac87e commit 14a5900Copy full SHA for 14a5900
lib/matplotlib/backends/backend_pgf.py
@@ -44,18 +44,18 @@ def _get_preamble():
44
r"\everymath=\expandafter{\the\everymath\displaystyle}",
45
# Allow pgf.preamble to override the above definitions.
46
mpl.rcParams["pgf.preamble"],
47
- r"\ifdefined\pdftexversion\else % non-pdftex case.",
48
- r" \usepackage{fontspec}",
49
*([
+ r"\ifdefined\pdftexversion\else % non-pdftex case.",
+ r" \usepackage{fontspec}",
50
+ ] + [
51
r" \%s{%s}[Path=\detokenize{%s/}]"
52
% (command, path.name, path.parent.as_posix())
53
for command, path in zip(
54
["setmainfont", "setsansfont", "setmonofont"],
55
[pathlib.Path(fm.findfont(family))
56
for family in ["serif", "sans\\-serif", "monospace"]]
57
)
- ] if mpl.rcParams["pgf.rcfonts"] else []),
58
- r"\fi",
+ ] + [r"\fi"] if mpl.rcParams["pgf.rcfonts"] else []),
59
# Documented as "must come last".
60
mpl.texmanager._usepackage_if_not_loaded("underscore", option="strings"),
61
])
0 commit comments