latex.js

0.12.6 • Public • Published

NPM version NPM downloads CircleCI codecov Maintainability License

LaTeX to HTML5 translator using a PEG.js parser

This is a LaTeX to HTML5 translator written in JavaScript using PEG.js. latex.js for LaTeX is similar in spirit to marked for Markdown.

LaTeX.js tries to be absolutely and uncompromisingly exact and compatible with LaTeX. The generated HTML is exactly what is meant to be output, down to the last space. The CSS makes it look like LaTeX output—except where impossible in principle, see limitations.

You can play with it here: http://latex.js.org/playground.html

Installation

For CLI usage install it globally:

npm install -g latex.js

For library usage add it to your project:

npm install --save-prod latex.js

Documentation

You can find the full documentation on the website: https://latex.js.org/

Alternatives

If you need a LaTeX to HTML translator that also understands TeX to some extent, take a look at:

Update: sadly, those last two are nowhere near the quality of LaTeX.js.

There is no such alternative in JavaScript yet, though, which is why I started this project. I want to use it in my derby-entities-lib project.

License

License

Copyright (c) 2015-2021 Michael Brade

Readme

Keywords

Package Sidebar

Install

npm i latex.js

Homepage

latex.js.org

Weekly Downloads

1,062

Version

0.12.6

License

MIT

Unpacked Size

14 MB

Total Files

116

Last publish

Collaborators

  • michael-brade