local/tools
docs / Single executable / v1.0.3

LaTeX to SVG

Render LaTeX, MathML or AsciiMath to SVG, PNG and MathML with speech alt text, offline with MathJax.

Install

  • install
    irm https://raw.githubusercontent.com/chayprabs/localtools/main/latex-to-svg/install.ps1 | iex
  • update
    localtools-latex-to-svg update
  • remove
    localtools-latex-to-svg uninstall

Opens at http://127.0.0.1:47133 in your browser. Run localtools-latex-to-svg --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.

Direct download

PlatformFileSize
Windows x64latex-to-svg-1.0.3-windows-x64.zip48.7 MB
macOS Apple Siliconlatex-to-svg-1.0.3-macos-arm64.zip35.8 MB
macOS Intellatex-to-svg-1.0.3-macos-x64.zip37.4 MB
Linux x64latex-to-svg-1.0.3-linux-x64.zip46.0 MB
Linux ARM64latex-to-svg-1.0.3-linux-arm64.zip46.3 MB

SHA-256 checksums are in the release notes; the install scripts verify them for you.

See it

How to use

  1. Run localtools-latex-to-svg; the page opens at http://127.0.0.1:47133.
  2. Type TeX, MathML or AsciiMath; preview and copy SVG/MathML/data URI/an <img> tag, or download SVG and PNG.
  3. Choose display or inline style, colour and PNG scale. Tagged equations are refused: remove \tag or use align*/equation*.
  4. Drop a .tex/.md/.txt file in Batch, or run localtools-latex-to-svg batch paper.tex -o out/ for images and manifest.json; balanced multiline document macros are supported.
  5. Long formulas display notices when speech is omitted or glyph reuse is enabled. Downloads/copies remain complete; code preview is limited to 1 MB.
  6. CLI/API options and limits: https://github.com/chayprabs/localtools/blob/main/latex-to-svg/USAGE.md

FAQ

Does it need TeX or the internet?

No. MathJax 4 with its New Computer Modern font, the Speech Rule Engine and the resvg rasterizer are built into the program; nothing is downloaded. \require of a package that is not built in is refused.

Which LaTeX packages work?

amsmath/amssymb, mathtools, physics, mhchem, braket, cancel, color, boldsymbol, amscd, bussproofs, cases, empheq, enclose, extpfeil, gensymb, units, upgreek, textmacros, unicode and verb, plus newcommand/def/DeclareMathOperator. Balanced multiline .tex definitions are applied in batch; incomplete definitions are skipped with a notice. Tagged/numbered standalone exports are refused.

Is the SVG the same as MathJax in a browser?

The original 162-formula corpus verifies 161 supported SVGs byte for byte against stock MathJax and one explicit tagged-equation refusal; nine named MathML entities also match the stock promise API. Exports remove event handlers, external URLs and unsafe styles. Multline uses intrinsic width.

How are PNG sizes chosen?

Scale 1 is a 16 px font size; the default 4 gives 64 px, and --dpi N equals scale N/96. PNGs are limited to 64 megapixels; the background is transparent unless you pick a colour.

What happens with bad input?

Recursive macros, over 400 nesting levels and over 256 KB are refused. Each formula has a killable 10 s worker budget (30 s above 64 KB). Speech is optional: above 2048 source characters, 16384 MathML characters or 256 tree nodes it is omitted with a notice; provide alt text. Above 16384 source characters, embedded glyph reuse is enabled and reported.