sub
ShowableShowable functions can be customized with show
rules.
Showable functions can be customized with
show
rules.Set text in subscript.
The text is rendered smaller and its baseline is lowered.
Example
Revenue#sub[yearly]

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.
body
The text to display in subscript.
typographic
booleanSettableSettable 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 to prefer the dedicated subscript characters of the font.
If this is enabled, Typst first tries to transform the text to subscript codepoints. If that fails, it falls back to rendering lowered and shrunk normal letters.
N#sub(typographic: true)[1]
N#sub(typographic: false)[1]

baseline
lengthSettableSettable 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.The baseline shift for synthetic subscripts. Does not apply if
typographic
is true and the font has subscript codepoints for the
given body
.
size
lengthSettableSettable 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.The font size for synthetic subscripts. Does not apply if
typographic
is true and the font has subscript codepoints for the
given body
.