Setting limits

Sometimes we want to change how the default attaching should work.

Limits

For example, in many countries it is common to write definite integrals with limits below and above. To set this, use limits function:

$
integral_a^b\
limits(integral)_a^b
$
Rendered image

You can set this by default using show rule:

#show math.integral: math.limits

$
integral_a^b
$

This is inline equation: $integral_a^b$
Rendered image

Only display mode

Notice that this will also affect inline equations. To enable limits for display math only, use limits(inline: false):

#show math.integral: math.limits.with(inline: false)

$
integral_a^b
$

This is inline equation: $integral_a^b$.
Rendered image

Of course, it is possible to move them back as bottom attachments:

$
sum_a^b, scripts(sum)_a^b
$
Rendered image

Operations

The same scheme works for operations. By default, they are attached to the bottom and top:

$a =_"By lemme 1" b, a scripts(=)_+ b$
Rendered image