align
ShowableShowable functions can be customized with show
rules.
Showable functions can be customized with
show
rules.Align content horizontally and vertically.
Example
#set align(center)
Centered text, a sight to see \
In perfect balance, visually \
Not left nor right, it stands alone \
A work of art, a visual throne

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.
align()
body
The content to align.
alignment
alignment2d alignmentPositionalPositional parameters are specified in order, without names.SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Positional parameters are specified in order, without names.
Settable parameters can be customized for all following uses of the function with a
set
rule.The alignment along both axes.
Possible values for horizontal alignments are:
start
end
left
center
right
The start
and end
alignments are relative to the current text
direction.
Possible values for vertical alignments are:
top
horizon
bottom
To align along both axes at the same time, add the two alignments using
the +
operator to get a 2d alignment
. For example, top + right
aligns the content to the top right corner.
#set page(height: 6cm)
#set text(lang: "ar")
مثال
#align(
end + horizon,
rect(inset: 12pt)[ركن]
)
