From b63a2df2c660be70c885cd58edc784c396330166 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 6 Jul 2020 08:09:15 +0200 Subject: [PATCH] Remove overspecified latex geometry. The geometry package derives `body` from `papersize` and `margin`. Even though the value given for `body` is consistent (`papersize - 2*margin`), giving all three of them yields a warning in the tex log (which can be seen e.g. when processing an invalid tex string in usetex mode (e.g. `figtext(.5, .5, r"\foo")`): ``` Package geometry Warning: Over-specification in `h'-direction. `width' (5058.9pt) is ignored. Package geometry Warning: Over-specification in `v'-direction. `height' (5058.9pt) is ignored. ``` Just get rid of the overspecification. --- lib/matplotlib/texmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/texmanager.py b/lib/matplotlib/texmanager.py index 37ea69e39e65..254a36fb8e34 100644 --- a/lib/matplotlib/texmanager.py +++ b/lib/matplotlib/texmanager.py @@ -190,7 +190,7 @@ def _get_preamble(self): r"\DeclareUnicodeCharacter{2212}{\ensuremath{-}}", # geometry is loaded before the custom preamble as convert_psfrags # relies on a custom preamble to change the geometry. - r"\usepackage[papersize=72in,body=70in,margin=1in]{geometry}", + r"\usepackage[papersize=72in, margin=1in]{geometry}", self.get_custom_preamble(), # textcomp is loaded last (if not already loaded by the custom # preamble) in order not to clash with custom packages (e.g.