@@ -16,22 +16,20 @@ use crate::text::TextElem;
1616
1717/// ラベルや参考文献への参照。
1818///
19- /// Takes a label and cross-references it. There are two kind of references,
20- /// determined by its [`form`]($ref.form): `{"normal"}` and `{"page"}`.
19+ /// ラベルを指定して、その参照を生成します。
20+ /// 参照の [`form`]($ref.form)には `{"normal"}`と `{"page"}`の2種類があります。
2121///
22- /// The default, a `{"normal"}` reference, produces a textual reference to a
23- /// label. For example, a reference to a heading will yield an appropriate
24- /// string such as "Section 1" for a reference to the first heading. The
25- /// references are also links to the respective element. Reference syntax can
26- /// also be used to [cite] from a bibliography.
22+ /// デフォルトの`{"normal"}`参照では、ラベルに対するテキスト形式の参照が作られます。
23+ /// たとえば見出しへの参照なら、"Section 1"などのような適切な文字列が表示されます。
24+ /// この参照は、該当する要素へのリンクとしても機能します。
25+ /// また、参照の構文は文献リストからの引用を行う[cite]にも使用できます。
2726///
28- /// As the default form requires a supplement and numbering, the label must be
29- /// attached to a _referenceable element_. Referenceable elements include
30- /// [headings]($heading), [figures]($figure), [equations]($math.equation), and
31- /// [footnotes]($footnote). To create a custom referenceable element like a
32- /// theorem, you can create a figure of a custom [`kind`]($figure.kind) and
33- /// write a show rule for it. In the future, there might be a more direct way
34- /// to define a custom referenceable element.
27+ /// このデフォルト形式では補足語と番号が必要なため、ラベルは _参照可能な要素_ に付けなくてはなりません。
28+ /// 参照可能な要素としては、
29+ /// [headings]($heading)、[figures]($figure)、[equations]($math.equation)、[footnotes]($footnote)
30+ /// などがあります。
31+ /// 定理(theorem)などのカスタム参照可能要素を作成したい場合は、カスタム[`kind`]($figure.kind)の図表として作成し、それに対応するshowルールを書くことで作成可能です。
32+ /// 将来的には、カスタム参照可能要素をもっと直接的に定義する方法が導入されるかもしれません。
3533///
3634/// # 例
3735/// ```example
@@ -61,11 +59,11 @@ use crate::text::TextElem;
6159/// ```
6260///
6361/// # Syntax
64- /// This function also has dedicated syntax: A `{"normal"}` reference to a
65- /// label can be created by typing an `@` followed by the name of the label
66- /// (e.g. `[= Introduction <intro>]` can be referenced by typing `[@intro]`).
62+ /// この機能には専用の記法も用意されています。
63+ /// `{"normal"}` の参照を作成するためには `@`に続けてラベル名を入力します。
64+ /// (たとえば `[= Introduction <intro>]`というラベルを参照するには `[@intro]`と入力します。)
6765///
68- /// 補足をカスタマイズするには 、
66+ /// 補足語をカスタマイズするには 、
6967/// `[@intro[Chapter]]`のように、参照の後に角括弧でコンテンツを追加します。
7068///
7169/// # カスタム
@@ -106,18 +104,16 @@ pub struct RefElem {
106104 #[ required]
107105 pub target : Label ,
108106
109- /// 参照の補足 。
107+ /// 参照の補足語 。
110108 ///
111- /// If the [`form`]($ref.form) is set to `{"normal"}`:
112- /// - For references to headings or figures, this is added before the
113- /// referenced number.
114- /// - For citations, this can be used to add a page number.
109+ /// [`form`]($ref.form)が`{"normal"}`で設定されている場合は以下のとおりです。
110+ /// - 見出しや図への参照では、この値が参照番号の前に追加されます。
111+ /// - 文献引用の場合は、ページ番号などを追記するのに使えます。
115112 ///
116- /// If the [`form`]($ref.form) is set to `{"page"}`, then this is added
117- /// before the page number of the label referenced.
113+ /// もし [`form`]($ref.form)が `{"page"}`に設定されている場合には、
114+ /// 参照先ラベルのページ番号の前にこの値が追加されます。
118115 ///
119- /// If a function is specified, it is passed the referenced element and
120- /// should return content.
116+ /// また、関数が指定されている場合は、それに参照先の要素が渡され、戻り値のコンテンツが補足語となります。
121117 ///
122118 /// ```example
123119 /// #set heading(numbering: "1.")
@@ -140,7 +136,7 @@ pub struct RefElem {
140136 #[ borrowed]
141137 pub supplement : Smart < Option < Supplement > > ,
142138
143- /// The kind of reference to produce.
139+ /// 生成する参照の種類
144140 ///
145141 /// ```example
146142 /// #set page(numbering: "1")
@@ -360,10 +356,10 @@ cast! {
360356/// The form of the reference.
361357#[ derive( Debug , Default , Copy , Clone , Eq , PartialEq , Hash , Cast ) ]
362358pub enum RefForm {
363- /// Produces a textual reference to a label.
359+ /// ラベルに対して文字列での参照を生成します。
364360 #[ default]
365361 Normal ,
366- /// Produces a page reference to a label.
362+ /// ラベルに対してページ番号での参照を生成します。
367363 Page ,
368364}
369365
0 commit comments