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._

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