Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Operators

See reference.

There are lots of built-in “text operators” in Typst math. This is a symbol that behaves very close to plain text. Nevertheless, it is different:

$
lim x_n, "lim" x_n, "lim"x_n
$
Rendered image

Predefined operators

Here are all text operators Typst has built-in:

$
arccos, arcsin, arctan, arg, cos, cosh, cot, coth, csc,\
csch, ctg, deg, det, dim, exp, gcd, hom, id, im, inf, ker,\
lg, lim, liminf, limsup, ln, log, max, min, mod, Pr, sec,\
sech, sin, sinc, sinh, sup, tan, tanh, tg "and" tr
$
Rendered image

Creating custom operator

Of course, there always will be some text operators you will need that are not in the list.

But don’t worry, it is very easy to add your own:

#let arcsinh = math.op("arcsinh")

$
arcsinh x
$
Rendered image

Limits for operators

When creating operators (upright text with proper spacing), you can set limits for display mode at the same time:

$
op("liminf")_a, op("liminf", limits: #true)_a
$
Rendered image

This is roughly equivalent to

$
limits(op("liminf"))_a
$
Rendered image

Everything can be combined to create new operators:

#let liminf = math.op(math.underline(math.lim), limits: true)
#let limsup = math.op(math.overline(math.lim), limits: true)
#let integrate = math.op($integral dif x$)

$
liminf_(x->oo)\
limsup_(x->oo)\
integrate x^2
$
Rendered image