tic tic - 22 days ago 21
Javascript Question

JS script to convert latex formula into a single image

Is there an online JS script/library to convert any latex expression like

$\frac{a}{b}+\frac{c}{d}$
into a single image on a webpage?

Answer

You can do it by way of the Google Chart API. That's probably the simplest way.

There is also a Javascript port of pdflatex but that prints PDFs only. You can make images out of it with PDF.js by rendering it into a canvas object.

If you just need a way to display formulas you might give MathJS a try (it is also used here at the mathematically inclined goups) which has a fallback using images although images of the individual characters only not the whole equation.

Comments