Skip to content

wide mathtext accents are mis-centered #19299

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

Open
anntzer opened this issue Jan 14, 2021 · 1 comment
Open

wide mathtext accents are mis-centered #19299

anntzer opened this issue Jan 14, 2021 · 1 comment
Labels
keep Items to be ignored by the “Stale” Github Action topic: text/mathtext

Comments

@anntzer
Copy link
Contributor

anntzer commented Jan 14, 2021

Bug report

Bug summary

All's in the title.

Code for reproduction

from pylab import *

figtext(.5, .5, r"$\widebar{abc} \qquad \mathrm{\widebar{abc}}$")

Actual outcome

test

Expected outcome

The bar should be correctly centered. (The italic version is still ok-ish, but the roman one is far too offset.)
Likewise for \widehat and \widetilde.

Matplotlib version

  • Operating system: linux
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): HEAD (3.3+)
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 3.9
  • Jupyter version (if applicable):
  • Other libraries:

From a quick look, this is due to the sym.width/4 horizontal correction added to an HCentered box in accent(). Indeed replacing centered by just accent_box appears to fix the issue... but now the italic correction is lost when using italics.

I think the correct solution likely implies doing an exegesis of node 12 of the TeXbook's appendix G (p442), or any of the articles linked at #18916 (comment).

@github-actions
Copy link

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Sep 29, 2023
@anntzer anntzer added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action labels Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Items to be ignored by the “Stale” Github Action topic: text/mathtext
Projects
None yet
Development

No branches or pull requests

1 participant