Skip to content

Commit 23aa109

Browse files
committed
Merge remote-tracking branch 'origin/main' into remove-docs-url
2 parents c3d3002 + 88ef363 commit 23aa109

File tree

15 files changed

+248
-286
lines changed

15 files changed

+248
-286
lines changed

crates/typst-library/src/foundations/cast.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -478,25 +478,25 @@ cast! {
478478
MathClass::Vary => "vary",
479479
MathClass::Special => "special",
480480
}),
481-
/// The default class for non-special things.
481+
/// 特別でない要素のデフォルトクラス。
482482
"normal" => MathClass::Normal,
483-
/// Punctuation, e.g. a comma.
483+
/// カンマなどの句読点。
484484
"punctuation" => MathClass::Punctuation,
485-
/// An opening delimiter, e.g. `(`.
485+
/// `(`などの開き区切り文字。
486486
"opening" => MathClass::Opening,
487-
/// A closing delimiter, e.g. `)`.
487+
/// `)`などの閉じ区切り文字。
488488
"closing" => MathClass::Closing,
489-
/// A delimiter that is the same on both sides, e.g. `|`.
489+
/// `|`などの両側が同じ区切り文字。
490490
"fence" => MathClass::Fence,
491-
/// A large operator like `sum`.
491+
/// `sum`のような大型演算子。
492492
"large" => MathClass::Large,
493-
/// A relation like `=` or `prec`.
493+
/// `=``prec`のような関係記号。
494494
"relation" => MathClass::Relation,
495-
/// A unary operator like `not`.
495+
/// `not`のような単項演算子。
496496
"unary" => MathClass::Unary,
497-
/// A binary operator like `times`.
497+
/// `times`のような二項演算子。
498498
"binary" => MathClass::Binary,
499-
/// An operator that can be both unary or binary like `+`.
499+
/// `+`のような単項にも二項にもなる演算子。
500500
"vary" => MathClass::Vary,
501501
}
502502

crates/typst-library/src/layout/page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub struct PageElem {
175175
/// 印刷規模が大きい場合は、このプロパティを設定せず、あらかじめ染色された用紙を調達したほうが環境にも優しくコスト削減もできるでしょう。
176176
///
177177
/// `{none}`に設定すると背景は透明になります。
178-
/// ビューワーではPDFのページに(通常は白色の)背景があるように見えますが、実際は透明であることに注意してください(印刷時には背景に色が使用されません)。
178+
/// ビューアーではPDFのページに(通常は白色の)背景があるように見えますが、実際は透明であることに注意してください(印刷時には背景に色が使用されません)。
179179
///
180180
/// デフォルト値の`{auto}`は、PDF出力の場合は`{none}`となり、PNGおよびSVG出力の場合は`{white}`になります。
181181
///

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,13 @@ impl AlignPointElem {
119119
}
120120
}
121121

122-
/// Forced use of a certain math class.
122+
/// 特定の数式クラスを強制的に適用。
123123
///
124-
/// This is useful to treat certain symbols as if they were of a different
125-
/// class, e.g. to make a symbol behave like a relation. The class of a symbol
126-
/// defines the way it is laid out, including spacing around it, and how its
127-
/// scripts are attached by default. Note that the latter can always be
128-
/// overridden using [`{limits}`](math.limits) and [`{scripts}`](math.scripts).
124+
/// これは、特定の記号を異なるクラスのように扱うのに便利です。例えば、ある記号を関係のように振る舞わせることができます。
125+
/// 記号のクラスは、レイアウトのされ方、周囲の空白の入れ方、添え字がデフォルトでどのように取り付けられるかを定義します。
126+
/// 添え字の取り付け方は[`{limits}`](math.limits)や[`{scripts}`](math.scripts)を使って常に上書きできることに注意してください。
129127
///
130-
/// # Example
128+
/// #
131129
/// ```example
132130
/// #let loves = math.class(
133131
/// "relation",
@@ -138,11 +136,11 @@ impl AlignPointElem {
138136
/// ```
139137
#[elem(Mathy)]
140138
pub struct ClassElem {
141-
/// The class to apply to the content.
139+
/// コンテンツに適用するクラス。
142140
#[required]
143141
pub class: MathClass,
144142

145-
/// The content to which the class is applied.
143+
/// クラスを適用するコンテンツ。
146144
#[required]
147145
pub body: Content,
148146
}

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

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,79 @@
11
use crate::foundations::{func, Cast, Content, Smart};
22
use crate::math::EquationElem;
33

4-
/// Bold font style in math.
4+
/// 数式中の太字フォントスタイル。
55
///
66
/// ```example
77
/// $ bold(A) := B^+ $
88
/// ```
99
#[func(keywords = ["mathbf"])]
1010
pub fn bold(
11-
/// The content to style.
11+
/// スタイルを適用するコンテンツ。
1212
body: Content,
1313
) -> Content {
1414
body.styled(EquationElem::set_bold(true))
1515
}
1616

17-
/// Upright (non-italic) font style in math.
17+
/// 数式中の立体(非斜体)フォントスタイル。
1818
///
1919
/// ```example
2020
/// $ upright(A) != A $
2121
/// ```
2222
#[func(keywords = ["mathup"])]
2323
pub fn upright(
24-
/// The content to style.
24+
/// スタイルを適用するコンテンツ。
2525
body: Content,
2626
) -> Content {
2727
body.styled(EquationElem::set_italic(Smart::Custom(false)))
2828
}
2929

30-
/// Italic font style in math.
30+
/// 数式中の斜体フォントスタイル。
3131
///
32-
/// For roman letters and greek lowercase letters, this is already the default.
32+
/// これがローマ字とギリシャ文字の小文字のデフォルトです。
3333
#[func(keywords = ["mathit"])]
3434
pub fn italic(
35-
/// The content to style.
35+
/// スタイルを適用するコンテンツ。
3636
body: Content,
3737
) -> Content {
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))

0 commit comments

Comments
 (0)