@@ -42,17 +42,17 @@ use crate::text::TextElem;
4242/// #enum[First][Second]
4343/// ```
4444///
45- /// You can easily switch all your enumerations to a different numbering style
46- /// with a set rule.
45+ /// setルールを用いることで、
46+ /// すべてのリストを異なるナンバリングスタイルに簡単に切り替えることができます。
4747/// ```example
4848/// #set enum(numbering: "a)")
4949///
5050/// + Starting off ...
5151/// + Don't forget step two
5252/// ```
5353///
54- /// You can also use [`enum.item`]($enum.item) to programmatically customize the
55- /// number of each item in the enumeration:
54+ /// また、 [`enum.item`]($enum.item)を使用して、
55+ /// リストの各項目の番号を自由にカスタマイズすることもできます。
5656///
5757/// ```example
5858/// #enum(
@@ -62,30 +62,30 @@ use crate::text::TextElem;
6262/// )
6363/// ```
6464///
65- /// # Syntax
66- /// This functions also has dedicated syntax:
65+ /// # 構文
66+ /// この関数には専用の構文もあります。
6767///
68- /// - Starting a line with a plus sign creates an automatically numbered
69- /// enumeration item.
70- /// - Starting a line with a number followed by a dot creates an explicitly
71- /// numbered enumeration item.
68+ /// - 行の先頭にプラス記号をつけると、
69+ /// 自動的にナンバリングされたリスト項目が作成されます。
70+ /// - 行の先頭に数字とピリオドを付けると、
71+ /// 明示的に番号を指定したリスト項目が作成されます。
7272///
73- /// Enumeration items can contain multiple paragraphs and other block-level
74- /// content. All content that is indented more than an item's marker becomes
75- /// part of that item.
73+ /// リストの項目には、複数の段落やその他のブロックレベルのコンテンツを含めることができます。
74+ /// 項目のマーカーよりもインデントが深いコンテンツはすべて、
75+ /// その項目の一部となります。
7676#[ elem( scope, title = "Numbered List" , Show ) ]
7777pub struct EnumElem {
78- /// Defines the default [spacing]($enum.spacing) of the enumeration. If it
79- /// is `{false}`, the items are spaced apart with
80- /// [paragraph spacing]($par.spacing). If it is `{true}`, they use
81- /// [paragraph leading]($par.leading) instead. This makes the list more
82- /// compact, which can look better if the items are short.
78+ /// リストのデフォルトの [spacing]($enum.spacing)を定義します。
79+ /// これが `{false}`の場合、
80+ /// 項目の間隔は [paragraph spacing]($par.spacing)によって決まります。
81+ /// `{true}`の場合、代わりに [paragraph leading]($par.leading)が使用されます。
82+ /// これにより、項目が短い場合に見栄えが良くなるように、リストがコンパクトになります。
8383 ///
84- /// In markup mode, the value of this parameter is determined based on
85- /// whether items are separated with a blank line. If items directly follow
86- /// each other, this is set to `{true}`; if items are separated by a blank
87- /// line, this is set to `{false}`. The markup-defined tightness cannot be
88- /// overridden with set rules.
84+ /// マークアップモードでは、
85+ /// この引数の値は項目が空行で区切られているかどうかに基づいて決定されます。
86+ /// 項目が直接連続している場合、この値は `{true}`に設定されますが、
87+ /// 項目が空行で区切られている場合は `{false}`に設定されます。
88+ /// マークアップで定義された間隔はsetルールで上書きすることは出来ません。
8989 ///
9090 /// ```example
9191 /// + If an enum has a lot of text, and
@@ -99,12 +99,12 @@ pub struct EnumElem {
9999 #[ default( true ) ]
100100 pub tight : bool ,
101101
102- /// How to number the enumeration. Accepts a
103- /// [numbering pattern or function ]($numbering).
102+ /// リストをどのようにナンバリングするかを指定します。
103+ /// [ナンバリングパターンまたは関数 ]($numbering)を受け付けます。
104104 ///
105- /// If the numbering pattern contains multiple counting symbols, they apply
106- /// to nested enums. If given a function, the function receives one argument
107- /// if `full` is `{false}` and multiple arguments if `full` is ` {true}`.
105+ /// ナンバリングのパターンに複数のカウント記号が含まれている場合、
106+ /// それらはネストされたリストに適用されます。
107+ /// 関数が指定された場合、 `full`が `{false}`の場合は1つの引数を受け取り、` {true}`の場合は複数の引数を受け取ります。
108108 ///
109109 /// ```example
110110 /// #set enum(numbering: "1.a)")
@@ -122,7 +122,7 @@ pub struct EnumElem {
122122 #[ borrowed]
123123 pub numbering : Numbering ,
124124
125- /// Which number to start the enumeration with.
125+ /// リストの開始番号を指定します。
126126 ///
127127 /// ```example
128128 /// #enum(
@@ -134,8 +134,8 @@ pub struct EnumElem {
134134 #[ default( 1 ) ]
135135 pub start : usize ,
136136
137- /// Whether to display the full numbering, including the numbers of
138- /// all parent enumerations.
137+ /// 親リストの番号も含めて、
138+ /// 完全なナンバリングを表示するかどうかを指定します。
139139 ///
140140 ///
141141 /// ```example
@@ -148,33 +148,33 @@ pub struct EnumElem {
148148 #[ default( false ) ]
149149 pub full : bool ,
150150
151- /// The indentation of each item.
151+ /// 各項目のインデント。
152152 #[ resolve]
153153 pub indent : Length ,
154154
155- /// The space between the numbering and the body of each item.
155+ /// 各項目のナンバリングと本文の間隔を指定します。
156156 #[ resolve]
157157 #[ default( Em :: new( 0.5 ) . into( ) ) ]
158158 pub body_indent : Length ,
159159
160- /// The spacing between the items of the enumeration.
160+ /// リストの項目同士の間隔を指定します。
161161 ///
162- /// If set to `{auto}`, uses paragraph [`leading`]($par.leading) for tight
163- /// enumerations and paragraph [`spacing` ]($par.spacing) for wide
164- /// (non-tight) enumerations.
162+ /// `{auto}`に設定すると、
163+ /// コンパクトなリストの場合は段落の[leading ]($par.leading)を、
164+ /// 幅のある(コンパクトでない)リストの場合は段落の[spacing]($par.spacing)を使用します。
165165 pub spacing : Smart < Length > ,
166166
167- /// The alignment that enum numbers should have.
167+ /// リストの番号の配置を指定します。
168168 ///
169- /// By default, this is set to `{end + top}`, which aligns enum numbers
170- /// towards end of the current text direction (in left-to- right script,
171- /// for example, this is the same as `{right}`) and at the top of the line.
172- /// The choice of `{ end}` for horizontal alignment of enum numbers is
173- /// usually preferred over `{start}`, as numbers then grow away from the
174- /// text instead of towards it, avoiding certain visual issues. This option
175- /// lets you override this behaviour, however. (Also to note is that the
176- /// [unordered list]($list) uses a different method for this, by giving the
177- /// `marker` content an alignment directly.).
169+ /// デフォルトでは、この値は `{end + top}`に設定されており、これはリストの番号を
170+ /// 現在のテキスト方向の終端(例えば、左から右へ書く文書では、これは`{ right}`と同じ)と、
171+ /// 行の上部に揃えます。
172+ /// 一般的に、水平方向の番号の配置には`{start}`よりも`{ end}`を選択することが推奨されます。
173+ /// なぜなら、番号がテキストに向かってではなくテキストから離れる方向に伸びることによって、
174+ /// 特定の視覚的な問題を回避できるからです。
175+ /// しかし、このオプションを使用することで、この動作を上書きすることができます。
176+ /// (また、 [unordered list]($list)は異なる方法を用いており、直接`marker`コンテンツに配置を指定することで、
177+ /// これを行っていることに注意してください)
178178 ///
179179 /// ````example
180180 /// #set enum(number-align: start + bottom)
@@ -190,10 +190,10 @@ pub struct EnumElem {
190190 #[ default( HAlignment :: End + VAlignment :: Top ) ]
191191 pub number_align : Alignment ,
192192
193- /// The numbered list's items.
193+ /// 番号付きリストの項目。
194194 ///
195- /// When using the enum syntax, adjacent items are automatically collected
196- /// into enumerations, even through constructs like for loops.
195+ /// enum構文を使用する場合、forループのような構造を挟んでも、
196+ /// 隣接する項目は自動的にリストとしてまとめられます。
197197 ///
198198 /// ```example
199199 /// #for phase in (
@@ -316,14 +316,14 @@ fn layout_enum(
316316 layouter. layout ( engine)
317317}
318318
319- /// An enumeration item.
319+ /// 番号付きリストの項目。
320320#[ elem( name = "item" , title = "Numbered List Item" ) ]
321321pub struct EnumItem {
322- /// The item's number.
322+ /// 項目の番号。
323323 #[ positional]
324324 pub number : Option < usize > ,
325325
326- /// The item's body.
326+ /// 項目の本文。
327327 #[ required]
328328 pub body : Content ,
329329}
0 commit comments