tags:

views:

121

answers:

1

I'm using TinyMCE and the ASCIIMathML javascript library to provide equation editing capabilities on a web page. It's easy to take the ASCIIMathML, convert it to MathML, and then render the equation with any of the wonderful MathML rendering libraries.

What I haven't been able to figure out (and maybe I'm just missing something) is how to go in the other direction MathML -> ASCIIMathML. I need to be able to support editing of documents that we'll be importing that contain MathML. Does such a library exist that converts in the other direction? My website stack is built on Java, so a Java library would be ideal.

+1  A: 

I don't know if there's a tool that will do exactly what you want (or even if it's possible in general... perhaps MathML is more expressive than ASCIIMathML?)

If you want to implement such a transformation tool yourself, you could start by working with JEuclid's MathML parser. Once you've got the parsed representation of your equation, you can start outputting ASCIIMathML syntax by traversing the MathML DOM objects.

Suppressingfire