diff --git a/crates/typst-library/src/foundations/cast.rs b/crates/typst-library/src/foundations/cast.rs index 38f409c670..9744501721 100644 --- a/crates/typst-library/src/foundations/cast.rs +++ b/crates/typst-library/src/foundations/cast.rs @@ -478,25 +478,25 @@ cast! { MathClass::Vary => "vary", MathClass::Special => "special", }), - /// The default class for non-special things. + /// 特別でない要素のデフォルトクラス。 "normal" => MathClass::Normal, - /// Punctuation, e.g. a comma. + /// カンマなどの句読点。 "punctuation" => MathClass::Punctuation, - /// An opening delimiter, e.g. `(`. + /// `(`などの開き区切り文字。 "opening" => MathClass::Opening, - /// A closing delimiter, e.g. `)`. + /// `)`などの閉じ区切り文字。 "closing" => MathClass::Closing, - /// A delimiter that is the same on both sides, e.g. `|`. + /// `|`などの両側が同じ区切り文字。 "fence" => MathClass::Fence, - /// A large operator like `sum`. + /// `sum`のような大型演算子。 "large" => MathClass::Large, - /// A relation like `=` or `prec`. + /// `=`や`prec`のような関係記号。 "relation" => MathClass::Relation, - /// A unary operator like `not`. + /// `not`のような単項演算子。 "unary" => MathClass::Unary, - /// A binary operator like `times`. + /// `times`のような二項演算子。 "binary" => MathClass::Binary, - /// An operator that can be both unary or binary like `+`. + /// `+`のような単項にも二項にもなる演算子。 "vary" => MathClass::Vary, } diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs index 2e6d42b132..f682ed25a4 100644 --- a/crates/typst-library/src/math/mod.rs +++ b/crates/typst-library/src/math/mod.rs @@ -119,15 +119,13 @@ impl AlignPointElem { } } -/// Forced use of a certain math class. +/// 特定の数式クラスを強制的に適用。 /// -/// This is useful to treat certain symbols as if they were of a different -/// class, e.g. to make a symbol behave like a relation. The class of a symbol -/// defines the way it is laid out, including spacing around it, and how its -/// scripts are attached by default. Note that the latter can always be -/// overridden using [`{limits}`](math.limits) and [`{scripts}`](math.scripts). +/// これは、特定の記号を異なるクラスのように扱うのに便利です。例えば、ある記号を関係のように振る舞わせることができます。 +/// 記号のクラスは、レイアウトのされ方、周囲の空白の入れ方、添え字がデフォルトでどのように取り付けられるかを定義します。 +/// 添え字の取り付け方は[`{limits}`](math.limits)や[`{scripts}`](math.scripts)を使って常に上書きできることに注意してください。 /// -/// # Example +/// # 例 /// ```example /// #let loves = math.class( /// "relation", @@ -138,11 +136,11 @@ impl AlignPointElem { /// ``` #[elem(Mathy)] pub struct ClassElem { - /// The class to apply to the content. + /// コンテンツに適用するクラス。 #[required] pub class: MathClass, - /// The content to which the class is applied. + /// クラスを適用するコンテンツ。 #[required] pub body: Content, } diff --git a/website/translation-status.json b/website/translation-status.json index da11b248b6..9aadb495da 100644 --- a/website/translation-status.json +++ b/website/translation-status.json @@ -83,7 +83,7 @@ "/docs/reference/math/binom/": "translated", "/docs/reference/math/cancel/": "translated", "/docs/reference/math/cases/": "translated", - "/docs/reference/math/class/": "untranslated", + "/docs/reference/math/class/": "translated", "/docs/reference/math/equation/": "translated", "/docs/reference/math/frac/": "translated", "/docs/reference/math/lr/": "translated",