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

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

Adds a line over text.

Example

#overline[A line over text.]

参数
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展开示例
#set text(fill: olive) #overline( stroke: green.darken(20%), offset: -12pt, [The Forest Theme], )

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展开示例
#overline(offset: -1.2em)[ The Tale Of A Faraway Line II ]

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

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

Expand展开示例
#set overline(extent: 4pt) #set underline(extent: 4pt) #overline(underline[Typography Today])

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

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

Expand展开示例
#overline( evade: false, offset: -7.5pt, stroke: 1pt, extent: 3pt, [Temple], )

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

Whether the line is placed behind the content it overlines.

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

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

The content to add a line over.