翻訳済み
このページは日本語に翻訳済みです。
box
ElementElement functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.コンテンツの大きさを持つインラインレベルのコンテナ。
インライン数式、テキスト、ボックスを除く全ての要素はブロックレベルであり、段落の中に含めることはできません。 box関数を用いることで、そのような要素を段落にまとめることができます。 ボックスはデフォルトで、受け取ったコンテンツに合わせた大きさになりますが、明示的に大きさを指定することもできます。
例
Refer to the docs
#box(
height: 9pt,
image("docs.svg")
)
for more information.

引数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.
width
ボックスの幅。
ボックスは以下の例で示すように、比率を用いて幅を指定できます。
注意: 現在、パラグラフ内で比率指定が可能なのはボックスおよびその幅のみです。 比率で指定した大きさを持つ画像や図形などは今後サポートされる可能性があります。
デフォルト値: auto
例を表示
Line in #box(width: 1fr, line(length: 100%)) between.

height
ボックスの高さ。
デフォルト値: auto
baseline
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable
Settable parameters can be customized for all following uses of the function with a
set
rule.ボックスのベースラインをシフトさせる量。
デフォルト値: 0% + 0pt
例を表示
Image: #box(baseline: 40%, image("tiger.jpg", width: 2cm)).

radius
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable
Settable parameters can be customized for all following uses of the function with a
set
rule.ボックスの角の丸めの大きさ。 詳細はrectangleのドキュメントを参照してください。
デフォルト値: (:)
inset
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable
Settable parameters can be customized for all following uses of the function with a
set
rule.ボックスのコンテンツのパディング量。
注意: ボックスがテキストを含むとき、その正確な大きさは現在のテキストの端に依存します。
デフォルト値: (:)
例を表示
#rect(inset: 0pt)[Tight]

outset
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable
Settable parameters can be customized for all following uses of the function with a
set
rule.レイアウトに影響を与えずにボックスの大きさを拡大する量。
これはパディングが行のレイアウトに影響を与えるのを防ぐために便利です。 以下の例より一般的な場合については、未加工テキストのblockパラメーターのドキュメントを参照してください。
デフォルト値: (:)
例を表示
An inline
#box(
fill: luma(235),
inset: (x: 3pt, y: 0pt),
outset: (y: 3pt),
radius: 2pt,
)[rectangle].

clip
SettableSettable parameters can be customized for all following uses of the function with a set
rule.
Settable
Settable parameters can be customized for all following uses of the function with a
set
rule.ボックスの内側のコンテンツのクリッピングを行うか否か。 クリッピングは、ボックスの境界を超えたコンテンツを隠すため、ボックスのコンテンツがボックス本体よりも大きい場合に便利です。
デフォルト値: false
例を表示
#box(
width: 50pt,
height: 50pt,
clip: true,
image("tiger.jpg", width: 100pt, height: 100pt)
)
