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
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.
Is this done since #17890 was merged?
I think sub/superscript handling is still a problem (#17890 (comment)).
Fix spacing after mathtext operators with sub/superscripts
Closed by #23243
Activity
tacaswell commented on Jul 7, 2020
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.
jkseppan commented on Jul 27, 2020
Is this done since #17890 was merged?
anntzer commented on Jul 27, 2020
I think sub/superscript handling is still a problem (#17890 (comment)).
Fix spacing after mathtext operators with sub/superscripts
Fix spacing after mathtext operators with sub/superscripts
oscargus commented on Jun 13, 2022
Closed by #23243
Fix spacing after mathtext operators with sub/superscripts
Fix spacing after mathtext operators with sub/superscripts
Fix spacing after mathtext operators with sub/superscripts