Contents

CLI Reference

Options, output summary, diagnostics, and exit status.

Synopsis§

katex-render [OPTIONS]

Options§

OptionMeaning
--root <DIR>Directory containing built HTML. Defaults to public.
--marker <STRING>Only process pages containing this string. Defaults to assets/katex/katex.min.css.
-h, --helpPrint usage.
-V, --versionPrint the version.

Output summary§

The command prints a summary:

katex-render: 2 equations on 1 of 99 pages

The first number is the rendered equation count. The second is the number of pages written. The third is the number of HTML files scanned.

Exit status§

The command exits with 0 when every processed page succeeds. It exits with 1 when an HTML, KaTeX, or file I/O error occurs. Invalid command-line arguments exit with 2 through the argument parser.

Behavior§

  • It processes only files ending in .html.
  • It processes only pages containing the marker.
  • It writes only pages that changed.
  • It fails on the first KaTeX parse error.
  • It does not add or remove scripts, stylesheets, fonts, or other assets.
  • It makes no network requests.