equation
ElementElement functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.A mathematical equation.
Can be displayed inline with text or as a separate block.
Example
#set text(font: "New Computer Modern")
Let $a$, $b$, and $c$ be the side
lengths of right-angled triangle.
Then, we know that:
$ a^2 + b^2 = c^2 $
Prove by induction:
$ sum_(k=1)^n k = (n(n+1)) / 2 $

Syntax
This function also has dedicated syntax: Write mathematical markup within dollar signs to create an equation. Starting and ending the equation with at least one space lifts it into a separate block that is centered horizontally. For more details about math syntax, see the main math page.
ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
block
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable parameters can be customized for all following uses of the function with a
set
rule.Whether the equation is displayed as a separate block.
Default: false
numbering
How to number block-level equations.
Default: none
#set math.equation(numbering: "(1)")
We define:
$ phi.alt := (1 + sqrt(5)) / 2 $ <ratio>
With @ratio, we get:
$ F_n = floor(1 / sqrt(5) phi.alt^n) $

body
The contents of the equation.