Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix mathtext rendering of\| and sizing of| and\|#24239

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
anntzer merged 1 commit intomatplotlib:mainfromoscargus:mathtextbar
Oct 31, 2022

Conversation

oscargus
Copy link
Member

@oscargusoscargus commentedOct 21, 2022
edited
Loading

PR Summary

Closes#23250

(Implements the less controversial part of#23685)

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

@QuLogic
Copy link
Member

Since we have to update the test image, maybe we can drop the extra\Vert and\vert at the end? At least, I think those are redundant with the first two.

@oscargus
Copy link
MemberAuthor

I think the idea is to test\left and\right in combination with these. However, it doesn't really make sense for a single letter. I'll update the first to consider a fraction instead (to clearly illustrate a bug in | not being resized).

@oscargus
Copy link
MemberAuthor

oscargus commentedOct 24, 2022
edited
Loading

The new test images illustrates some of the issues, but others are missed. So the question is if we should also add tests for a single letter with\left/\right etc? For cm the bars are adjusted down in size for a.

Maybe@anntzer can weigh in on relevant test cases?

@oscargus
Copy link
MemberAuthor

oscargus commentedOct 24, 2022
edited
Loading

It seems like getting rid of the following line sorts out the sizing, but I have not checked what else it breaks...

@anntzer
Copy link
Contributor

anntzer commentedOct 24, 2022
edited
Loading

I'll try to have a look, but can't do it right now.

oscargus reacted with thumbs up emoji

@oscargus
Copy link
MemberAuthor

Figured out a way to get the vertical bar size correct.#23250 (comment)

Added a second commit with that change so that one can see the differences. The rationale is to scale if there are no alternatives (or rather only a single alternative).

(Make sure to squash the commits.)

@oscargusoscargus changed the titleFix mathtext rendering of\|Fix mathtext rendering of\| and sizing of| and\|Oct 24, 2022
@oscargus
Copy link
MemberAuthor

The drawback of the current approach of getting the size right is that the font size is changed, so wider bars, but probably still better than having too short ones...

@anntzer
Copy link
Contributor

Looks good to me; just need a squash.

@anntzeranntzer merged commitea98aec intomatplotlib:mainOct 31, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@anntzeranntzeranntzer approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect mathtext rendering ofr"$\|$" with default (dejavu) math fontfamily
4 participants
@oscargus@QuLogic@anntzer@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp