class
ElementElement functions can be customized with set
and show
rules.
Element functions can be customized with
set
and show
rules.Forced use of a certain math class.
This is useful to treat certain symbols as if they were of a different class, e.g. to make a symbol behave like a relation.
Example
#let loves = math.class(
"relation",
sym.suit.heart,
)
$x loves y and y loves 5$

ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
class
stringRequiredPositionalPositional parameters are specified in order, without names.
string
RequiredPositionalPositional parameters are specified in order, without names.
The class to apply to the content.
"normal"
The default class for non-special things.
"punctuation"
Punctuation, e.g. a comma.
"opening"
An opening delimiter, e.g.
(
."closing"
A closing delimiter, e.g.
)
."fence"
A delimiter that is the same on both sides, e.g.
|
."large"
A large operator like
sum
."relation"
A relation like
=
orprec
."unary"
A unary operator like
not
."binary"
A binary operator like
times
."vary"
An operator that can be both unary or binary like
+
.
body
The content to which the class is applied.