Skip to content

Deprecate ismath parameter to draw_tex and ismath="TeX!". #17484

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 26, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented May 22, 2020

This parameter is a bit confusing for backend implementers and actually
effectively ignored (because draw_tex() already means "pass the entire
string to usetex).

Calling through draw_tex() was the only way, previously, to get
ismath="TeX!" passed to get_text_width_height_descent (other than
calling it manually), but that was handled identically to
ismath="TeX" by some backends and just not supported by others.
Again, folding "TeX!" into "TeX" makes the required API simpler for
backend implementers.

PR Summary

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

@anntzer anntzer added this to the v3.3.0 milestone May 22, 2020
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Minor stylistic issue.

This parameter is a bit confusing for backend implementers and actually
effectively ignored (because draw_tex() already means "pass the entire
string to usetex).

Calling through draw_tex() was the only way, previously, to get
`ismath="TeX!"` passed to `get_text_width_height_descent` (other than
calling it manually), but that was handled identically to
`ismath="TeX"` by some backends and just not supported by others.
Again, folding "TeX!" into "TeX" makes the required API simpler for
backend implementers.
@anntzer
Copy link
Contributor Author

anntzer commented May 24, 2020

yup

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Anybody can merge after CI pass.

@QuLogic QuLogic merged commit 69e651f into matplotlib:master May 26, 2020
@anntzer anntzer deleted the ismath_tex branch May 26, 2020 05:31
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