Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions crates/typst-library/src/math/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,34 +70,32 @@ pub fn sans(
/// Let $cal(P)$ be the set of ...
/// ```
///
/// This is the default calligraphic/script style for most math fonts. See
/// [`scr`]($math.scr) for more on how to get the other style (roundhand).
/// これは大半の数式フォントにおけるデフォルトのカリグラフィー/スクリプトスタイルです。
/// もう一方のスタイル(roundhand)の指定方法については[`scr`]($math.scr)を参照してください。
#[func(title = "Calligraphic", keywords = ["mathcal", "chancery"])]
pub fn cal(
/// The content to style.
/// スタイルを適用するコンテンツ。
body: Content,
) -> Content {
body.set(EquationElem::variant, Some(MathVariant::Chancery))
}

/// Script (roundhand) font style in math.
/// 数式中のスクリプト(roundhand)フォントスタイル。
///
/// ```example
/// $scr(L)$ is not the set of linear
/// maps $cal(L)$.
/// ```
///
/// There are two ways that fonts can support differentiating `cal` and `scr`.
/// The first is using Unicode variation sequences. This works out of the box
/// in Typst, however only a few math fonts currently support this.
/// フォントが`cal`と`scr`を区別できるようにする方法は2つあります。
/// 1つはUnicodeの字形指示列を用いる方法です。
/// これはTypstでそのまま動作しますが、現時点でこの方式をサポートする数式フォントはわずかです。
///
/// The other way is using [font features]($text.features). For example, the
/// roundhand style might be available in a font through the
/// _[stylistic set]($text.stylistic-set) 1_ (`ss01`) feature. To use it in
/// Typst, you could then define your own version of `scr` like in the example
/// below.
/// もう1つは[フォントフィーチャー]($text.features)を用いる方法です。
/// 例えば、roundhandスタイルがフォントの_[スタイリスティックセット]($text.stylistic-set)1_(`ss01`)フィーチャーを通じて利用できる場合があります。
/// 以下の例のように独自の`scr`関数を定義するとTypstで使用できます。
///
/// ```example:"Recreation using stylistic set 1"
/// ```example:"スタイリスティックセット1による再現"
/// #let scr(it) = text(
/// stylistic-set: 1,
/// $cal(it)$,
Expand Down
2 changes: 2 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ description: |
| coverage | カバレッジ | フォントの[カバレッジ]($text.font)設定 |
| variable font | バリアブルフォント | 可変フォント、現在未サポート |
| grapheme cluster | 書記素クラスター | 1つの文字として認識される文字の組み合わせ |
| variation sequence | 字形指示列 | 基底文字と字形選択子の並び。訳語は[JIS X 0221(国際符号化文字集合(UCS))](https://www.jisc.go.jp/app/jis/general/GnrJISNumberNameSearchList?show&jisStdNo=X0221)に準拠 |
| variation selector | 字形選択子 | 直前の文字の字形を指定する制御用文字。訳語は[JIS X 0221(国際符号化文字集合(UCS))](https://www.jisc.go.jp/app/jis/general/GnrJISNumberNameSearchList?show&jisStdNo=X0221)に準拠 |
2 changes: 1 addition & 1 deletion website/translation-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"/docs/reference/math/styles/": "translated",
"/docs/reference/math/op/": "translated",
"/docs/reference/math/underover/": "translated",
"/docs/reference/math/variants/": "partially_translated",
"/docs/reference/math/variants/": "translated",
"/docs/reference/math/vec/": "translated",
"/docs/reference/symbols/": "untranslated",
"/docs/reference/symbols/sym/": "untranslated",
Expand Down
Loading