@@ -11,14 +11,13 @@ use crate::layout::{
1111} ;
1212use crate :: visualize:: { Paint , Stroke } ;
1313
14- /// An inline-level container that sizes content.
14+ /// コンテンツの大きさを持つインラインレベルのコンテナ。
1515///
16- /// All elements except inline math, text, and boxes are block-level and cannot
17- /// occur inside of a [paragraph]($par). The box function can be used to
18- /// integrate such elements into a paragraph. Boxes take the size of their
19- /// contents by default but can also be sized explicitly.
16+ /// インライン数式、テキスト、ボックスを除く全ての要素はブロックレベルであり、[段落]($par)の中に含めることはできません。
17+ /// box関数を用いることで、そのような要素を段落にまとめることができます。
18+ /// ボックスはデフォルトで、受け取ったコンテンツに合わせた大きさになりますが、明示的に大きさを指定することもできます。
2019///
21- /// # Example
20+ /// # 例
2221/// ```example
2322/// Refer to the docs
2423/// #box(
@@ -29,51 +28,48 @@ use crate::visualize::{Paint, Stroke};
2928/// ```
3029#[ elem]
3130pub struct BoxElem {
32- /// The width of the box.
31+ /// ボックスの幅。
3332 ///
34- /// Boxes can have [fractional]($fraction) widths, as the example below
35- /// demonstrates.
33+ /// ボックスは以下の例で示すように、[比率]($fraction)を用いて幅を指定できます。
3634 ///
37- /// _Note:_ Currently, only boxes and only their widths might be fractionally
38- /// sized within paragraphs. Support for fractionally sized images, shapes,
39- /// and more might be added in the future.
35+ /// _注意:_ 現在、パラグラフ内で比率指定が可能なのはボックスおよびその幅のみです。
36+ /// 比率で指定した大きさを持つ画像や図形などは今後サポートされる可能性があります。
4037 ///
4138 /// ```example
4239 /// Line in #box(width: 1fr, line(length: 100%)) between.
4340 /// ```
4441 pub width : Sizing ,
4542
46- /// The height of the box.
43+ /// ボックスの高さ。
4744 pub height : Smart < Rel < Length > > ,
4845
49- /// An amount to shift the box's baseline by.
46+ /// ボックスのベースラインをシフトさせる量。
5047 ///
5148 /// ```example
5249 /// Image: #box(baseline: 40%, image("tiger.jpg", width: 2cm)).
5350 /// ```
5451 #[ resolve]
5552 pub baseline : Rel < Length > ,
5653
57- /// The box's background color. See the
58- /// [rectangle's documentation ]($rect.fill) for more details.
54+ /// ボックスの背景色。
55+ /// 詳細は[rectangleのドキュメント ]($rect.fill)を参照してください。
5956 pub fill : Option < Paint > ,
6057
61- /// The box's border color. See the
62- /// [rectangle's documentation ]($rect.stroke) for more details.
58+ /// ボックスの境界線の色。
59+ /// 詳細は[rectangleのドキュメント ]($rect.stroke)を参照してください。
6360 #[ resolve]
6461 #[ fold]
6562 pub stroke : Sides < Option < Option < Stroke > > > ,
6663
67- /// How much to round the box's corners. See the
68- /// [rectangle's documentation ]($rect.radius) for more details.
64+ /// ボックスの角の丸めの大きさ。
65+ /// 詳細は[rectangleのドキュメント ]($rect.radius)を参照してください。
6966 #[ resolve]
7067 #[ fold]
7168 pub radius : Corners < Option < Rel < Length > > > ,
7269
73- /// How much to pad the box's content.
70+ /// ボックスのコンテンツのパディング量
7471 ///
75- /// _Note:_ When the box contains text, its exact size depends on the
76- /// current [text edges]($text.top-edge).
72+ /// _注意:_ ボックスがテキストを含むとき、その正確な大きさは現在の[テキストの端]($text.top-edge)に依存します。
7773 ///
7874 /// ```example
7975 /// #rect(inset: 0pt)[Tight]
@@ -82,11 +78,10 @@ pub struct BoxElem {
8278 #[ fold]
8379 pub inset : Sides < Option < Rel < Length > > > ,
8480
85- /// How much to expand the box's size without affecting the layout.
81+ /// レイアウトに影響を与えずにボックスの大きさを拡大する量。
8682 ///
87- /// This is useful to prevent padding from affecting line layout. For a
88- /// generalized version of the example below, see the documentation for the
89- /// [raw text's block parameter]($raw.block).
83+ /// これはパディングが行のレイアウトに影響を与えるのを防ぐために便利です。
84+ /// 以下の例より一般的な場合については、[未加工テキストのblockパラメーター]($raw.block)のドキュメントを参照してください。
9085 ///
9186 /// ```example
9287 /// An inline
@@ -101,10 +96,8 @@ pub struct BoxElem {
10196 #[ fold]
10297 pub outset : Sides < Option < Rel < Length > > > ,
10398
104- /// Whether to clip the content inside the box.
105- ///
106- /// Clipping is useful when the box's content is larger than the box itself,
107- /// as any content that exceeds the box's bounds will be hidden.
99+ /// ボックスの内側のコンテンツのクリッピングを行うか否か。
100+ /// クリッピングは、ボックスの境界を超えたコンテンツを隠すため、ボックスのコンテンツがボックス本体よりも大きい場合に便利です。
108101 ///
109102 /// ```example
110103 /// #box(
@@ -117,7 +110,7 @@ pub struct BoxElem {
117110 #[ default( false ) ]
118111 pub clip : bool ,
119112
120- /// The contents of the box.
113+ /// ボックスの内容。
121114 #[ positional]
122115 #[ borrowed]
123116 pub body : Option < Content > ,
0 commit comments