Skip to content

Commit b1e2eeb

Browse files
docs/reference/model/ref/の翻訳 (#98)
Co-authored-by: Shunsuke KIMURA <[email protected]>
1 parent b891c8b commit b1e2eeb

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

crates/typst/src/model/reference.rs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ use crate::model::{
1414
};
1515
use crate::text::TextElem;
1616

17-
/// A reference to a label or bibliography.
17+
/// ラベルや参考文献への参照。
1818
///
19-
/// Produces a textual reference to a label. For example, a reference to a
20-
/// heading will yield an appropriate string such as "Section 1" for a reference
21-
/// to the first heading. The references are also links to the respective
22-
/// element. Reference syntax can also be used to [cite] from a bibliography.
19+
/// ラベルに対するテキストの参照を生成します。
20+
/// 例えば、見出しに対する参照は、最初の見出しに対して"Section 1"のような適切な文字列を生成します。
21+
/// 参照は、それぞれの要素へのリンクでもあります。
22+
/// 参照の構文は参考文献からの[引用]($cite)にも使用できます。
2323
///
24-
/// Referenceable elements include [headings]($heading), [figures]($figure),
25-
/// [equations]($math.equation), and [footnotes]($footnote). To create a custom
26-
/// referenceable element like a theorem, you can create a figure of a custom
27-
/// [`kind`]($figure.kind) and write a show rule for it. In the future, there
28-
/// might be a more direct way to define a custom referenceable element.
24+
/// 参照可能な要素には[見出し]($heading)、[図表]($figure)、[数式]($math.equation)、[脚注]($footnote)が含まれます。
25+
/// 定理のようなカスタムの参照可能な要素を作成するには、
26+
/// カスタムの[`種類`]($figure.kind)の図表を作成し、
27+
/// それに対するshowルールを書きます。
28+
/// 将来的には、カスタムの参照可能な要素を定義するためのより直接的な方法が提供されるかもしれません。
2929
///
30-
/// If you just want to link to a labelled element and not get an automatic
31-
/// textual reference, consider using the [`link`] function instead.
30+
/// ラベルのついた要素にリンクを行いたいだけで、
31+
/// 自動的なテキストの参照が必要ない場合は、代わりに[`link`]関数の使用を検討してください。
3232
///
33-
/// # Example
33+
/// #
3434
/// ```example
3535
/// #set heading(numbering: "1.")
3636
/// #set math.equation(numbering: "(1)")
@@ -54,19 +54,19 @@ use crate::text::TextElem;
5454
/// #bibliography("works.bib")
5555
/// ```
5656
///
57-
/// # Syntax
58-
/// This function also has dedicated syntax: A reference to a label can be
59-
/// created by typing an `@` followed by the name of the label (e.g.
60-
/// `[= Introduction <intro>]` can be referenced by typing `[@intro]`).
57+
/// # 構文
58+
/// この関数には専用の構文もあります。
59+
/// ラベルへの参照は、@の後にラベル名を入力することで作成できます
60+
/// (例:`[= Introduction <intro>]``[@intro]`と入力することで参照できます)。
6161
///
62-
/// To customize the supplement, add content in square brackets after the
63-
/// reference: `[@intro[Chapter]]`.
62+
/// 補足をカスタマイズするには、
63+
/// `[@intro[Chapter]]`のように、参照の後に角括弧でコンテンツを追加します。
6464
///
65-
/// # Customization
66-
/// If you write a show rule for references, you can access the referenced
67-
/// element through the `element` field of the reference. The `element` may
68-
/// be `{none}` even if it exists if Typst hasn't discovered it yet, so you
69-
/// always need to handle that case in your code.
65+
/// # カスタム
66+
/// 参照のshowルールを書く場合、
67+
/// 参照の`element`フィールドを通じて参照先の要素にアクセスできます。
68+
/// ただし、Typstがまだそれを発見していない場合、`element`は存在していても`{none}`になる可能性があるため、
69+
/// 常にコード内でそのケースを処理する必要があります。
7070
///
7171
/// ```example
7272
/// #set heading(numbering: "1.")
@@ -93,20 +93,20 @@ use crate::text::TextElem;
9393
/// ```
9494
#[elem(title = "Reference", Synthesize, Locatable, Show)]
9595
pub struct RefElem {
96-
/// The target label that should be referenced.
96+
/// 参照されるべき対象ラベル。
9797
///
98-
/// Can be a label that is defined in the document or an entry from the
99-
/// [`bibliography`].
98+
/// これは、ドキュメント内で定義されたラベルや、
99+
/// [`参考文献リスト`]($bibliography)の参照キーである場合があります。
100100
#[required]
101101
pub target: Label,
102102

103-
/// A supplement for the reference.
103+
/// 参照の補足。
104104
///
105-
/// For references to headings or figures, this is added before the
106-
/// referenced number. For citations, this can be used to add a page number.
105+
/// 見出しや図表への参照の場合、参照される番号の前に追加されます。
106+
/// 引用の場合、ページ番号を追加するために使用できます。
107107
///
108-
/// If a function is specified, it is passed the referenced element and
109-
/// should return content.
108+
/// 関数が指定されている場合、それに参照先の要素が渡され、
109+
/// 関数はコンテンツを返す必要があります。
110110
///
111111
/// ```example
112112
/// #set heading(numbering: "1.")

0 commit comments

Comments
 (0)