0.0.3 • Published 6 years ago

latex2svg v0.0.3

Weekly downloads
1
License
GPL-3.0-or-later
Repository
github
Last release
6 years ago

Latex2SVG

This package contains a utility that converts Latex code to SVG. It uses the latex npm package which require latex to be installed. To convert the DVI to SVG, dvisvgm is used which is usually installed along texlive-core.

Usage

Below is a simple example on how to use the package. More will come later.

var l2s = require('latex2svg');
var fs = require('fs');

fs.readFile('test.tex', 'utf8', (err, data) => {
    if (err) throw err;
    l2s.latex2svg(data, (svg_code) => {
        console.log(svg_code);;
    });
});

This takes the test.tex file and convert it to an SVG file which is logged to the console.