TypstDocumentation

underlineShowable
Question mark

Underline text.

Example

This is #underline[important].
Preview

Parameters
Question mark

body
contentRequiredPositional
Question mark

The content to underline.

stroke
autolengthcolorstrokeShorthand
Question mark
Settable
Question mark

How to stroke the line. The text color and thickness are read from the font tables if auto.

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

offset
autolengthSettable
Question mark

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

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

extent
lengthSettable
Question mark

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

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

evade
booleanSettable
Question mark

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

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