Skip to content
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

mathtext: Fix bugs in conversion of apostrophes to primes #5880

Merged
merged 2 commits into from Jan 25, 2016

Conversation

zblz
Copy link
Member

@zblz zblz commented Jan 19, 2016

  • Fix mathtext mishandling of certain exponents #5864: wrong typesetting of $''/yr$ by recognising apostrophes in first position as part of the superscript.
  • Fix the width of the superscript block when generated from apostrophes. For some reason the Hlist.extend method does not recompute the kerning (so in strings like $f''''(x)$ the primes would overrun the parens and the x), so I added an hpack() and kern() calls after extending.

I also modified an existing test to include the two bugs fixed.

@QuLogic
Copy link
Member

QuLogic commented Jan 19, 2016

This is really minor, but it seems like with the serif font, the f and single prime are slightly closer together than with triple primes. Is there some ligature invoked there?

@zblz
Copy link
Member Author

zblz commented Jan 20, 2016

@QuLogic - There is indeed a slight difference in the dejavuserif version. However, it is also present when typesetting it with \prime instead of apostrophes, so it is not related to the things done in this PR. Note that italics f are particularly troublesome with respect to kerning; see #4987.

@zblz
Copy link
Member Author

zblz commented Jan 23, 2016

ping @mdboom

@mdboom mdboom added this to the Critical bug fix release (1.5.2) milestone Jan 25, 2016
mdboom added a commit that referenced this pull request Jan 25, 2016
mathtext: Fix bugs in conversion of apostrophes to primes
@mdboom mdboom merged commit d0186ac into matplotlib:master Jan 25, 2016
mdboom added a commit that referenced this pull request Jan 25, 2016
mathtext: Fix bugs in conversion of apostrophes to primes
@mdboom
Copy link
Member

mdboom commented Jan 25, 2016

Backported to v1.5.x as cd866e9

tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request May 22, 2016
mathtext: Fix bugs in conversion of apostrophes to primes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mathtext mishandling of certain exponents
3 participants