So as my internship is winding down and I have finished my projects, I’m left with not much to do around the office. Today I decided to ssh in to my workstation at home and do some cleanup of my home directory. I came across some old Python code I had written a few years back, including my attempt to write a LaTeX math to PNG images based on this article by Kjell Fauske.
To make a long story short, in a bout of inspiration I spent the rest of the day programming and came up with something quite decent. I call it… (drumroll)… latexmath2png! Creative, I know.
I tried to make it more flexible than some of the other implementations, and did my best not to leave crap laying around the filesystem if things went terribly wrong unlike some implementations I’ve used. My version is usable as both a standalone UNIX-type program as well as a Python module. It doesn’t do any extra junk like parse HTML, etc, just focuses on the task at hand. Currently it generates the equations using the $…$ LaTeX environment but it wouldn’t be hard to extend it to be able to render using some of the other equation environments should someone request it.
Anyhow, I’ve put it up as a project under Google Code under the MIT license so it’s free for all to use. Please check it out, feedback and bug reports are appreciated.