TypstDocumentation

underlineElement
Question mark

Underline text.

Example

This is #underline[important].
Preview

Parameters
Question mark

stroke
auto or length or color or dictionary or stroke
Settable
Question mark

How to stroke the line.

See the line's documentation for more details. If set to auto, takes on the text's color and a thickness defined in the current font.

Default: auto

Take #underline(
  stroke: 1.5pt + red,
  offset: 2pt,
  [care],
)
Preview

offset
auto or length
Settable
Question mark

Position of the line relative to the baseline, read from the font tables if auto.

Default: auto

#underline(offset: 5pt)[
  The Tale Of A Faraway Line I
]
Preview

extent
length
Settable
Question mark

Amount that the line will be longer or shorter than its associated text.

Default: 0pt

#align(center,
  underline(extent: 2pt)[Chapter 1]
)
Preview

evade
boolean
Settable
Question mark

Whether the line skips sections in which it would collide with the glyphs.

Default: true

This #underline(evade: true)[is great].
This #underline(evade: false)[is less great].
Preview

body
content
RequiredPositional
Question mark

The content to underline.