Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Properly use thin space after math text operator#17890
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
Properly use thin space after math text operator#17890
Uh oh!
There was an error while loading.Please reload this page.
Conversation
A thin space should follow a math operator except when it is followed bysomething like a parenthesis or a bracket. This should fix issue#17852.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Seems reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks, this looks good to me!
Lets give@anntzer a few days and then merge this. |
I didn't look super carefully (may be nice to figure out what exactly is TeX's behavior) but I guess this inserts a space in |
@anntzer You're correct; I forgot about those cases. The space before the subscript / superscript can easily be handled by also excluding According to p. 170 of the TeXbook, space is always inserted after an operator except when followed by opening / closing atoms (parentheses, etc.) and punctuation. This means that space should be inserted before However, I'm not sure how to put the thin space after the subscript / superscript, since I haven't quite figured out how that code works. |
|
I extended the improvement to include |
anntzer commentedJul 12, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I guess it would be reasonable to just get rid of the single failing test as it's behavior is effectively being tested by the check_figures_equal test. |
With regard to subscript / superscript, I can easily determine in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I still approve, but we need to delete the no longer used files.
The reference rendering for `$\operatorname{cos} x$` was incorrect. Since thisis also tested with `test_operator_space`, it can be safely dropped.
I updated the commit that dropped the test to also drop the corresponding baseline images. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Also add tests for it. A thin space should not be inserted in math textbetween the operator and subscript / superscript.
PR Summary
A thin space should follow a math operator except when it is followed by something like a parenthesis or a bracket. This pull request makes said fix and should fix issue#17852.
PR Checklist