latex2svg

0.0.3 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i latex2svg

Weekly Downloads

2

Version

0.0.3

License

GPL-3.0-or-later

Unpacked Size

10.1 kB

Total Files

8

Last publish

Collaborators

  • martinnl