texsvg is an npm package that converts TeX to SVG:
$ npm install texsvg
It can be used as a module:
const texsvg = require('texsvg');
const tex = '\\frac{a}{b}';
texsvg(tex).then(svg => console.log(svg));
Or as a CLI command:
# texsvg <tex> <file>
$ npx texsvg '\frac{a}{b}' fraction.svg
It’s built with:
This library was used to build texsvg-server, which is a web API for converting TeX to SVG.
Quadratic formula example:
JSFiddle demo:
Check out the GitHub repository. Pull requests are welcome!