Skip to content

"Math Processing Error" using CommonHTML with line breaks #1447

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
hubgit opened this issue Apr 20, 2016 · 4 comments
Closed

"Math Processing Error" using CommonHTML with line breaks #1447

hubgit opened this issue Apr 20, 2016 · 4 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@hubgit
Copy link

hubgit commented Apr 20, 2016

An error is thrown when rendering a formula with the CommonHTML renderer in a column that's narrow enough to trigger line breaking, when the linebreaks config is set to automatic: true.

> MathJax.Hub.lastError
> TypeError: Cannot read property 'CHTML' of undefined
    at MML.msubsup.Augment.CHTMLmoveLine (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:521:37)
    at MML.mbase.Augment.CHTMLmoveSlice (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:306:12)
    at MML.mbase.Augment.CHTMLmoveLine (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:267:22)
    at MML.mbase.Augment.CHTMLmoveSlice (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:306:12)
    at MML.mbase.Augment.CHTMLmoveLine (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:267:22)
    at MML.mbase.Augment.CHTMLmoveSlice (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:306:12)
    at MML.mbase.Augment.CHTMLmoveLine (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:267:22)
    at MML.mbase.Augment.CHTMLaddLine (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:195:12)
    at MML.mbase.Augment.CHTMLmultiline (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/autoload/multiline.js?rev=2.6.1:121:12)
    at MML.mrow.Augment.toCommonHTML (https://cdn.mathjax.org/mathjax/2.6-latest/unpacked/jax/output/CommonHTML/jax.js?rev=2.6.1:2593:16)

An example that reproduces the error.

This only occurs when using the CommonHTML renderer - the HTML-CSS renderer doesn't have the same problem.

HTML-CSS:

screen shot 2016-04-20 at 21 25 58

CommonHTML:

screen shot 2016-04-20 at 21 26 18

@pkra pkra added the Accepted Issue has been reproduced by MathJax team label Apr 21, 2016
@pkra pkra added this to the MathJax v2.x.x milestone Apr 21, 2016
@pkra
Copy link
Contributor

pkra commented Apr 21, 2016

Thanks for the detailed report!

dpvc added a commit to dpvc/MathJax that referenced this issue Apr 29, 2016
…come from other MathML nodes (those with IDs). Resolves issue mathjax#1447.
@dpvc
Copy link
Member

dpvc commented Apr 29, 2016

It turns out that the routine in CommonHTML that locates the superscripts and subscripts of the element being broken by the line break wasn't working correctly. It was finding one of the subscripts within the superscript when it should have been returning that there was no subscript.

The issue1447 branch of my fork of MathJax fixes this issue.

dpvc added a commit that referenced this issue Jun 8, 2016
Improve getNode() so that is finds the correct node. #1447
@dpvc
Copy link
Member

dpvc commented Jun 8, 2016

==> Merged.

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

dpvc commented Aug 11, 2016

==> In testsuite

MathMLToDisplay/Topics/LineBreak/issue1447.html

@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