Fast, Easy, Cheap: Pick One

Just some other blog about computers and programming

Trac Math Plugins Galore!

I’ve decided to put my Trac plugin hackery knowledge to use. This past week I became the official maintainer of the TracMathPlugin. This is a plugin we use on our Trac installation at work which lets people enter in Math equations in the wiki using LaTeX, and then renders them as PNG to display them. The plugin had been kind of languishing for the last several years without a maintainer, and there were some open bugs which were quite easy to fix.

While this is cool, and somewhat useful, PNG output always seemed like a hack to me. Fortunately, I recently discovered MathJax. I’m not entirely clear as to how it works, but it seems to implement TeX (or some subset of it) in Javascript and then renders it client-side using web fonts. The output is truly beautiful. Modern browsers are awesome.

So of course, the next natural thing to do is integrate MathJax in to Trac.  A few hours of hacking later and I created TracMathJaxPlugin. It basically does what the name implies, allows you to use MathJax within the Trac wiki and other wiki-enabled components like the ticket system.

The feature set is currently quite basic, but hopefully once I get it installed at work and some more people begin to use it I will flesh it out a bit more.