TexLive vs MathJax (parse rules)

218 views
Skip to first unread message

mrkr...@gmail.com

unread,
Feb 4, 2015, 4:57:17 AM2/4/15
to mathja...@googlegroups.com
Hi!
We are using TexLive on our server for rendering Latex on our site, and want to use MathJax in our android app to render the same latex formulas, but sometimes it can contain some mistakes like that:

// There you can see that the dot after "\right" is missing, and TexLive render it correctly without any mistake
// But MathJax shows error "Missing or unrecognized delimiter for \right"
\left\{\begin{matrix}y-x\le 3,\\ y+3x\ge 3,\\ x\le 3,\\\end{matrix}\right

// In another example you can see that there is only left delimiter "\left\{", and no any word "\right."
// And again TexLive render it correctly, without mistakes, but MathJax shows error "Extra \left or missing \right"
\left\{\begin{matrix}y\le 3+x,\\ y\ge 3-3x,\\ x\le 3,\end{matrix}

Is there any way to force MathJax render latex formulas with such mistakes, like TexLive do it, and stop showing the errors.
Maybe it's possible in MathJax to enable more soft rules for parser?

Victor Ivrii

unread,
Feb 4, 2015, 6:55:42 AM2/4/15
to mathja...@googlegroups.com

--

All these are errors and while one can force latex to ignore them they are still errors which  in the normal mode interrupt compilation. 

Definitely one should not encourage such too casual approach.  


Victor Ivrii

Peter Krautzberger

unread,
Feb 4, 2015, 8:18:18 AM2/4/15
to mathja...@googlegroups.com
Hi,

There is currently no "softer" parser in MathJax. It could be implemented as a pre-processor to sanitize the TeX input. We'd be happy to accept contributions in that direction but it is currently not on our roadmap.

Regards,
Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mrkr...@gmail.com

unread,
Feb 4, 2015, 9:05:59 AM2/4/15
to mathja...@googlegroups.com
Thanks for your answer, Peter.

среда, 4 февраля 2015 г., 16:18:18 UTC+3 пользователь Peter Krautzberger написал:

Victor Ivrii

unread,
Feb 4, 2015, 10:14:05 AM2/4/15
to mathja...@googlegroups.com

On Wed, Feb 4, 2015 at 8:18 AM, Peter Krautzberger <peter.kra...@mathjax.org> wrote:
There is currently no "softer" parser in MathJax.

Actually MJ is already softer than latex in the normal (rather than non-stop) mode. F.e. in {equation} latex would just ignore \\ but MJ obeys them. As a result some MJ snippets work in MJ differently from latex which definitely hurts portability


--

Victor Ivrii

Peter Krautzberger

unread,
Feb 4, 2015, 10:20:18 AM2/4/15
to mathja...@googlegroups.com
Hi Victor,

We try to keep MathJax's TeX input as faithful as possible. However, there are some small differences (though I would personally characterize the interpretation of \\ as stricter not softer); the differences are almost always due to technical reasons since MathJax does not re-implement all of TeX's internals and only focuses on math mode.

Regards,
Peter.

--

Victor Ivrii

unread,
Feb 4, 2015, 10:31:36 AM2/4/15
to mathja...@googlegroups.com
On Wed, Feb 4, 2015 at 10:20 AM, Peter Krautzberger <peter.kra...@mathjax.org> wrote:
Hi Victor,

We try to keep MathJax's TeX input as faithful as possible. However, there are some small differences (though I would personally characterize the interpretation of \\ as stricter not softer); the differences are almost always due to technical reasons since MathJax does not re-implement all of TeX's internals and only focuses on math mode.

Regards,
Peter.



 

Yes, but I am talking exactly about math mode. This little deviation is not a big deal. What is really annoying — students use some WYSIWG s/w (not LyX) to generate LaTeX code and then export and post it with 90% code unneeded in the best case


--

Victor Ivrii
Reply all
Reply to author
Forward
0 new messages