You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Relation operator in mathtext should not be spaced when at end #23315
Actually this reveals another bug: I deleted the ddots (etc.) test because they are now recognized as relation operators and extra spaces got added around them, but such spaces should actually not be there because the test string is r'$\dotplus$ $\doteq$ $\doteqdot$ $\ddots$' i.e. the relation operator is at (both) extremities of the dollar-enclosed part, in which case tex does not introduce a space. For a simpler example, consider figtext(.5, .5, "a$=b$", size=24) with or without usetex. With usetex, there's no space between "a" and "=" (whereas there's one between "=" and "b"), whereas mathtext introduces a space on both sides of the "=".
Fixing this bug (which probably involves reusing something like the "Binary operators at start of string should not be spaced" part of the code in def symbol()) should allow keeping the old ddots test, so I'll look into that...
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!
Opened #32331 to fix this. It drops the boundary-side spacing for relation/binary/arrow operators (so a$=b$ no longer spaces before the =) and restores the un-hacked \ddots test. Two image baselines need regenerating in a FreeType 2.6.1 build. noted in the PR.
Activity
github-actions commentedon Dec 12, 2025
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!
Fix mathtext spacing of operators at expression boundaries
DOC: add API change note for mathtext operator spacing
ahmed5145 commentedon Sep 10, 2026
Opened #32331 to fix this. It drops the boundary-side spacing for relation/binary/arrow operators (so a$=b$ no longer spaces before the =) and restores the un-hacked \ddots test. Two image baselines need regenerating in a FreeType 2.6.1 build. noted in the PR.