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: relative, top: relative, right: relative, bottom: relative, x: relative, y: relative, rest: relative, content,
) -> contentleft
The padding at the left side.
默认:0pt
top
The padding at the top side.
默认:0pt
right
The padding at the right side.
默认:0pt
bottom
The padding at the bottom side.
默认:0pt
x
The horizontal padding. Both left
and right
take precedence over
this.
默认:0pt
y
The vertical padding. Both top
and bottom
take precedence over this.
默认:0pt
rest
The padding for all sides. All other parameters take precedence over this.
默认:0pt
body
The content to pad at the sides.