FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Thin space missing after mathtext operators · Issue #17852 · matplotlib/matplotlib · GitHub

Repository navigation

Thin space missing after mathtext operators #17852

Closed

Description

Bug report

Bug summary

Mathtext operators (\log, \max, etc.) should insert a thin space after themselves (if followed by ordinary characters, not if followed by an open parenthesis, see https://tex.stackexchange.com/questions/225922/spacing-rules-for-operatorname/225924#225924), but currently it does not.

Code for reproduction

from pylab import *
figtext(.5, .6, r"$\log 6$ (usetex)", usetex=True)
figtext(.5, .5, r"$\log 6$ (current)")
figtext(.5, .4, r"$\mathdefault{log}\,6$ (manual thin space)")
figtext(.5, .3, r"$\mathdefault{log}\ 6$ (manual full space)")
show()

Actual outcome


Note the missing thin space between "g" and "6" in the current behavior.

Matplotlib version

  • Operating system: fedora
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 38
  • Jupyter version (if applicable):
  • Other libraries:

Activity

  1. added this to the v3.4.0 milestone on Jul 7, 2020
  2. added
    Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Jul 7, 2020
  3. tacaswell commented on Jul 7, 2020

    Member

    Labeled this as hard because the fix is going to involve diving into the tex parser in https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/mathtext.py but good first issue because there is no API design and should not require any changes outside of the mathtext.py.

  4. jkseppan commented on Jul 27, 2020

    Member

    Is this done since #17890 was merged?

  5. anntzer commented on Jul 27, 2020

    ContributorAuthor

    I think sub/superscript handling is still a problem (#17890 (comment)).

  6. modified the milestones: v3.4.0, v3.5.0 on Jan 27, 2021
  7. modified the milestones: v3.5.0, v3.6.0 on Sep 25, 2021
  8. oscargus commented on Jun 13, 2022

    Member

    Closed by #23243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuestopic: text/mathtext🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL