Development build 586e1bd4
Typst文档简体中文版v0.15.1 + dev 586e1bd4

underline元素
Question mark
自始可用Go to source

Underlines text.

Example

This is #underline[important].

参数
Question mark

stroke
auto or length or color or gradient or stroke or tiling or dictionary
可用set规则
Question mark
默认值:auto

How to stroke the line.

If set to auto, takes on the text’s color and a thickness defined in the current font.

Expand展开示例
Take #underline( stroke: 1.5pt + red, offset: 2pt, [care], )

offset
auto or length
可用set规则
Question mark
默认值:auto

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

Expand展开示例
#underline(offset: 5pt)[ The Tale Of A Faraway Line I ]

extent
length
可用set规则
Question mark
默认值:0pt

The amount by which to extend the line beyond (or within if negative) the content.

Expand展开示例
#align(center, underline(extent: 2pt)[Chapter 1] )

evade
bool
可用set规则
Question mark
默认值:true

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

Expand展开示例
This #underline(evade: true)[is great]. This #underline(evade: false)[is less great].

background
bool
可用set规则
Question mark
默认值:false

Whether the line is placed behind the content it underlines.

Expand展开示例
#set underline(stroke: aqua + 5pt, evade: false) #underline(background: true)[Fully visible.] \ #underline(background: false)[Partially hidden.]

body
content
必需参数
Question mark
位置参数
Question mark

The content to underline.