@@ -21,19 +21,16 @@ use crate::model::{DocumentInfo, Numbering};
2121use crate :: text:: LocalName ;
2222use crate :: visualize:: { Color , Paint } ;
2323
24- /// Layouts its child onto one or multiple pages.
24+ /// その子要素を単一ページか複数ページにレイアウト。
2525///
26- /// Although this function is primarily used in set rules to affect page
27- /// properties, it can also be used to explicitly render its argument onto
28- /// a set of pages of its own.
26+ /// この関数は主にsetルールでページのプロパティに影響を与えるために使用されますが、引数を独自のページセットに明示的にレンダリングするためにも使用できます。
2927///
30- /// Pages can be set to use `{auto}` as their width or height. In this case, the
31- /// pages will grow to fit their content on the respective axis.
28+ /// ページでは幅と高さに `{auto}`が設定可能です。
29+ /// この場合、ページは各軸方向においてコンテンツに合わせて大きくなります。
3230///
33- /// The [Guide for Page Setup]($guides/page-setup-guide) explains how to use
34- /// this and related functions to set up a document with many examples.
31+ /// [ページセットアップガイド]($guides/page-setup-guide)では多くの例とともにこの関数と関連する関数を用いてどのように文書をセットアップするかを説明しています。
3532///
36- /// # Example
33+ /// # 例
3734/// ```example
3835/// >>> #set page(margin: auto)
3936/// #set page("us-letter")
@@ -42,15 +39,14 @@ use crate::visualize::{Color, Paint};
4239/// ```
4340#[ elem( Construct ) ]
4441pub struct PageElem {
45- /// A standard paper size to set width and height.
42+ /// 幅と高さを設定するための標準的な紙の大きさ。
4643 ///
47- /// This is just a shorthand for setting `width` and `height` and, as such,
48- /// cannot be retrieved in a context expression.
44+ /// これは`width`と`height`を設定するための単なる省略記法であり、その性質上コンテキスト式からは取得できません。
4945 #[ external]
5046 #[ default( Paper :: A4 ) ]
5147 pub paper : Paper ,
5248
53- /// The width of the page.
49+ /// ページの幅。
5450 ///
5551 /// ```example
5652 /// #set page(
@@ -72,12 +68,10 @@ pub struct PageElem {
7268 #[ ghost]
7369 pub width : Smart < Length > ,
7470
75- /// The height of the page.
71+ /// ページの高さ。
7672 ///
77- /// If this is set to `{auto}`, page breaks can only be triggered manually
78- /// by inserting a [page break]($pagebreak). Most examples throughout this
79- /// documentation use `{auto}` for the height of the page to dynamically
80- /// grow and shrink to fit their content.
73+ /// これが`{auto}`に設定された場合、[改ページ]($pagebreak)は手動で挿入したときのみ発火させることができます。
74+ /// このドキュメントのほとんどの例では、ページの高さに `{auto}` を指定しており、コンテンツに合わせて動的に伸縮するようにしています。
8175 #[ resolve]
8276 #[ parse(
8377 args. named( "height" ) ?
@@ -87,7 +81,7 @@ pub struct PageElem {
8781 #[ ghost]
8882 pub height : Smart < Length > ,
8983
90- /// Whether the page is flipped into landscape orientation.
84+ /// ページを90度回転させるかどうか。
9185 ///
9286 /// ```example
9387 /// #set page(
@@ -109,28 +103,24 @@ pub struct PageElem {
109103 #[ ghost]
110104 pub flipped : bool ,
111105
112- /// The page's margins.
113- ///
114- /// - `{auto}`: The margins are set automatically to 2.5/21 times the smaller
115- /// dimension of the page. This results in 2.5cm margins for an A4 page.
116- /// - A single length: The same margin on all sides.
117- /// - A dictionary: With a dictionary, the margins can be set individually.
118- /// The dictionary can contain the following keys in order of precedence:
119- /// - `top`: The top margin.
120- /// - `right`: The right margin.
121- /// - `bottom`: The bottom margin.
122- /// - `left`: The left margin.
123- /// - `inside`: The margin at the inner side of the page (where the
124- /// [binding]($page.binding) is).
125- /// - `outside`: The margin at the outer side of the page (opposite to the
126- /// [binding]($page.binding)).
127- /// - `x`: The horizontal margins.
128- /// - `y`: The vertical margins.
129- /// - `rest`: The margins on all sides except those for which the
130- /// dictionary explicitly sets a size.
131- ///
132- /// The values for `left` and `right` are mutually exclusive with
133- /// the values for `inside` and `outside`.
106+ /// ページの余白。
107+ ///
108+ /// - `{auto}`: 余白が自動的に短辺の2.5/21倍の大きさに設定されます。
109+ /// A4のページでは2.5cmの余白になります。
110+ /// - 単一の長さ指定: 全ての辺に同じ大きさの余白を適用します。
111+ /// - 辞書指定: 辞書を用いることで余白を個々に設定可能です。
112+ /// この辞書に含められるキーは以下のとおりです。リストは優先順位の順に並んでいます。
113+ /// - `top`: 上部の余白。
114+ /// - `right`: 右側の余白。
115+ /// - `bottom`: 下部の余白。
116+ /// - `left`: 左側の余白。
117+ /// - `inside`: ページの内側の余白([綴じ]($page.binding)側).
118+ /// - `outside`: ページの外側の余白([綴じ]($page.binding)の反対側).
119+ /// - `x`: 水平方向の余白。
120+ /// - `y`: 垂直方向の余白。
121+ /// - `rest`: 明示的に指定されていない残り全ての余白。
122+ ///
123+ /// `left`と`right`の値は`inside`と`outside`の値と同時に指定できません。
134124 ///
135125 /// ```example
136126 /// #set page(
@@ -149,22 +139,19 @@ pub struct PageElem {
149139 #[ ghost]
150140 pub margin : Margin ,
151141
152- /// On which side the pages will be bound.
142+ /// ページのどちら側を綴じるか。
153143 ///
154- /// - `{auto}`: Equivalent to `left` if the [text direction]($text.dir)
155- /// is left-to-right and `right` if it is right-to-left.
156- /// - `left`: Bound on the left side.
157- /// - `right`: Bound on the right side.
144+ /// - `{auto}`: [テキストの向き]($text.dir)が左から右なら`left`と等価となり、右から左なら`right`と等価となります。
145+ /// - `left`: 左側を綴じます。
146+ /// - `right`: 右側を綴じます。
158147 ///
159- /// This affects the meaning of the `inside` and `outside` options for
160- /// margins.
148+ /// これは余白の`inside`および`outside`オプションの意味に影響します。
161149 #[ ghost]
162150 pub binding : Smart < Binding > ,
163151
164- /// How many columns the page has.
152+ /// ぺージの段数。
165153 ///
166- /// If you need to insert columns into a page or other container, you can
167- /// also use the [`columns` function]($columns).
154+ /// ページや他のコンテナに段を挿入したい場合は[`columns`関数]($columns)も使用できます。
168155 ///
169156 /// ```example:single
170157 /// #set page(columns: 2, height: 4.8cm)
@@ -182,20 +169,15 @@ pub struct PageElem {
182169 #[ ghost]
183170 pub columns : NonZeroUsize ,
184171
185- /// The page's background fill.
172+ /// ページ背景の塗り潰し。
186173 ///
187- /// Setting this to something non-transparent instructs the printer to color
188- /// the complete page. If you are considering larger production runs, it may
189- /// be more environmentally friendly and cost-effective to source pre-dyed
190- /// pages and not set this property.
174+ /// これを非透明なものに設定すると、プリンターにページ全体を着色するよう指示します。
175+ /// 印刷規模が大きい場合は、このプロパティを設定せず、あらかじめ染色された用紙を調達したほうが環境にも優しくコスト削減もできるでしょう。
191176 ///
192- /// When set to `{none}`, the background becomes transparent. Note that PDF
193- /// pages will still appear with a (usually white) background in viewers,
194- /// but they are actually transparent. (If you print them, no color is used
195- /// for the background.)
177+ /// `{none}`に設定すると背景は透明になります。
178+ /// ビューワーではPDFのページに(通常は白色の)背景があるように見えますが、実際は透明であることに注意してください(印刷時には背景に色が使用されません)。
196179 ///
197- /// The default of `{auto}` results in `{none}` for PDF output, and
198- /// `{white}` for PNG and SVG.
180+ /// デフォルト値の`{auto}`は、PDF出力の場合は`{none}`となり、PNGおよびSVG出力の場合は`{white}`になります。
199181 ///
200182 /// ```example
201183 /// #set page(fill: rgb("444352"))
@@ -206,10 +188,9 @@ pub struct PageElem {
206188 #[ ghost]
207189 pub fill : Smart < Option < Paint > > ,
208190
209- /// How to [number ]($numbering) the pages.
191+ /// ページ[番号 ]($numbering)の付け方。
210192 ///
211- /// If an explicit `footer` (or `header` for top-aligned numbering) is
212- /// given, the numbering is ignored.
193+ /// `footer`(もしくは上部配置番号付けの場合は`header`)が明示的に与えられた場合、numberingは無視されます。
213194 ///
214195 /// ```example
215196 /// #set page(
@@ -224,9 +205,9 @@ pub struct PageElem {
224205 #[ ghost]
225206 pub numbering : Option < Numbering > ,
226207
227- /// A supplement for the pages.
208+ /// ページの補足語。
228209 ///
229- /// For page references, this is added before the page number.
210+ /// ページ参照では、これはページ番号の前に追加されます。
230211 ///
231212 /// ```example
232213 /// #set page(numbering: "1.", supplement: [p.])
@@ -237,12 +218,11 @@ pub struct PageElem {
237218 #[ ghost]
238219 pub supplement : Smart < Option < Content > > ,
239220
240- /// The alignment of the page numbering.
221+ /// ページ番号の配置。
241222 ///
242- /// If the vertical component is `top`, the numbering is placed into the
243- /// header and if it is `bottom`, it is placed in the footer. Horizon
244- /// alignment is forbidden. If an explicit matching `header` or `footer` is
245- /// given, the numbering is ignored.
223+ /// 垂直成分が`top`の場合は、番号はヘッダー内に配置され、`bottom`の場合はフッター内に配置されます。
224+ /// 水平方向には配置できません。
225+ /// 対応する`header`や`footer`が明示的に与えられた場合、numberingは無視されます。
246226 ///
247227 /// ```example
248228 /// #set page(
@@ -257,12 +237,12 @@ pub struct PageElem {
257237 #[ ghost]
258238 pub number_align : SpecificAlignment < HAlignment , OuterVAlignment > ,
259239
260- /// The page's header. Fills the top margin of each page.
240+ /// ページのヘッダー。
241+ /// ページの上部余白を埋めます。
261242 ///
262- /// - Content: Shows the content as the header.
263- /// - `{auto}`: Shows the page number if a `numbering` is set and
264- /// `number-align` is `top`.
265- /// - `{none}`: Suppresses the header.
243+ /// - コンテンツが与えられた場合: ヘッダーとしてコンテンツを表示します。
244+ /// - `{auto}`: `numbering`が設定されており、`number-align`が`top`の場合ページ番号を表示します。
245+ /// - `{none}`: ヘッダーを表示しません。
266246 ///
267247 /// ```example
268248 /// #set par(justify: true)
@@ -281,22 +261,21 @@ pub struct PageElem {
281261 #[ ghost]
282262 pub header : Smart < Option < Content > > ,
283263
284- /// The amount the header is raised into the top margin.
264+ /// 上部余白方向のヘッダーの上昇量。
285265 #[ resolve]
286266 #[ default( Ratio :: new( 0.3 ) . into( ) ) ]
287267 #[ ghost]
288268 pub header_ascent : Rel < Length > ,
289269
290- /// The page's footer. Fills the bottom margin of each page.
270+ /// ページのフッター。
271+ /// ページの下部余白を埋めます。
291272 ///
292- /// - Content: Shows the content as the footer.
293- /// - `{auto}`: Shows the page number if a `numbering` is set and
294- /// `number-align` is `bottom`.
295- /// - `{none}`: Suppresses the footer.
273+ /// - コンテンツが与えられた場合: フッターとしてコンテンツを表示します。
274+ /// - `{auto}`: `numbering`が設定されており、`number-align`が`bottom`の場合ページ番号を表示します。
275+ /// - `{none}`: フッターを表示しません。
296276 ///
297- /// For just a page number, the `numbering` property typically suffices. If
298- /// you want to create a custom footer but still display the page number,
299- /// you can directly access the [page counter]($counter).
277+ /// 単純なページ番号を使用する場合は、一般的に`numbering`プロパティで十分です。
278+ /// カスタムフッターを作成したい場合でページ番号を表示したいときは、[ページカウンター]($counter)に直接アクセスできます。
300279 ///
301280 /// ```example
302281 /// #set par(justify: true)
@@ -319,16 +298,16 @@ pub struct PageElem {
319298 #[ ghost]
320299 pub footer : Smart < Option < Content > > ,
321300
322- /// The amount the footer is lowered into the bottom margin.
301+ /// 下部余白方向のフッターの下降量。
323302 #[ resolve]
324303 #[ default( Ratio :: new( 0.3 ) . into( ) ) ]
325304 #[ ghost]
326305 pub footer_descent : Rel < Length > ,
327306
328- /// Content in the page's background.
307+ /// ページ背景のコンテンツ。
329308 ///
330- /// This content will be placed behind the page's body. It can be
331- /// used to place a background image or a watermark.
309+ /// このコンテンツはページ本文の背後に配置されます。
310+ /// これは背景画像や透かしに使用できます。
332311 ///
333312 /// ```example
334313 /// #set page(background: rotate(24deg,
@@ -345,9 +324,9 @@ pub struct PageElem {
345324 #[ ghost]
346325 pub background : Option < Content > ,
347326
348- /// Content in the page's foreground.
327+ /// ページ前景のコンテンツ。
349328 ///
350- /// This content will overlay the page's body.
329+ /// このコンテンツはページ本文の上に重なって表示されます。
351330 ///
352331 /// ```example
353332 /// #set page(foreground: text(24pt)[🥸])
@@ -360,11 +339,10 @@ pub struct PageElem {
360339 #[ ghost]
361340 pub foreground : Option < Content > ,
362341
363- /// The contents of the page(s).
342+ /// ページの本文。
364343 ///
365- /// Multiple pages will be created if the content does not fit on a single
366- /// page. A new page with the page properties prior to the function invocation
367- /// will be created after the body has been typeset.
344+ /// コンテンツが単一ページに収まらなかった場合は複数ページが作成されます。
345+ /// 関数呼び出し前に設定されていたページプロパティを適用した新しいページが本文組版後に作成されます。
368346 #[ external]
369347 #[ required]
370348 pub body : Content ,
@@ -395,11 +373,11 @@ impl LocalName for PageElem {
395373 const KEY : & ' static str = "page" ;
396374}
397375
398- /// A manual page break.
376+ /// 手動の改ページ。
399377///
400- /// Must not be used inside any containers.
378+ /// いかなるコンテナ内でも使用してはいけません。
401379///
402- /// # Example
380+ /// # 例
403381/// ```example
404382/// The next page contains
405383/// more details on compound theory.
@@ -410,13 +388,11 @@ impl LocalName for PageElem {
410388/// ```
411389#[ elem( title = "Page Break" ) ]
412390pub struct PagebreakElem {
413- /// If `{true}`, the page break is skipped if the current page is already
414- /// empty.
391+ /// `{true}`の場合、現在のページが既に空のとき改ページは行われません。
415392 #[ default( false ) ]
416393 pub weak : bool ,
417394
418- /// If given, ensures that the next page will be an even/odd page, with an
419- /// empty page in between if necessary.
395+ /// 設定された場合、必要に応じて空ページを追加して次のページが偶数/奇数ページになるようにします。
420396 ///
421397 /// ```example
422398 /// #set page(height: 30pt)
@@ -725,9 +701,9 @@ impl PageRanges {
725701/// Whether something should be even or odd.
726702#[ derive( Debug , Copy , Clone , Eq , PartialEq , Hash , Cast ) ]
727703pub enum Parity {
728- /// Next page will be an even page.
704+ /// 次のページが偶数ページになります。
729705 Even ,
730- /// Next page will be an odd page.
706+ /// 次のページが奇数ページになります。
731707 Odd ,
732708}
733709
@@ -793,7 +769,7 @@ macro_rules! papers {
793769 Paper ,
794770 self => self . name. into_value( ) ,
795771 $(
796- /// Produces a paper of the respective size.
772+ /// 指定された大きさの用紙を生成。
797773 $name => Self :: $var,
798774 ) *
799775 }
0 commit comments