From 62ed34fff33bea661ed361a190f12f07b9bd1155 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 28 Apr 2020 12:49:20 +0200 Subject: [PATCH] Fix eps + usetex combo. --- lib/matplotlib/texmanager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/texmanager.py b/lib/matplotlib/texmanager.py index 3badbbc21117..ac0b9c6b6dd4 100644 --- a/lib/matplotlib/texmanager.py +++ b/lib/matplotlib/texmanager.py @@ -208,8 +208,11 @@ def make_tex(self, tex, fontsize): %s \pagestyle{empty} \begin{document} -%% The empty hbox ensures that a page is printed even for empty inputs. -\fontsize{%f}{%f}\hbox{}%s +%% The empty hbox ensures that a page is printed even for empty inputs, except +%% when using psfrag which gets confused by it. +\fontsize{%f}{%f}%% +\ifdefined\psfrag\else\hbox{}\fi%% +%s \end{document} """ % (self._get_preamble(), fontsize, fontsize * 1.25, fontcmd % tex), encoding='utf-8')