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

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

Strikes through text.

Example

This is #strike[not] relevant.

参数
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.

Note: Please don’t use this for real redaction as you can still copy paste the text.

Expand展开示例
This is #strike(stroke: 1.5pt + red)[very stricken through]. \ This is #strike(stroke: 10pt)[redacted].

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

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

This is useful if you are unhappy with the offset your font provides.

Expand展开示例
#set text(font: "Inria Serif") This is #strike(offset: auto)[low-ish]. \ This is #strike(offset: -3.5pt)[on-top].

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

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

Expand展开示例
This #strike(extent: -2pt)[skips] parts of the word. This #strike(extent: 2pt)[extends] beyond the word.

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

Whether the line is placed behind the content.

Expand展开示例
#set strike(stroke: red + 2pt) #strike(background: true)[This is behind.] \ #strike(background: false)[This is in front.]

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

The content to strike through.