Missing ASCIIMathML input values

Missing ASCIIMathML input values

by Mauno Korpelainen -
Number of replies: 1

Marc,

I noticed one thing in all versions of ASCIIMathML.js that has caused me a lot of headache:

The input values of ASCIIMathML code and LaTeXMath code are not the same and in many cases LaTeXMathML is translated correct with single dollars around but ASCIIMathML translates only part of the code (input code is missing). For example in \hbar only bar is translated, in \hookleftarrow you get infinity between h and k followed by arrow to the left...

It is easy to fix by adding the missing tags but it might be a good idea to take the input tables out of the script so that they could be edited and new tags could be easily inserted.

For example: in ASCIIMathML we have

{input:"rho",    tag:"mi", output:"\u03C1", tex:null, ttype:CONST},

but LaTeXMathML code has

{input:"\\rho",  tag:"mi", output:"\u03C1", ttype:CONST},
{input:"\\varrho", tag:"mi", output:"\u03F1", ttype:CONST},

Average of ratings: -
In reply to Mauno Korpelainen

Re: Missing ASCIIMathML input values

by Mauno Korpelainen -

I will add some missing input values to my version of asciimathml.js and try to create a php version next - possibly with tables of input code in database.

A small comparison table of some current symbols in ASCIIMathML, LaTeXMathML (and Fallback script) & LiveTeX (LaTeX)
in http://korpelainen.net/site19/mod/resource/view.php?id=8

Rendering asciimathml/latexmathml characters is at least 100 times quicker than rendering LaTeX (loading that page lasts for ever) but one disadvantage of rendering unicode characters with javascript is that browsers need to have support for those unicode characters (fonts). We could try an optional solution too: to upload fonts (STIX?) to server with moodle and use scripts like in Facelift image replacement technique to render unicode characters from server as images if browser does not have the font installed http://facelift.mawhorter.net/examples/ - it requires just php and GD and moodle sites have both of them.

I am going to test during the weekend some other interesting things like Prince - http://www.princexml.com/samples/magic.pdf and http://www.princexml.com/download/

By the way - unicode picker can be easily added to equation editor as one more tab... it's already working on my local box. I should just pick all the pieces and send you a copy. smile