strike
Element
Element functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.Strikes through text.
Example
This is #strike[not] relevant.
Parameters
Parameters 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.
strike(
stroke: autolengthcolorgradientstrokepatterndictionary, offset: autolength, extent: length, background: bool, content,
) -> contentstroke
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.
Default:auto
View example
This is #strike(stroke: 1.5pt + red)[very stricken through]. \
This is #strike(stroke: 10pt)[redacted].
offset
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.
Default:auto
View example
#set text(font: "Inria Serif")
This is #strike(offset: auto)[low-ish]. \
This is #strike(offset: -3.5pt)[on-top].
extent
Settable
Settable 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.The amount by which to extend the line beyond (or within if negative) the content.
Default:0pt
View example
This #strike(extent: -2pt)[skips] parts of the word.
This #strike(extent: 2pt)[extends] beyond the word.
background
Settable
Settable 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 is placed behind the content.
Default:false
View example
#set strike(stroke: red)
#strike(background: true)[This is behind.] \
#strike(background: false)[This is in front.]
body
The content to strike through.