注意 当サイトは、Typst v0.12.0 公式ドキュメントを、日本語コミュニティが非公式に翻訳したものです。誤訳・未訳・古い情報が含まれている可能性があるため、公式ドキュメント との併用を推奨します。このサイトの内容に誤りを発見された方は、GitHubリポジトリまでご報告を頂けましたら幸いです。我々のコミュニティにご興味のある方は、ぜひ非公式Discordサーバー「くみはんクラブ」にご参加ください。
Warning: This site provides an unofficial translation of the Typst v0.12.0 documentation by the Japanese Community. Please note that there may be some inaccuracies, untranslated sections or outdated information. We highly recommend referring to the latest official documentation as well. If you find any errors in the content, please let us know through our GitHub repository. If you are interested in our community, feel free to join our unofficial Discord server, “Kumihan Club.”
Typst ドキュメント日本語版

Variants Calculation

Alternate typefaces within formulas.

These functions are distinct from the text function because math fonts contain multiple variants of each letter.

Calculation

serif

Serif (roman) font style in math.

This is already the default.

math.serif() -> content

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to style.

sans

Sans-serif font style in math.

math.sans() -> content
$ sans(A B C) $
Preview

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to style.

frak

Fraktur font style in math.

math.frak() -> content
$ frak(P) $
Preview

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to style.

mono

Monospace font style in math.

math.mono() -> content
$ mono(x + y = z) $
Preview

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to style.

bb

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.

math.bb() -> content
$ bb(b) $
$ bb(N) = NN $
$ f: NN -> RR $
Preview

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to style.

cal

Calligraphic font style in math.

math.cal() -> content
Let $cal(P)$ be the set of ...
Preview

This corresponds both to LaTeX's \mathcal and \mathscr as both of these styles share the same Unicode codepoints. Switching between the styles is thus only possible if supported by the font via font features.

For the default math font, the roundhand style is available through the ss01 feature. Therefore, you could define your own version of \mathscr like this:

#let scr(it) = text(
  features: ("ss01",),
  box($cal(it)$),
)

We establish $cal(P) != scr(P)$.
Preview

(The box is not conceptually necessary, but unfortunately currently needed due to limitations in Typst's text style handling in math.)

body
content
RequiredPositional
Positional parameters are specified in order, without names.

The content to style.