Math rendering reference
Reference post that exercises every LaTeX case the site must render: inline, display, aligned, matrices, sums, integrals.
- meta
- math
This post is the acceptance test for the math pipeline (FR-304). If anything below looks wrong, the build is broken.
Inline math
Euler’s identity sits inside a sentence. A vector uses the custom \R macro, and uses \mathbb. Fractions inline: .
Display math
Aligned equations
Matrices
A very long equation
On a phone this should scroll sideways inside its own box, while the page itself stays put:
Things that must not become math
- Price is $20, and another item costs $35.
- Inline code keeps dollars literal:
echo $HOMEandcost = $5.
# Code blocks are highlighted by Shiki (min-light), dollars untouched
price = "$20"
def mean(xs):
return sum(xs) / len(xs)
Tables and footnotes (GFM)
| Symbol | Meaning |
|---|---|
| real numbers | |
| gradient |
KaTeX runs at build time, so this page ships no math JavaScript.1
Footnotes
-
Only the KaTeX stylesheet and fonts are loaded, and only on pages that contain math. ↩