Skip to content

Fix eps + usetex combo. #17255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Fix eps + usetex combo. #17255

merged 1 commit into from
Apr 28, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 28, 2020

PR Summary

Closes #17253.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswell tacaswell merged commit 158d579 into matplotlib:master Apr 28, 2020
@tacaswell
Copy link
Member

Thank you for the quick fix @anntzer !

@lumberbot-app
Copy link

lumberbot-app bot commented Apr 28, 2020

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.2.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 158d5798cec90fa50851fb654fc7d872f8fad5f4
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #17255: Fix eps + usetex combo.'
  1. Push to a named branch :
git push YOURFORK v3.2.x:auto-backport-of-pr-17255-on-v3.2.x
  1. Create a PR against branch v3.2.x, I would have named this PR:

"Backport PR #17255 on branch v3.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

@tacaswell
Copy link
Member

This does not backport cleanly due to collisions with #16476

If I resolve the conflict in the obvious way

diff --git a/lib/matplotlib/texmanager.py b/lib/matplotlib/texmanager.py
index 1e788a64c..d8bf8ef13 100644
--- a/lib/matplotlib/texmanager.py
+++ b/lib/matplotlib/texmanager.py
@@ -219,7 +219,11 @@ class TexManager:
 \usepackage[papersize={72in,72in},body={70in,70in},margin={1in,1in}]{geometry}
 \pagestyle{empty}
 \begin{document}
-\fontsize{%f}{%f}%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._font_preamble, unicode_preamble, custom_preamble,
        fontsize, fontsize * 1.25, tex)

still results in the incorrect media box. I am unfortunately at the end of my expertise at this point.

@anntzer
Copy link
Contributor Author

anntzer commented Apr 28, 2020

I think that's because #16913 also needs to be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EPS + usetex is broken
4 participants