math
block
Typesets a LaTeX equation to inline SVG via the pure-Rust RaTeX toolchain; glyph outlines embed so it renders without a webfont.
math typesets a LaTeX equation to inline SVG via the pure-Rust RaTeX toolchain. Glyph outlines embed in the SVG, so equations render the same whether the page is opened locally or served — no webfont dependency.
Block equations
math "…" {} (or math <<TEX … TEX) renders a centred display equation. Use a raw heredoc for backslash-heavy LaTeX.
math "E = mc^2"
math <<'TEX'
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
TEX
Inline math
Inside any p body or span, two inline patterns produce math: $…$ is text-style (flows with the prose) and $$…$$ is display-style (slightly larger, still inline). The $…$ pattern requires a non-space at each delimiter, so currency stays untouched. See formatting.
| Pattern | Style |
|---|---|
| Text-style inline math — flows with the surrounding prose. | |
| Display-style inline math — slightly larger, still inline. |
Related
- diagram