11use crate :: foundations:: { func, Cast , Content , Smart } ;
22use crate :: math:: EquationElem ;
33
4- /// Bold font style in math.
4+ /// 数式中の太字フォントスタイル。
55///
66/// ```example
77/// $ bold(A) := B^+ $
88/// ```
99#[ func( keywords = [ "mathbf" ] ) ]
1010pub 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" ] ) ]
2323pub 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" ] ) ]
3434pub 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" ] ) ]
4545pub 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" ] ) ]
5858pub 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" ] ) ]
9289pub 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" ] ) ]
105102pub 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" ] ) ]
118115pub 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" ] ) ]
136132pub fn bb (
137- /// The content to style.
133+ /// スタイルを適用するコンテンツ。
138134 body : Content ,
139135) -> Content {
140136 body. styled ( EquationElem :: set_variant ( MathVariant :: Bb ) )
0 commit comments