npm.io
2.2.1 • Published yesterday

that-latex-lib

Licence
MIT
Version
2.2.1
Deps
5
Size
139 kB
Vulns
0
Weekly
0
Stars
2
That LaTeX lib

A very simple wrapper around latexmk, pdftocairo, svgo and pandoc that allows me to convert my LaTeX documents into PDFs, SVGs or HTMLs documents. Best used with skyost/latex-docker Docker image.

Features

  • Convert your LaTeX files to use them in your web pages.
  • Calculate TeX files checksums so that you don't have to regenerate it each time you want a PDF.
  • Extract and convert your tikzpicture images from your LaTeX documents.
  • Automatically compress your SVG files using SVGO.
  • Render transformed HTML math elements using Katex (can easily be configured).

Use cases

I'm currently using it in three of my Nuxt projects :

In these projects, everything is written in LaTeX, then processed using this library. Here's an example output page.

Feel free to use it in your projects as well

Usage

Check the tests directory to see how to use this library.

License

Licensed under the MIT license. See here.

Keywords