katex@0.16.22 · LilScript port · @itslil/katex

TeX,
to HTML

Official katex@0.16.22 algorithms rewritten in LilScript. Official Jest suites —. Not affiliated with upstream. Every number on this page is written by one script you can run; the performance rows come from a Playwright test and the benchmark page it drives.

npm install @itslil/katex
Current LilScript versus minified original · portable ESM —smaller

—Brotli-11 you ship, vs Terser
—gzip-9 vs Terser
—raw vs Terser
—official jest suite

Raw, gzip and Brotli each use a separate LilScript compilation targeting that objective. The original uses the same export and dependency boundary, then a JavaScript minifier.

renderToString ✦ render ✦ frac ✦ sqrt ✦ scripts ✦ greek ✦ matrix

The compiled runtime, in the browser

Live
lab.

Left is the editor. Right is @itslil/katex HTML, or the official katex@0.16.22 graph when that lane is on.

Current library · original minified

Three objectives.
Measured separately.

Same machine · sequential builds

Build time.

Zero runtime dependencies

Install the
current port.

npm install @itslil/katex

Download the checked repository package · Package files, hashes and validation. npm publication is independent.