gjtorikian / mtex2MML

A Bison grammar to convert TeX math into MathML.
23 stars 14 forks source link

Is \limits construct fully supported? #72

Open oddhack opened 6 years ago

oddhack commented 6 years ago

I'm having an issue using asciidoctor-mathematical with the inline expression

\sum\limits_{w=0}^{cell_width}

(which is legal in LaTeX and handled properly by KaTeX). From asciidoctor-mathematical, it generates a chain of errors like this:

Line: 4 Error: syntax error, unexpected LIMITS at token \limits
Failed to parse mtexLine: 4 Error: syntax error, unexpected LIMITS at token \limits
Failed to parse mtexasciidoctor: WARNING: could not embed image: /home/tree/git/openvx/docs/specification/out/equations_temp/stem-df25b61a6e10bd50194e5bc21cd2cd23.svg; The data supplied is not a valid SVG document.
asciidoctor: WARNING: could not embed image: /home/tree/git/openvx/docs/specification/out/equations_temp/stem-bbcb3c334a1c2c4ab3173728a4c63455.svg; The data supplied is not a valid SVG document.

Removing the \limits also removes the error, but generates different (undesired) output in inline mode.

mtex2MML appears to claim in the SUPPORTED.md that \limits is supported, and I'm not sure where these errors are coming from or why. I'm also unsure how to go about testing lower levels of the toolchain, as my ruby knowledge is extremely limited (n.b. something like the KaTeX testing page https://khan.github.io/KaTeX/ would be very helpful in this regard).

RoxvilleRooster commented 3 years ago

I'd appreciate a fix. I am using asciidoctor-mathematical and this defect came as a surprise.