tic - 1 year ago 131
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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download