LaTeX in Blogger with Google Chart API

Important: The Image Charts portion of Google Chart Tools, including TeX functionality, has been officially deprecated as of April 20, 2012. It will continue to work as per Google's deprecation policy.

It's not certain that this will be bye-bye to TeX functionality; as the deprecation policy says, it will be clear at least when it's April 20, 2015.


Here is my homework report about eigenfaces in PDF (Image Recognition and Understanding: Eigenfaces). This PDF document was written in LaTeX, a well-recognized typesetting language and system. For writing equations beautifully in your document, I can't think anything competitive to LaTeX.

And thanks to its popularity, some people decided to create web APIs for LaTeX: one such example is Google Chart API's TeX component. And with a Firefox Add-on 'Greasemonkey' and this LaTeX-for-Blogger script (http://userscripts.org/scripts/show/105016), you can insert a LaTeX image into your post easily.


Under Firefox with the LaTeX-for-Blogger script installed, you can see new buttons in post composing mode.

In your post content body, put all familiar inline LaTeX code, something like:
$$E=\sum^{50}_{i=0,j=0}(a_{ij}-b_{ij})^2.$$
LaTeX script must be between the beginning and ending $$ and you can't linebreak between them. Then press 'LaTeX' button, it will convert the script into a <img> tag.
<img src="http://chart.googleapis.com/chart?cht=tx&chl=E%3D%5Csum%5E%7B50%7D_%7Bi%3D0%2Cj%3D0%7D%28a_%7Bij%7D-b_%7Bij%7D%29%5E2" border=0 align=middle />
And that <img> tag receives a LaTeX image data from Google Chart API, and shows it to page visitors. You can also press 'un-LaTeX' button for converting back all LaTeX <img> tags into $$ form.

Google Chart API's TeX component output

Yeah, it's neat!

Comments

Popular posts from this blog

Hardcoding Data Like Images and Sounds into HTML or CSS

DDS for GIMP (Mountain Lion, Native, no X11 GUI)

Make It Work: Global .gitattributes