Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f12f341

Browse filesBrowse files
committed
Minor maintenance on pgf docs/backends.
- Remove vague mention of outdated tex packages (first because it was written more than 10 years ago so packages too old for backend_pgf compatibility are unlikely to be seen nowadays, and second because if we don't actually provide compatibility bounds such a statement is not particularly useful). - Fix consistency between xetex/xelatex, and also for capitalization. - Remove an unnecessary encoding step in PdfPages by directly formatting bytes.
1 parent 2723052 commit f12f341
Copy full SHA for f12f341

File tree

Expand file treeCollapse file tree

2 files changed

+5
-13
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-13
lines changed

‎galleries/users_explain/text/pgf.py

Copy file name to clipboardExpand all lines: galleries/users_explain/text/pgf.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,6 @@
152152
Troubleshooting
153153
===============
154154
155-
* Please note that the TeX packages found in some Linux distributions and
156-
MiKTeX installations are dramatically outdated. Make sure to update your
157-
package catalog and upgrade or install a recent TeX distribution.
158-
159155
* On Windows, the :envvar:`PATH` environment variable may need to be modified
160156
to include the directories containing the latex, dvipng and ghostscript
161157
executables. See :ref:`environment-variables` and
@@ -175,7 +171,7 @@
175171
176172
* Configuring an ``unicode-math`` environment can be a bit tricky. The
177173
TeXLive distribution for example provides a set of math fonts which are
178-
usually not installed system-wide. XeTeX, unlike LuaLatex, cannot find
174+
usually not installed system-wide. XeLaTeX, unlike LuaLaTeX, cannot find
179175
these fonts by their name, which is why you might have to specify
180176
``\setmathfont{xits-math.otf}`` instead of ``\setmathfont{XITS Math}`` or
181177
alternatively make the fonts available to your OS. See this

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+4-8Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -995,14 +995,10 @@ def savefig(self, figure=None, **kwargs):
995995
# luatex<0.85; they were renamed to \pagewidth and \pageheight
996996
# on luatex>=0.85.
997997
self._file.write(
998-
(
999-
r'\newpage'
1000-
r'\ifdefined\pdfpagewidth\pdfpagewidth'
1001-
fr'\else\pagewidth\fi={width}in'
1002-
r'\ifdefined\pdfpageheight\pdfpageheight'
1003-
fr'\else\pageheight\fi={height}in'
1004-
'%%\n'
1005-
).encode("ascii")
998+
rb'\newpage'
999+
rb'\ifdefined\pdfpagewidth\pdfpagewidth\else\pagewidth\fi=%fin'
1000+
rb'\ifdefined\pdfpageheight\pdfpageheight\else\pageheight\fi=%fin'
1001+
b'%%\n' % (width, height)
10061002
)
10071003
figure.savefig(self._file, format="pgf", backend="pgf", **kwargs)
10081004
self._n_figures += 1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.