このページは部分的に翻訳されています。一部原文の内容が含まれています。
Variants
数式中の別書体。
数式フォントは各文字に対して複数の異体字を備えているため、これらの関数はtext関数とは異なります。
Function
serif
serif数式中のセリフ(ローマン)フォントスタイル。
これがデフォルトです。
math.serif()->body
bodyスタイルを適用するコンテンツ。
sans
sans数式中のサンセリフフォントスタイル。
$ sans(A B C) $

math.sans()->body
bodyスタイルを適用するコンテンツ。
frak
frak数式中のフラクトゥールフォントスタイル。
$ frak(P) $

math.frak()->body
bodyスタイルを適用するコンテンツ。
mono
mono数式中の等幅フォントスタイル。
$ mono(x + y = z) $

math.mono()->body
bodyスタイルを適用するコンテンツ。
bb
bb数式中の黒板太字(double-struck)フォントスタイル。
大文字のラテン文字では、黒板太字は、symbolsにあるように、NNやRRのような形式でも使用できます。
$ bb(b) $
$ bb(N) = NN $
$ f: NN -> RR $

math.bb()->body
bodyスタイルを適用するコンテンツ。
cal
cal数式中のカリグラフィーフォントスタイル。
Let $cal(P)$ be the set of ...

This is the default calligraphic/script style for most math fonts. See
scr for more on how to get the other style (roundhand).
math.cal()->body
bodyThe content to style.
scr
scrScript (roundhand) font style in math.
$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.
The other way is using font features. For example, the
roundhand style might be available in a font through the
stylistic set 1 (ss01) feature. To use it in
Typst, you could then define your own version of scr like in the example
below.
#let scr(it) = text(
stylistic-set: 1,
$cal(it)$,
)
We establish $cal(P) != scr(P)$.

math.scr()->body
bodyスタイルを適用するコンテンツ。