Show HN: Latex.to – LaTeX to PDF via Full Tex Live in the Browser

Wdorf1 pts0 comments

Hi HN, I implemented your feedback:latex.to is an Overleaf alternative that now runs a full Tex Live distribution in the browser.This is done via CheerpX (JIT wasm engine) running a 32bit alpine image with TeX Live.Things I previously tried: - originally this project started with just KaTeX for LaTeX to image - v86 wasm engine: Too slow (at least 10 times slower than CheerpX) - various TeX Live binaries wasm ports: These usually don t port Biber (because it s a Perl app) or engines like ConTeXt.What makes this work: - CheerpX only streams (via HTTP range requests) the data it needs. Compiling the base example only downloads 50 MB (the whole image is 5GB). - Cloudflare R2 can only cache files less than 512MB. Hence the 5GB image is split into 1 base image and 19 mount images. - LaTeX needs to bake (index) the fonts before compiling which can take a long time and can OOM CheerpX. Hence all fonts more than 0.7 MB are prebaked into the image file.The first compile is a bit slower because it needs to download assets like fonts, but everything is cached and the second compile is much faster.100% free, no login, no compile timeout, documents are compiled in the browser and NOT sent to a remote server.Please let me know in case something doesn t work / you have any questions or feedback.

image latex live cheerpx browser wasm

Related Articles