8000 Merge pull request #17255 from anntzer/epsusetex · tacaswell/matplotlib@746c691 · GitHub
[go: up one dir, main page]

Skip to content

Commit 746c691

Browse files
committed
Merge pull request matplotlib#17255 from anntzer/epsusetex
FIX: eps + usetex combo.
1 parent 76d114f commit 746c691

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/matplotlib/texmanager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ def make_tex(self, tex, fontsize):
228228
%s
229229
\pagestyle{empty}
230230
\begin{document}
231-
%% The empty hbox ensures that a page is printed even for empty inputs.
232-
\fontsize{%f}{%f}\hbox{}%s
231+
%% The empty hbox ensures that a page is printed even for empty inputs, except
232+
%% when using psfrag which gets confused by it.
233+
\fontsize{%f}{%f}%%
234+
\ifdefined\psfrag\else\hbox{}\fi%%
235+
%s
233236
\end{document}
234237
""" % (self._get_preamble(), fontsize, fontsize * 1.25, tex)
235238
with open(texfile, 'wb') as fh:

0 commit comments

Comments
 (0)
0