Skip to content

Commit c3fb744

Browse files
ultimatileCopilot3w36zj6kimushun1101
authored
/docs/reference/math/variantsの翻訳 (#249)
Co-authored-by: Copilot <[email protected]> Co-authored-by: 3w36zj6 <[email protected]> Co-authored-by: Shunsuke KIMURA <[email protected]>
1 parent 63f045e commit c3fb744

File tree

3 files changed

+23
-28
lines changed

3 files changed

+23
-28
lines changed

crates/typst-library/src/math/style.rs

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,44 +38,42 @@ pub fn italic(
3838
body.styled(EquationElem::set_italic(Smart::Custom(true)))
3939
}
4040

41-
/// Serif (roman) font style in math.
41+
/// 数式中のセリフ(ローマン)フォントスタイル。
4242
///
43-
/// This is already the default.
43+
/// これがデフォルトです。
4444
#[func(keywords = ["mathrm"])]
4545
pub fn serif(
46-
/// The content to style.
46+
/// スタイルを適用するコンテンツ。
4747
body: Content,
4848
) -> Content {
4949
body.styled(EquationElem::set_variant(MathVariant::Serif))
5050
}
5151

52-
/// Sans-serif font style in math.
52+
/// 数式中のサンセリフフォントスタイル。
5353
///
5454
/// ```example
5555
/// $ sans(A B C) $
5656
/// ```
5757
#[func(title = "Sans Serif", keywords = ["mathsf"])]
5858
pub fn sans(
59-
/// The content to style.
59+
/// スタイルを適用するコンテンツ。
6060
body: Content,
6161
) -> Content {
6262
body.styled(EquationElem::set_variant(MathVariant::Sans))
6363
}
6464

65-
/// Calligraphic font style in math.
65+
/// 数式中のカリグラフィーフォントスタイル。
6666
///
6767
/// ```example
6868
/// Let $cal(P)$ be the set of ...
6969
/// ```
7070
///
71-
/// This corresponds both to LaTeX's `\mathcal` and `\mathscr` as both of these
72-
/// styles share the same Unicode codepoints. Switching between the styles is
73-
/// thus only possible if supported by the font via
74-
/// [font features]($text.features).
71+
/// このスタイルはLaTeXの`\mathcal`と`\mathscr`の両方に対応します。
72+
/// これは両スタイルが同じUnicodeのコードポイントを共有しているためです。
73+
/// このため、スタイル間の切り替えは[フォントフィーチャー]($text.features)を用いてサポートされているフォントでのみ可能です。
7574
///
76-
/// For the default math font, the roundhand style is available through the
77-
/// `ss01` feature. Therefore, you could define your own version of `\mathscr`
78-
/// like this:
75+
/// デフォルトの数式フォントでは、ラウンドハンドスタイル(丸みを帯びた筆記体)が`ss01`フィーチャーとして利用可能です。
76+
/// したがって、以下のように独自の`\mathscr`が定義できます。
7977
///
8078
/// ```example
8179
/// #let scr(it) = text(
@@ -86,46 +84,44 @@ pub fn sans(
8684
/// We establish $cal(P) != scr(P)$.
8785
/// ```
8886
///
89-
/// (The box is not conceptually necessary, but unfortunately currently needed
90-
/// due to limitations in Typst's text style handling in math.)
87+
/// (ボックスは概念的には不要ですが、現在のTypstの数式テキストスタイル処理の制約により必要です)
9188
#[func(title = "Calligraphic", keywords = ["mathcal", "mathscr"])]
9289
pub fn cal(
93-
/// The content to style.
90+
/// スタイルを適用するコンテンツ。
9491
body: Content,
9592
) -> Content {
9693
body.styled(EquationElem::set_variant(MathVariant::Cal))
9794
}
9895

99-
/// Fraktur font style in math.
96+
/// 数式中のフラクトゥールフォントスタイル。
10097
///
10198
/// ```example
10299
/// $ frak(P) $
103100
/// ```
104101
#[func(title = "Fraktur", keywords = ["mathfrak"])]
105102
pub fn frak(
106-
/// The content to style.
103+
/// スタイルを適用するコンテンツ。
107104
body: Content,
108105
) -> Content {
109106
body.styled(EquationElem::set_variant(MathVariant::Frak))
110107
}
111108

112-
/// Monospace font style in math.
109+
/// 数式中の等幅フォントスタイル。
113110
///
114111
/// ```example
115112
/// $ mono(x + y = z) $
116113
/// ```
117114
#[func(title = "Monospace", keywords = ["mathtt"])]
118115
pub fn mono(
119-
/// The content to style.
116+
/// スタイルを適用するコンテンツ。
120117
body: Content,
121118
) -> Content {
122119
body.styled(EquationElem::set_variant(MathVariant::Mono))
123120
}
124121

125-
/// Blackboard bold (double-struck) font style in math.
122+
/// 数式中の黒板太字(double-struck)フォントスタイル。
126123
///
127-
/// For uppercase latin letters, blackboard bold is additionally available
128-
/// through [symbols]($category/symbols/sym) of the form `NN` and `RR`.
124+
/// 大文字のラテン文字では、黒板太字は、[symbols]($category/symbols/sym)にあるように、`NN`や`RR`のような形式でも使用できます。
129125
///
130126
/// ```example
131127
/// $ bb(b) $
@@ -134,7 +130,7 @@ pub fn mono(
134130
/// ```
135131
#[func(title = "Blackboard Bold", keywords = ["mathbb"])]
136132
pub fn bb(
137-
/// The content to style.
133+
/// スタイルを適用するコンテンツ。
138134
body: Content,
139135
) -> Content {
140136
body.styled(EquationElem::set_variant(MathVariant::Bb))

docs/reference/groups.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
path: ["math"]
88
filter: ["serif", "sans", "frak", "mono", "bb", "cal"]
99
details: |
10-
Alternate typefaces within formulas.
10+
数式中の別書体。
1111
12-
These functions are distinct from the [`text`] function because math fonts
13-
contain multiple variants of each letter.
12+
数式フォントは各文字に対して複数の異体字を備えているため、これらの関数は[`text`]関数とは異なります。
1413
1514
- name: styles
1615
title: Styles

website/translation-status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"/docs/reference/math/styles/": "translated",
9696
"/docs/reference/math/op/": "translated",
9797
"/docs/reference/math/underover/": "untranslated",
98-
"/docs/reference/math/variants/": "untranslated",
98+
"/docs/reference/math/variants/": "translated",
9999
"/docs/reference/math/vec/": "translated",
100100
"/docs/reference/symbols/": "untranslated",
101101
"/docs/reference/symbols/sym/": "untranslated",

0 commit comments

Comments
 (0)