Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTeX equivalent to Google Chart API

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.

like image 992
Jonas Avatar asked Feb 05 '09 15:02

Jonas


People also ask

Is Google Charts API free?

Google chart tools are powerful, simple to use, and free. Try out our rich gallery of interactive charts and data tools.

Is Google charts deprecated?

While the dynamic and interactive Google Charts are actively maintained, we officially deprecated the static Google Image Charts way back in 2012. This gives us the right to turn it off without notice, which may happen soon.

What is Google Chart Apis?

The Google Chart API is an extremely simple tool that lets you easily create a chart from some data and embed it in a webpage. You embed the data and formatting parameters in an HTTP request, and Google returns a PNG image of the chart.


2 Answers

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):

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.

like image 94
AkiRoss Avatar answered Sep 28 '22 00:09

AkiRoss


72pines.com More readable then chart.apis.google:

alt text http://tex.72pines.com/latex.php?latex=%0D%0A4x_0%5CDelta%28x%29%2B3%5CDelta%28x%29%2B2%5CDelta%28x%5E2%29%3E0%0D%0A

http://tex.72pines.com/latex.php?latex=%0D%0A4x_0%5CDelta%28x%29%2B3%5CDelta%28x%29%2B2%5CDelta%28x%5E2%29%3E0%0D%0A

or chart.apis.google with background color changed

alt text

https://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFF00&chl=%0D%0A4x_0%5CDelta%28x%29%2B3%5CDelta%28x%29%2B2%5CDelta%28x%5E2%29%3E0%0D%0A

or chart.apis.google with background color transparent and resized

alt text

https://chart.apis.google.com/chart?cht=tx&chs=428x35&chf=bg,s,FFFFFF00&chl=%0D%0A4x_0%5CDelta%28x%29%2B3%5CDelta%28x%29%2B2%5CDelta%28x%5E2%29%3E0%0D%0A
like image 34
FDisk Avatar answered Sep 28 '22 00:09

FDisk