Skip to content

Don't bother checking luatex's version. #11228

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
May 14, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 11, 2018

Depending on the version of luatex, the pgf backend would either emit
\pdfpagewidth or \pagewidth. Instead of explicitly checking the version
of luatex (which requires additional code to parse the output of
--version, and is brittle to (admittedly unlikely) possible future other
changes in luatex or xetex), just emit some TeX code that emits
whichever primitive is defined.

(https://tex.stackexchange.com/a/31658/4101 for the terrifying TeXnical details)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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

Depending on the version of luatex, the pgf backend would either emit
\pdfpagewidth or \pagewidth.  Instead of explicitly checking the version
of luatex (which requires additional code to parse the output of
--version, and is brittle to (admittedly unlikely) possible future other
changes in luatex or xetex), just emit some TeX code that emits
whichever primitive is defined.
@anntzer anntzer added this to the v3.0 milestone May 11, 2018
@tacaswell tacaswell requested a review from pwuertz May 11, 2018 03:42
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditional on @pwuertz

Copy link
Contributor

@pwuertz pwuertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its one of those instances where removing a bunch of code turns out to be a way better solution (if you are willing to start coding with TeX :D )

@timhoffm timhoffm merged commit eb625c4 into matplotlib:master May 14, 2018
@anntzer anntzer deleted the luatexversion branch May 15, 2018 00:52
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.

4 participants