Define new math classes, or default attachment styles

Is there a way to set a default attachment style for a symbol? I would
like to $<_A$ always look like $script(<)_A$ or $attach(<,br: A)$.
Or in general do this kind of things, like creating new math classes. For example the following works to some extent:

#let mylt = math.class("normal", sym.lt)
#show sym.lt: mylt

$a <_A b$

The problem is that then, $<$ looses its properties of the “relation” class,
so the spacing gets weird.

Hi, welcome to the Typst forum!

You can use scripts and limits to change the attachment behavior (see doc here):

#show sym.lt: math.scripts
$a <_A b$

image

I think this preserves the relation class of <.

Oh, that was easy. Thanks!, it does preserve the other aspects of the relation class. I missed that possibility from the docs.