On the fly LaTeX web service
Some times you are a Physicist, Mathematician or perhaps Engineer, and need to write some equations on your website. For many of us LaTeX is _the_ typesetting tool for this venture. The nightmare begins when you realize that not only do you have to type obnoxious LaTeX, but also render it, and convert it to png only to upload the images for later manual inclusion in the page…
The computer nerds solution would be to install some custom engine on the webserver to handle this problem, and hack the different parts into the website. But what if you are hosted on a webserver without direct access to the machine (as most people are)?
Well, fear not! I have created a webservice for just this purpose: enter Gluino Equations!
Instead of the tedious work of doing the above, you can just register on http://gluino.com/equations and add the generated html code to your page:
It is just a few lines like this:
<Script type=”text/javascript” src=”http://eq.gluino.com/render.js”></script>
<script type=”text/javascript”>
$(document).ready(function() {
var gluino_vars = { account : “username”, dpi : 200, clas : “eq”, dataType : “png”, }; renderEquations(gluino_vars); });
</script>
The the result from this is that every html tag with the class “eq” will be have its content sent to the Gluino Equation Service where the TeX is rendered into images and returned as “png” images at the resolution of 200DPI.
For example:
I’m still adding features and the website itself is still work in progress, but the core service is running as the above proves.
At the moment you can modify background and text color, and choose to output the images as base64 encoded data so the page is self contained and you save the HTTP requests for the images (but since <IE7 is lacking support of the data: url it might be of limited interest).
Stay tuned for the public beta, and feedback is appreciated
Tags: mathematics, programming, webservices
February 25th, 2009 at 15:36
this is a great idea. Is it working and publicly available at this point? I have had so much trouble trying to use Latex on the web.
May 22nd, 2009 at 19:50
Your blog is very interresting for me, i will come back here..