mirror of
https://github.com/quartz-community/latex.git
synced 2026-11-16 23:53:47 +00:00
Quartz's default latex plugin.
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .changeset | ||
| .github/workflows | ||
| src | ||
| test | ||
| types | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@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