Subscript
sub
Renders text in subscript.
The text is rendered smaller and its baseline is lowered.
Example
Revenue#sub[yearly]#sub(
typographic: bool,
baseline: auto | length,
size: auto | length,
body
) -> contentParameters
- typographic:
- description: Whether to use subscript glyphs from the font if available. Ideally, subscripts glyphs are provided by the font (using the
subsOpenType feature). Otherwise, Typst is able to synthesize subscripts by lowering and scaling down regular glyphs. When this is set tofalse, synthesized glyphs will be used regardless of whether the font provides dedicated subscript glyphs. Whentrue, synthesized glyphs may still be used in case the font does not provide the necessary subscript glyphs.typst N#sub(typographic: true)[1] N#sub(typographic: false)[1] - type: bool
- default: true
- description: Whether to use subscript glyphs from the font if available. Ideally, subscripts glyphs are provided by the font (using the
- baseline:
- description: The downward baseline shift for synthesized subscripts. This only applies to synthesized subscripts. In other words, this has no effect if
typographicistrueand the font provides the necessary subscript glyphs. If set toauto, the baseline is shifted according to the metrics provided by the font, with a fallback to0.2emin case the font does not define the necessary metrics. - type: auto | length
- default: auto
- description: The downward baseline shift for synthesized subscripts. This only applies to synthesized subscripts. In other words, this has no effect if
- size:
- description: The font size for synthesized subscripts. This only applies to synthesized subscripts. In other words, this has no effect if
typographicistrueand the font provides the necessary subscript glyphs. If set toauto, the size is scaled according to the metrics provided by the font, with a fallback to0.6emin case the font does not define the necessary metrics. - type: auto | length
- default: auto
- description: The font size for synthesized subscripts. This only applies to synthesized subscripts. In other words, this has no effect if
- body:
- description: The text to display in subscript.
- type: content
- default: None