Quartz's default latex plugin.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-09 23:32:09 +01:00
.changeset chore: version package 2026-11-09 22:30:43 +00:00
.github/workflows ci: run ci.yml on the changesets version PR and report it as a commit status 2026-11-09 03:47:25 +01:00
src feat(plugins): latex as community plugin 2026-02-13 13:19:06 +01:00
test feat(plugins): latex as community plugin 2026-02-13 13:19:06 +01:00
types fix: centralize type declarations and add missing dependency 2026-03-16 18:54:46 +01:00
.eslintrc.json fix: centralize type declarations and add missing dependency 2026-03-16 18:54:46 +01:00
.gitignore chore: migrate to npm publishing 2026-07-23 09:07:18 +02:00
.prettierignore fix: centralize type declarations and add missing dependency 2026-03-16 18:54:46 +01:00
.prettierrc Initial commit 2026-02-13 12:21:08 +01:00
CHANGELOG.md chore: version package 2026-11-09 22:30:43 +00:00
LICENSE Initial commit 2026-02-13 12:21:08 +01:00
package-lock.json chore: version package 2026-11-09 22:30:43 +00:00
package.json chore: version package 2026-11-09 22:30:43 +00:00
README.md docs(readme): Quartz 5.1 — npm install and config, correct options and defaults 2026-11-09 22:57:49 +01:00
tsconfig.build.json fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
tsconfig.json Initial commit 2026-02-13 12:21:08 +01:00
tsup.config.ts fix: bundle JS deps while excluding native modules from bundling 2026-04-27 22:26:41 +02:00
vitest.config.ts Initial commit 2026-02-13 12:21:08 +01:00

@quartz-community/latex

Renders LaTeX math equations using KaTeX, MathJax, or Typst rendering engines.

Installation

npx quartz plugin add @quartz-community/latex

Usage

This plugin is already enabled in the default quartz.config.yaml:

plugins:
  - source: "@quartz-community/latex"
    enabled: true
    options:
      renderEngine: katex
      customMacros:
        "\\R": "\\mathbb{R}"
    order: 80

Configuration

Option Type Default Description
renderEngine "katex" | "mathjax" | "typst" "katex" The engine to render equations with: KaTeX, MathJax (SVG output) or Typst.
customMacros Record<string, string | Args[]> {} Custom macros for all LaTeX blocks, e.g. {"\\R": "\\mathbb{R}"}. Used by KaTeX and MathJax; Typst ignores it.
katexOptions KatexOptions undefined Options passed to KaTeX (KaTeX docs).
mathJaxOptions MathjaxOptions undefined Options passed to MathJax (MathJax docs).
typstOptions TypstOptions undefined Options passed to the Typst renderer.

With KaTeX, the KaTeX stylesheet and its copy-tex script are loaded from jsDelivr.

Documentation

See the Quartz documentation for more information.

License

MIT