asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

\limits construct not supported? #34

Closed oddhack closed 6 years ago

oddhack commented 6 years ago

I'm not sure if this is a problem with asciidoctor-mathematical or the underlying mathematical dependency, but the following expression:

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

(which is legal in LaTeX and handled properly by KaTeX) 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 generate different output in inline mode.

Is there documentation of what LaTeX operators are and are not supported in asciidoctor-mathematical?

tstumm commented 6 years ago

https://github.com/gjtorikian/mtex2MML/blob/master/SUPPORTED.md

oddhack commented 6 years ago

I don't understand why this was closed. The link @tstumm provided says that \limits is supported, at least by the grammar. Presumably a higher level component of the toolchain sees \limits and fails to handle it correctly, then.

tstumm commented 6 years ago

Well then it's either https://github.com/gjtorikian/mtex2MML or https://github.com/gjtorikian/mathematical since we don't do any parsing by ourselves. But the author of both is pretty fast at fixing stuff :)