GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Thin space missing after mathtext operators · Issue #17852 · matplotlib/matplotlib

Thin space missing after mathtext operators #17852

New issue
Copy link
New issue
Copy link
Closed
Closed
Thin space missing after mathtext operators#17852
Copy link
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://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!Open a pull request against these issues if there are no active ones!
Milestone
v3.6.0

Description

@anntzer
anntzer
opened on Jul 7, 2020
Issue body actions

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

out
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. anntzer
    added
    topic: text/mathtext
    on Jul 7, 2020
  2. tacaswell
    added this to the v3.4.0 milestone on Jul 7, 2020
  3. tacaswell
    added
    Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!
    on Jul 7, 2020
  4. tacaswell commented on Jul 7, 2020

    @tacaswell
    tacaswell
    on Jul 7, 2020
    Member
    More actions

    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.

  5. jkseppan commented on Jul 27, 2020

    @jkseppan
    jkseppan
    on Jul 27, 2020
    Member
    More actions

    Is this done since #17890 was merged?

  6. anntzer commented on Jul 27, 2020

    @anntzer
    anntzer
    on Jul 27, 2020
    ContributorAuthor
    More actions

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

  7. QuLogic
    modified the milestones: v3.4.0, v3.5.0 on Jan 27, 2021
  8. QuLogic
    modified the milestones: v3.5.0, v3.6.0 on Sep 25, 2021
  9. timhoffm
    added 2 commits that reference this issue on Jun 10, 2022

    Fix spacing after mathtext operators with sub/superscripts

    0380a24

    Fix spacing after mathtext operators with sub/superscripts

    ed4a462
  10. oscargus commented on Jun 13, 2022

    @oscargus
    oscargus
    on Jun 13, 2022
    Member
    More actions

    Closed by #23243

  11. oscargus
    closed this as completedon Jun 13, 2022
  12. andrew-fennell
    added a commit that references this issue on Jun 14, 2022

    Fix spacing after mathtext operators with sub/superscripts

    9b1632f
  13. jklymak
    added a commit that references this issue on Jun 24, 2022

    Fix spacing after mathtext operators with sub/superscripts

    8daf300
  14. imgbot
    added a commit that references this issue on Apr 19, 2026

    Fix spacing after mathtext operators with sub/superscripts

    5cd0cdb
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-issueshttps://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!Open a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      • v3.6.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.