texsvg is an npm package that converts TeX to SVG:
It’s built with:
See repository.
Install
npm install texsvg
Module
It can be used as a module:
const texsvg = require('texsvg');
const tex = '\\frac{a}{b}';
texsvg(tex).then((svg) => console.log(svg));
CLI
Or as a CLI command:
npx texsvg '\frac{a}{b}' fraction.svg # texsvg <tex> <file>
Demo
The examples below were built with texsvg-server.