Attach
Documentation for the attach functions.
Subscript, superscripts, and limits.
Attachments can be displayed either as sub/superscripts, or limits. Typst automatically decides which is more suitable depending on the base, but you can also control this manually with the scripts and limits functions.
If you want the base to stretch to fit long top and bottom attachments (for example, an arrow with text above it), use the stretch function.
Example
Syntax
This function also has dedicated syntax for attachments after the base: Use the underscore (_) to indicate a subscript i.e. bottom attachment and the hat (^) to indicate a superscript i.e. top attachment.
A base with optional attachments.
#math.attach(
base,
t: none | content,
b: none | content,
tl: none | content,
bl: none | content,
tr: none | content,
br: none | content
) -> contentParameters
Prop
Type
Forces a base to display attachments as scripts.
#math.scripts(
body
) -> contentParameters
Prop
Type
Forces a base to display attachments as limits.
#math.limits(
body,
inline: bool
) -> contentParameters
Prop
Type