underline
ElementElement functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.Underline text.
Example
This is #underline[important].

ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
underline() -> content
stroke
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable parameters can be customized for all following uses of the function with a
set
rule.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],
)

offset
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
]

extent
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable parameters can be customized for all following uses of the function with a
set
rule.Amount that the line will be longer or shorter than its associated text.
Default: 0pt
#align(center,
underline(extent: 2pt)[Chapter 1]
)

evade
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable parameters can be customized for all following uses of the function with a
set
rule.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].

body
The content to underline.