Use math.op
to define things the same way predefined lim
and sin
for example are defined. It takes an argument to set limits.
Also note that you can force it directly using the limits
function (scripts
is the opposite). And in inline equations even lim
has subscripts instead of limits, but it can be forced with limits
again as shown below…
#let opA = math.op("opA", limits: true)
$ opA_x $
$ limits("opB")_x $
$lim_x$
$limits(lim)_x$