LaTeX equivalent to Google Chart API

Jonas picture Jonas · Feb 5, 2009 · Viewed 12.4k times · Source

I'm currently looking at different solutions getting 2 dimensional mathematical formulas into webpages. I think that the wikipedia solution (generating png images from LaTeX sourcecode) is good enough until we get support for MathML in webbrowsers.

I suddenly realized that it might be possible to create a Google Charts API equivalent for mathformulas. Has this already been done? Is it even possible due to the strange characters involved in LaTeX-code?

I would like to hit an url like latex2png.org/api/?eq="E = mc^2" and get the following response: e=mc^2

edit: Thanks for the answers sofar. However, I am already aware of several tools to generate png images from latex source code (both online and from my commandline), but what I was looking for was a simple way to get the image via an Http GET request. Perhaps such a service does not exist.

Answer

AkiRoss picture AkiRoss · Sep 4, 2009

Update

As @hughes (and others) pointed out, the previous Google Chart API has been deprecated.

The example I wrote still works as of Sept 2015, but a new one shall be used now (documentation):

http://chart.googleapis.com/chart?cht=tx&chl=%5CLaTeX

Old answer

Google Chart can do it (Documentation):

http://chart.apis.google.com/chart?cht=tx&chl=%5CLaTeX

I'm using this with Google Docs, because it doesn't support math yet.