Skip to content

[TeX input] \class is lost during input [was "\class" being ignored in "\left[\class{test}{\sin(x)}\right]"] #1415

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
TomasRiker opened this issue Mar 15, 2016 · 5 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@TomasRiker
Copy link

In \left[\class{test}{\sin(x)}\right], the \class is ignored.

When replacing \sin(x) with e.g. x^2, it works. It also works when removing the \left[ and \right] around the expression.

See this screenshot (the test class is just defined to be color: red):

mathjax bug

@pkra pkra added the Accepted Issue has been reproduced by MathJax team label Mar 15, 2016
@pkra pkra changed the title "\class" being ignored in "\left[\class{test}{\sin(x)}\right]" [TeX input] \class is lost during input [was "\class" being ignored in "\left[\class{test}{\sin(x)}\right]"] Mar 15, 2016
@pkra
Copy link
Contributor

pkra commented Mar 15, 2016

Thanks for the report. I can confirm this.

It looks like the TeX input processor is losing the class.

@pkra pkra added this to the MathJax v2.x.x milestone Mar 15, 2016
@dpvc
Copy link
Member

dpvc commented Mar 15, 2016

This turns out to be due to this line in the TeX input jax, which unwraps an mrow when it adds fences to it. In this case, the class was attached to the mrow. The code should not unwrap the mrow, but just leave it as it is, even though most of the time it will be unnecessary.

dpvc added a commit to dpvc/MathJax that referenced this issue Jun 7, 2016
@dpvc
Copy link
Member

dpvc commented Jun 7, 2016

The issue1415 branch of my fork of MathJax resolves this issue.

dpvc added a commit that referenced this issue Jul 6, 2016
Don't unwrap mrow when created fenced elements.  #1415
@dpvc
Copy link
Member

dpvc commented Jul 6, 2016

==> Merged.

@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Jul 6, 2016
@dpvc dpvc closed this as completed Jul 6, 2016
dpvc added a commit to mathjax/MathJax-test that referenced this issue Aug 8, 2016
@dpvc
Copy link
Member

dpvc commented Aug 8, 2016

==> In testsuite

LaTeXToMathML/delimiters/issue1415.html

@dpvc dpvc added v2.7 Fixed and removed Merged Merged into develop branch labels Jan 5, 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