Skip to content

[TeX input] \operatorname {Res\ } throws error #1586

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pkra opened this issue Aug 17, 2016 · 5 comments
Closed

[TeX input] \operatorname {Res\ } throws error #1586

pkra opened this issue Aug 17, 2016 · 5 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@pkra
Copy link
Contributor

pkra commented Aug 17, 2016

From https://phabricator.wikimedia.org/T136812.

In a quick test, this didn't cause an error in real LaTeX (but I couldn't check warnings).

Is this expected behavior?

@pkra pkra added the Question label Aug 17, 2016
@dpvc dpvc added Accepted Issue has been reproduced by MathJax team and removed Question labels Aug 17, 2016
@dpvc dpvc added this to the MathJax v2.7.0 milestone Aug 17, 2016
dpvc added a commit to dpvc/MathJax that referenced this issue Aug 17, 2016
@dpvc
Copy link
Member

dpvc commented Aug 17, 2016

It's a bug (related to #1563). Arguments to some macros have leading and trailing spaces removed, and the trimming meant that the space from \ was removed, leaving it essentially {Res\}, and so the closing brace was escaped, and that messed up the brace balancing.

The issue1586 branch of my fork of MathJax includes a fix.

@dpvc
Copy link
Member

dpvc commented Aug 18, 2016

==> In testsuite

LaTeXToMathML/issue1586.html

@physikerwelt
Copy link
Contributor

@dpvc Thank you. We cherry picked your change and it now works for wmf cf.
https://en.wikipedia.org/api/rest_v1/media/math/render/mml/a2c9f30d6ff4230bf5406de1fc4ccdb6ba2712b0

@dpvc
Copy link
Member

dpvc commented Aug 19, 2016

@physikerwelt, glad you were able to get it working for you.

dpvc added a commit that referenced this issue Aug 24, 2016
Make sure trimSpaces() doesn't remove tailing space in '\ '.  #1586
@dpvc
Copy link
Member

dpvc commented Aug 24, 2016

==> Merged

@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Aug 24, 2016
@dpvc dpvc closed this as completed Aug 24, 2016
@dpvc dpvc added v2.7 Fixed and removed Merged Merged into develop branch labels Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7
Projects
None yet
Development

No branches or pull requests

3 participants