Tag Archives: mathml

GMathml is dead, long live Lasem

Since GMathml is no longer only a MathML library, but can also render SVG now, I have renamed it to Lasem. The name comes from the city of Lasem, known for its batik manufactures. It could be the acronym for “Library for Awesome SVG and Exceptional MathML”. But to be honest, it’s more an acronym for “Library for Awful SVG and Eccentric MathML”.

Only a really small subset of SVG 1.1 is supported for now. Here’s some samples of what can do Lasem:

paths-data-02-t
paths-data-02-t
pservers-grad-06-b
pservers-grad-06-b
coords-trans-01-b
coords-trans-01-b

GMathml

For some months (actually almost one year), I’m working on a mathml renderer based on gobject and cairo, with a DOM like interface. It has started as a vala experiment, but after a few weeks, after being blocked in my work by some bugs or missing features, I came back to raw gobject programming. Most of the vala bugs I’ve encountered are probably fixed by now, so it’s possible I’ll try to get back to vala one day.

The git repository is here:

http://cgit.freedesktop.org/~emmanuel/gmathml/

which can be cloned using the following command:


git clone git://anongit.freedesktop.org/~emmanuel/gmathml

It consists in a library, libgmathml, and a small rendering application, gmathmlrender, which is able to output to either PNG, PDF or SVG. In addition to mathml, gmathml also understand itex, by the mean of itex2mml (http://golem.ph.utexas.edu/~distler/blog/itex2MML.html).

For example, the following equation:


\left\langle {a + a \over x - a} | \epsilon_\Xi(a) \right\rangle = \left\{ \frac{1}{N} \sum_{i=0}^N \frac{x^i}{i!} + \Xi \int_0^x \epsilon_0(at) \, dt \right\}

Gives:

Sample PNG output
Sample PNG output

The same using the PDF output.

Here’s the reference image, produced by latex:

Reference image
Reference image

The project is far from finished, but it’s almost in a usable state, so I’ll probably do a release soon.