LaTeX to png

LaTeX to png

DPI

Apologies to all for the lengthy, lengthy downtime.. One line of code can make all the difference. Math mode should be working strong again.

more information

After math.b3co.com went down, I needed a new source for my online LaTeX conversion. There is an excellent converter available at ScienceSoft.at, but it's a hack to script it up. This page converts LaTeX fomulas to png — it automatically adds the necessary \begin{document} cruft — on a one-off basis; script access is available through POST.

Optionally, you may pass ?xml as a GET parameter, and the results will be returned as

<?xml version="1.0"?>
<latexresult>
  <lateximage location="_url_" source="sciencesoft.at" />
</latexresult>

This way, you can avoid parsing all the surrounding cruft. Images are maintained locally, so you don't need to copy them to your home server (however, as a nice script kiddie, that's a kind thing to do); a PHP example of socketing/downloading will be up shortly. In the meantime, the general source is available here: latex.txt (please note that it's a script designed to work, not look particularly pretty).

Realistically, it's much better to just use the tool available at ScienceSoft.at — for one thing, there are many more options I've obfuscated, but even beyond that it's more polite to give them the pageviews — but if you have heavy formula-conversion needs (such as, for example, converting formulas to appear on a blog) then one-offing isn't going to cut it.