Contents

Quick Start

Install katex-render, mark an HTML page, and replace its LaTeX with KaTeX markup.

Requirements§

You need Linux x86_64 for the prebuilt binary, or Rust 1.91 or newer to build from source. KaTeX Render does not need Node.js, npm, or WebAssembly.

The page must already load KaTeX CSS and fonts. KaTeX Render does not copy them.

Install§

Install the latest Linux x86_64 prebuilt binary with the installer:

curl -fsSL https://raw.githubusercontent.com/gicrisf/katex-render/main/install.sh | bash

The installer places katex-render in ~/.local/bin. See Installation for pinned versions, manual downloads, and Cargo.

Mark a page§

Add the KaTeX stylesheet and some LaTeX to an HTML page:

<link rel="stylesheet" href="/assets/katex/katex.min.css">
<p>Inline: \( E = mc^2 \)</p>

The stylesheet path is the default marker. Pages without it are left alone.

Render the math§

After building the site, run:

katex-render --root public

The command replaces the LaTeX with KaTeX HTML and MathML. It does not modify scripts, stylesheets, fonts, or other assets.

Next steps§