rehype-katex@7.0.1 · LilScript port · @itslil/rehype-katex

Math nodes,
to KaTeX

Official rehype-katex@7.0.1 algorithms rewritten in LilScript. Official test suite 16/16. Not affiliated with upstream. Official rows are the published plugin plus KaTeX, then Terser and esbuild.

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

—Brotli-11 you ship, vs Terser
—gzip-9 vs Terser
—raw vs Terser
—official 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.

math-inline ✦ math-display ✦ throwOnError ✦ tree-shake

The compiled runtime, in the browser

Live
lab.

Left is the editor. Right is @itslil/rehype-katex output, or the official rehype-katex@7.0.1 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/rehype-katex

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