#15 LaTeX support

open
nobody
None
5
2008-06-05
2008-06-05
Jiri Tyr
No

Hello Max,

I have got an idea. It would be nice, if Jeuclid would know to translate LaTeX into MathML internally. Then we could use LaTeX instead of pure MathML in the FO source file.

Jeuclid could detect if <math></math> contains "$" on the begin and on the end of the inner text. If so, it would call method latexToMathml or whatever and translate the inner text to MathML. Then the text would be replaced by proper MathML code and Jeuclid would continue as it works now.

There already exists such implementation:
http://www.cmt.phys.kyushu-u.ac.jp/~M.Sakurai/java/sdoc/mathml/test.html
Maybe you could just overtake it and implement it into the Jeuclid.

Example of the functionality in Jeuclid:
<math xmlns="http://www.w3.org/1998/Math/MathML">
$x^2$
</math>

translated into:

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
</mrow>
</math>

What do you think about that?

Best Regards,
Jiri

Discussion

  • Max Berger
    Max Berger
    2008-06-06

    Logged In: YES
    user_id=99210
    Originator: NO

    Jiri,

    I like the idea in general, but I have two issues with it:

    1) It should not use the MathML namespace and the MathML tags. Maybe something like
    <latex xmlns="http://jeuclid.sf.net/ns/fopext">x^2</latex>
    (tagname and namespace can change)
    Rationale: It would be clear that this is not MathML, it would also be clear that this is renderable by JEuclid

    2) The library you liked to is GPL, which is incompatible with the Apache License. Further, the library you linked to has not been updated in years, e.g. is inactive. We should try to find another solution.

    Max