LaTeX.js LaTeX.js

JavaScript LaTeX to HTML5 translator

Documentation →   Playground →

100% JavaScript

LaTeX.js is written in 100% JavaScript and runs in the browser. No external dependencies need to be loaded.

CLI

The latex.js binary allows to translate LaTeX files in the console. It depends on a DOM implementation (svgdom in this case).

Compatibility

LaTeX.js produces almost the exact same output you would get with LaTeX—except where impossible: glue cannot be translated to HTML, and sometimes cannot even be interpreted in the context of HTML.

Extensibility

New macros can easily be added in JavaScript. Very often it is much easier to implement a piece of functionality in JavaScript and CSS than it is in LaTeX.

Speed

LaTeX.js only needs one pass over the document instead of several. References can be filled in by remembering and later modifying the relevant part of the DOM tree.

Open Source

Of course, LaTeX.js is completely Open Source. You can find the code on GitHub.