TeX to SVG


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.

Quadratic formula:

x equals begin fraction negative b plus or minus begin square root b squared minus 4 times a times c end square root over 2 times a end fraction

JSFiddle:



Please support this site and join our Discord!