pad
元素元素元素函数可用set
和show
规则自定义样式。
元素
元素函数可用
set
和show
规则自定义样式。Adds spacing around content.
The spacing can be specified for each side individually, or for all sides at once by specifying a positional argument.
Example
#set align(center)
#pad(x: 16pt, image("typing.jpg"))
_Typing speeds can be
measured in words per minute._

参数参数参数是传给函数的输入,写在函数名后的括号中。
参数
参数是传给函数的输入,写在函数名后的括号中。
x
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
可用set规则
可用set规则
可用
set
规则设置参数,更改后续调用时的默认值。The horizontal padding. Both left
and right
take precedence over
this.
默认值: 0pt
y
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
可用set规则
可用set规则
可用
set
规则设置参数,更改后续调用时的默认值。The vertical padding. Both top
and bottom
take precedence over this.
默认值: 0pt
rest
可用set规则可用set规则可用set
规则设置参数,更改后续调用时的默认值。
可用set规则
可用set规则
可用
set
规则设置参数,更改后续调用时的默认值。The padding for all sides. All other parameters take precedence over this.
默认值: 0pt
body
The content to pad at the sides.