pad
ElementElement functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.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._

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