翻訳済み
このページは日本語に翻訳済みです。
align
ElementElement functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.コンテンツを水平方向・垂直方向に配置。
例
コンテンツを水平方向に中央揃えにすることから始めましょう。
#set page(height: 120pt)
#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

垂直方向に中央揃えにするには horizon 配置を使用します。
#set page(height: 120pt)
#set align(horizon)
Vertically centered, \
the stage had entered, \
a new paragraph.

配置の組み合わせ
+
演算子を用いて2種類の配置を組み合わせることができます。
setルールの代わりに関数形式を用いて1つのコンテンツのみに適用してみましょう。
#set page(height: 120pt)
Though left in the beginning ...
#align(right + bottom)[
... they were right in the end, \
and with addition had gotten, \
the paragraph to the bottom!
]

配置のネスト
レイアウトコンテナおよびその内部要素に様々な配置設定を適用できます。 このようにすることで複雑なレイアウトを作成できます。
#align(center, block[
#set align(left)
Though centered together \
alone \
we \
are \
left.
])

同一行での配置設定
align
関数はブロックレベルで配置を実行するため、常に現在のパラグラフを中断します。
同じ行の一部を異なる配置にするためには、代わりに比率間隔を使用しなければなりません。
Start #h(1fr) End

引数Parameters 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.
alignment
PositionalPositional parameters are specified in order, without names.SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Positional
Positional parameters are specified in order, without names.
Settable
Settable parameters can be customized for all following uses of the function with a
set
rule.両方の軸に沿ったalignment。
デフォルト値: start + top
例を表示
#set page(height: 6cm)
#set text(lang: "ar")
مثال
#align(
end + horizon,
rect(inset: 12pt)[ركن]
)

body
RequiredRequired parameters must be specified when calling the function.PositionalPositional parameters are specified in order, without names.
Required
Required parameters must be specified when calling the function.
Positional
Positional parameters are specified in order, without names.
配置するコンテンツ。