How to convert LaTeX equations to SVG?

pdf2svg works quite well.

Use \pagestyle{empty} to avoid page numbers and pdfcrop (package texlive-extra-utils) to remove empty space around the equations


A new option is to use mathjax-node from npm. Install a distribution of node, then use npm to install mathjax-node:

$ npm install --global mathjax-node

Edit: You now have to install mathjax-node-cli, however, mathjax-node-cli doesn't show up (yet), so I had to pass the github repo:

$ npm install --global https://github.com/mathjax/mathjax-node-cli.git

Once installed, you will be able to use tex2svg:

$ /usr/local/lib/node_modules/mathjax-node-cli/bin/tex2svg \
'\sin^2{\theta} + \cos^2{\theta} = 1' > identity.svg

And the result:

result of tex2svg, rasterized at 300dpi

The generated SVG file renders properly inside a browser but cannot be displayed using standard image tools.


dvisvgm works quickly and nicely in my experience. It's in TeX Live 2010.