Development build 586e1bd4
Typst文档简体中文版v0.15.1 + dev 586e1bd4

变体 [⚠️ need proofread]

公式中的备用字体。

这些函数与text函数不同,因为数学字体包含每个字母的多个变体。 [⚠️]

函数

serif自始可用Go to source

Serif (roman) font style in math.

This is already the default.

math.serif(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.

sans自始可用Go to source

Sans-serif font style in math.

Expand展开示例
$ sans(A B C) $
math.sans(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.

frak自始可用Go to source

Fraktur font style in math.

Expand展开示例
$ frak(P) $
math.frak(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.

mono自始可用Go to source

Monospace font style in math.

Expand展开示例
$ mono(x + y = z) $
math.mono(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.

bb自始可用Go to source

Blackboard bold (double-struck) font style in math.

For uppercase latin letters, blackboard bold is additionally available through symbols of the form NN and RR.

Expand展开示例
$ bb(b) $ $ bb(N) = NN $ $ f: NN -> RR $
math.bb(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.

cal自始可用Go to source

Calligraphic (chancery) font style in math.

Expand展开示例
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(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.

scr0.14.0起可用Go to source

Script (roundhand) font style in math.

Expand展开示例
$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.

Expand展开示例:Recreation using stylistic set 1
#let scr(it) = text( stylistic-set: 1, $cal(it)$, ) We establish $cal(P) != scr(P)$.
math.scr(content) → content

body
content
必需参数
Question mark
位置参数
Question mark

The content to style.