Skip to content
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

[Math Processing Error] with \mathchoice #373

Closed
fred-wang opened this issue Jan 10, 2013 · 8 comments

Comments

Projects
None yet
2 participants
@fred-wang
Copy link
Contributor

commented Jan 10, 2013

The following LaTeX command gives a [Math Processing Error]:

{\mathchoice{}\subseteq{}{}}

The error is

"too much recursion"
"http://cdn.mathjax.org/mathjax/latest/unpacked/jax/element/mml/jax.js"
line 272

@fred-wang

This comment has been minimized.

Copy link
Contributor Author

commented Jan 14, 2013

The math processing error occurs in SVG and HTML-CSS output modes, not MathML.

My guess on this is issue is that MML.TeXmathchoice chooses one of its child while at the same time some MML classes (like MML.mo) refers to their parent. These symmetric references causes an infinite loop. Adding "inferred: true;" to MML.TeXmathchoice seems to remove the [Math Processing Error] but then the four children are displayed.

I've prepared a test "\mathchoice\subset\subset\subset\subset" in

Crashtests/issue373.html

that I'll add in my next commit to MathJax-test.

@dpvc

This comment has been minimized.

Copy link
Member

commented Feb 11, 2013

There is a Parent() method for MML objects that is supposed to skip to the "correct" parent when "invisible" objects like mathchoice are involved. Perhaps that method needs to be improved. Or it might be that it isn't being used at some points where it should be.

@fred-wang

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2013

95c01ba

I've modified the Core and CoreMO functions in MML.TeXmathchoice to do the same as MML.maction. That makes the testcase work for me.

dpvc pushed a commit to dpvc/MathJax that referenced this issue Mar 20, 2013

@dpvc

This comment has been minimized.

Copy link
Member

commented Mar 20, 2013

I've merged your branch.

@fred-wang

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2013

A slightly more complicated test that is still not fixed:

\buildrel{\mathchoice\subset\subset\subset\subset}\over{}

dpvc pushed a commit to dpvc/MathJax that referenced this issue Apr 30, 2013

@dpvc

This comment has been minimized.

Copy link
Member

commented Apr 30, 2013

OK, I've made changes to accommodate this. These are probably going to require a new test run, however, as they are in some of the fundamental routines in the mml ElementJax for looking up values of the internal MathML nodes. I'm pretty sure what I did will not hurt anything, but it is pretty complicated stuff and you never know...

The issue373 branch of my fork of MathJax includes the changes. Note that since your issue373 branch has already been merged, I made a new branch rather than reuse yours.

@fred-wang

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2013

I integrated the new test in the testing framework.

=> Ready for release

dpvc pushed a commit to dpvc/MathJax that referenced this issue May 1, 2013

@dpvc

This comment has been minimized.

Copy link
Member

commented May 1, 2013

=> Merged

dpvc pushed a commit to dpvc/MathJax that referenced this issue May 3, 2013

@dpvc dpvc closed this May 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.