I have read lots of questions and answers here but I haven't found a clear Question/Answer.
I need to create a really simple webpage which allows users to enter LaTeX and generate a PNG (or other lightweight image format). The webpage contains only a textarea
and a submit button
and it produces a link like "http://www.example.com/generated-images/cnl344l4jcxlj.png" with the image.
INPUT: already-written latex like
f(x)=\displaystyle\int_{-\infty}^x e^{-t^2}dt
OUTPUT: Link to the generated PNG or GIF image
The processing of the latex code and the generation of the image should happen in the server-side (so no JavaScript)
I'd like to do this in PHP (which I'm pretty good at), but if there are simple-enough libraries I could give it a shot in Perl.
A straightforward implementation in pure C could also work. A program which scanf
s the input latex code and printf
s "image generated at c:/program/image00000000001.gif"
Any free/opensource libraries that do any of this? Any advice in how to proceed? Any special concerns?
http://rinconmatematico.com/latexrender/pictures/35800007a15a3f0e39006dc63f04f1b5.gif