情報アイコン
情報 / Info
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「Typst Japan Community」がTypst v0.13.1の公式ドキュメントを翻訳したものです。誤訳や古い情報が含まれている可能性があるため、公式ドキュメントとの併用を推奨します。翻訳の改善やサイトの機能向上について、GitHubでのIssueやPull Requestを歓迎します。コミュニティにご興味のある方はDiscordサーバー「くみはんクラブ」にぜひご参加ください。
This site provides a Japanese translation of the Typst v0.13.1 documentation maintained by the "Typst Japan Community" with permission from Typst GmbH. We recommend using this alongside the official documentation. We welcome contributions through Issues and Pull Requests on our GitHub repository for both translation improvements and website enhancements. Feel free to join our Discord server "Kumihan Club".
言語アイコン
翻訳率
21%
言語アイコン
翻訳済み

このページは日本語に翻訳済みです。

box
Element
Element
Element functions can be customized with set and show rules.

コンテンツの大きさを持つインラインレベルのコンテナ。

インライン数式、テキスト、ボックスを除く全ての要素はブロックレベルであり、段落の中に含めることはできません。 box関数を用いることで、そのような要素を段落にまとめることができます。 ボックスはデフォルトで、受け取ったコンテンツに合わせた大きさになりますが、明示的に大きさを指定することもできます。

Refer to the docs
#box(
  height: 9pt,
  image("docs.svg")
)
for more information.
Preview

引数
Parameters
Parameters are the inputs to a function. They are specified in parentheses after the function name.

width
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスの幅。

ボックスは以下の例で示すように、比率を用いて幅を指定できます。

注意: 現在、パラグラフ内で比率指定が可能なのはボックスおよびその幅のみです。 比率で指定した大きさを持つ画像や図形などは今後サポートされる可能性があります。

デフォルト値:

auto

右矢印アイコン
例を表示
Line in #box(width: 1fr, line(length: 100%)) between.
Preview

height
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスの高さ。

デフォルト値:

auto

baseline
Settable
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)).
Preview

fill
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスの背景色。 詳細はrectangleのドキュメントを参照してください。

デフォルト値:

none

stroke
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスの枠線の色。 詳細はrectangleのドキュメントを参照してください。

デフォルト値:

(:)

radius
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスの角の丸めの大きさ。 詳細はrectangleのドキュメントを参照してください。

デフォルト値:

(:)

inset
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスのコンテンツのパディング量。

注意: ボックスがテキストを含むとき、その正確な大きさは現在のテキストの端に依存します。

デフォルト値:

(:)

右矢印アイコン
例を表示
#rect(inset: 0pt)[Tight]
Preview

outset
Settable
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].
Preview

clip
Settable
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)
)
Preview

body
Positional
Positional
Positional parameters are specified in order, without names.
Settable
Settable
Settable parameters can be customized for all following uses of the function with a set rule.

ボックスのコンテンツ。

デフォルト値:

none

検索