Description
LaTeX.js is a JavaScript translator that converts LaTeX source into HTML5. It is written in 100 percent JavaScript and runs in the browser without external dependencies to load. The project aims for output that is almost the same as what LaTeX produces, except where HTML and CSS cannot reproduce it, such as glue. It is also a command line tool: the latex.js binary translates LaTeX files in the console and needs a DOM implementation to run. New macros can be added in JavaScript, which the author describes as often easier than implementing them in LaTeX itself. The translator needs only one pass over the document, because references are filled in afterwards by revisiting the relevant part of the DOM tree. The documentation covers usage in the browser, as a WebComponent or library, on the command line, plus the API, the architecture and how to define custom macros.…
Highlights
- Translates LaTeX into HTML5 in the browser
- 100 percent JavaScript with no external dependencies
- Command line binary for converting files
- Custom macros written in JavaScript
- Single-pass translation with filled-in references
- Online playground to try documents
Ratings & Reviews
No ratings yet
Be the first to rate LaTeX.js.
People also visit
LaTeX.js FAQ
What is LaTeX.js?
A JavaScript translator that converts LaTeX into HTML5, usable in the browser or on the command line.
How close is the output to LaTeX?
The site says the output is almost the same as LaTeX, except where HTML and CSS cannot reproduce it, such as glue.
Can I add my own macros?
Yes. New macros can be added in JavaScript, and the docs cover defining custom macros.
How do I use it?
Use it in the browser as a library or WebComponent, or run the latex.js binary in a console to translate LaTeX files.
Is it free?
Yes. It is MIT licensed and the code is on GitHub.
What are the best LaTeX.js alternatives?
Popular alternatives to LaTeX.js include MathTranslate, LaTeX.to and Texworks. See all LaTeX.js alternatives





