From: Guenter Milde <milde@us...>  20120229 08:50:06

Hi Paul and all Docutils developers, On 20120228, Paul Tremblay wrote: > I am not that well versed in latex to know exactly how to convert it. > Converting latex to mathml might not require a complete reworking of my > code. For example, ASCIImath uses > text(apple) > Whereas latex uses > \text(apple) > If latex is indeed that close to ASCIImath, (This is because ASCIImath is modelled after TeX  with simplifications for the user) > it doesn't seem to make sense to use latex, since ASCIImath math > doesn't need the back slashes. Yes, backslashes are hard to type, especially on a German keyboard (AltGr+ß). Also, ASCIImath looks much more similar to nonmath rST. This makes it also a viable output option for text formats (rst, manpage, txt) and other formats witout proper math support. This becomes especially useful and readable if combined with Unicode math character replacements (already implemented for TeX math input), e.g. ∫ s_δ(xx') dx However, there are many use cases for TeX math input even for people not knowing the details of the TeX math syntax, e.g. draganddrop of equations from documents made with LyX (or some other LaTeX frontend) or the Wikipedia. This means that conversion between ASCIImath and TeXmath could make ASCIImath a "full citizen" in standard rst (maybe even the default?). > Converting latex to mathml sounds like I would need to write a whole new > library. Do you mean "converting asciimath to TeX"? > Like I said, I don't know the syntax of latex. My hope was that the JavaScript sources might help in devising the ASCIImath<>TeX math converter. How did you start when programming the Python lib? Also, there are plenty of test cases as Wikipedia (as well as the current Docutils math and the various longerexisting Docutils math extensions (including Sphinx)) all use TeXmath as math input format. For a start, see ``docutils/test/functional/input/data/math.txt`` and the various math_output* files in ``docutils/test/functional`` 