跳到主要内容

touying-equation

Animated math equation. Use pause and meanwhile inside the equation body to reveal terms step by step.

Write the equation as a raw block (backtick string) or a plain string. Use pause (without backslash or #) as a pseudo-command inside the equation to insert a pause marker.

Example:

#show: simple-theme.with(aspect-ratio: "16-9")
= Slide
#touying-equation(`
f(x) &= pause x^2 + 2x + 1 \
&= pause (x + 1)^2
`)
Parameters

block : bool    default: true

Whether the equation is a block element. Default is true.

numbering : none | str    default: none

The numbering of the equation. Default is none.

supplement : auto | str    default: auto

The supplement of the equation. Default is auto.

scope : dictionary    default: (:)

Extra bindings passed to eval() when the body is a string or raw block.

body : str | content | function

The equation content. Accepts a raw block (e.g. `f(x) = pause x^2`), a plain string, or a callback self => str.

Returns: content