Math notation
KaTeX-powered LaTeX in Carina docs — inline, display, matrices, and complex AMS layouts.
Carina docs render LaTeX with KaTeX at build time.
- Inline: wrap with single dollars —
$E = mc^2$→ - Display: double dollars on their own lines
- Escape hatch:
<Math formula="..." />for programmatic / very dense expressions
Inline
Section titled “Inline”The Gaussian integral is .
A policy score might be for command class .
Display
Section titled “Display”Aligned steps
Section titled “Aligned steps”Matrix
Section titled “Matrix”Cases & piecewise
Section titled “Cases & piecewise”Complex (programmatic <Math>)
Section titled “Complex (programmatic <Math>)”Useful when the formula is built in JS or you want display isolation:
Limits of KaTeX
Section titled “Limits of KaTeX”Authoring cheatsheet
Section titled “Authoring cheatsheet”| Need | Syntax |
|---|---|
| Inline | $a_i$ |
| Display | $$ … $$ on its own lines |
| Align | \begin{aligned} … \end{aligned} inside $$ |
| Matrix | \begin{pmatrix} … \end{pmatrix} |
| Cases | \begin{cases} … \end{cases} |
| Component | <Math formula={String.raw…} /> |
Dollar signs inside code fences are not math — they stay literal.
Source of truth
Section titled “Source of truth”- Rendering: KaTeX pipeline in
apps/docs(Starlight + rehype) - Authoring:
apps/docs/AUTHORING.md· component<Math> - Not a product feature of the runtime — docs-only
- Authoring components stay here; product path starts at Overview
Was this page helpful?
What went wrong?
Thanks for the feedback.
One vote per page is recorded during this session.