Info
This site is generated using the static site generator developed by the Typst Community. Please adjust the text content of this banner according to your usage requirements. At Typst GmbH's request, when publishing documentation, you must clearly indicate that it is non-official and display the version of Typst being documented. For details, refer to Issue #874 on typst/typst.
TypstDocumentEnglish
v0.dev.2025-09-12

Sizes

Forced size styles for expressions within formulas.

These functions allow manual configuration of the size of equation elements to make them look as in a display/inline equation or as if used in a root or sub/superscripts.

Function

display

Forced display style in math.

This is the normal size for block equations.

$sum_i x_i/2 = display(sum_i x_i/2)$
Preview

body
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The content to size.

cramped

Whether to impose a height restriction for exponents, like regular sub- and superscripts do.

Default value:

false

inline

Forced inline (text) style in math.

This is the normal size for inline equations.

$ sum_i x_i/2
    = inline(sum_i x_i/2) $
Preview

body
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The content to size.

cramped

Whether to impose a height restriction for exponents, like regular sub- and superscripts do.

Default value:

false

script

Forced script style in math.

This is the smaller size used in powers or sub- or superscripts.

$sum_i x_i/2 = script(sum_i x_i/2)$
Preview

body
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The content to size.

cramped

Whether to impose a height restriction for exponents, like regular sub- and superscripts do.

Default value:

true

sscript

Forced second script style in math.

This is the smallest size, used in second-level sub- and superscripts (script of the script).

$sum_i x_i/2 = sscript(sum_i x_i/2)$
Preview

body
Required
Required
Required parameters must be specified when calling the function.
Positional
Positional
Positional parameters can be set by specifying them in order, omitting the parameter name.

The content to size.

cramped

Whether to impose a height restriction for exponents, like regular sub- and superscripts do.

Default value:

true

Open official docs

Search