equation
Display maths: a block of LaTeX on a line of its own, centred and typeset with KaTeX.
equationAliases:eq

#Attributes
colourThe colour the equation is set in: one of the nine hues, or
neutral for the body-text colour. A light- or dark- tone, or a hex(…) or rgb(…) literal, compiles but is drawn in the default colour.paintAlso written:
colorCan be written as shorthand: equation:valueDefault
neutral#Allowed content
Body { }TeX math source (block equation content)
#Allowed in
#Examples
equation{
E = mc^2
}equation:blue{
\int_0^1 x^2 \, dx = \frac{1}{3}
}equation{
(a + b)^2 &= a^2 + 2ab + b^2 \\
(a - b)^2 &= a^2 - 2ab + b^2
}#Notes
$…$is the same notation inside a sentence.- The body is literal: it reaches KaTeX exactly as written, braces and backslashes included.
- An
&outside any\begin…\endenvironment the body opens sets the whole body asalign*, so lines separated by\\align at their&. An&insidecases, a matrix or anarraybelongs to that environment. - A
{{…}}in the body is spliced while the document compiles. Avalue or arithmetic on constants works; a value read from the canvas, such as{{#k.value}}, is refused. - TeX that KaTeX cannot parse is shown as its source.
- In the narrative, a long equation breaks at its relations and operators, and one that cannot break scrolls sideways inside its own box.
#Writing guidance
- Prose & headings — What the narrative carries that the picture cannot, headings a reader can navigate by, and maths as LaTeX.