is there maybe a way to make the underbraces extend to the $cal(A)$ and $cal(B)$ below? Or in general is there a way (not necessarily with the same braces) to typeset this equation in a subjectively nicer way?
Yes, something along those lines. I don’t think the output is ugly but I really dislike repetitions so I’m looking for opinions on alternative ways to typeset this
What repetitions? Typst can’t do such diagonal typesetting in math natively. You would have to probably make a custom solution. Mannot is a really good tool for this. You can of course use rotate and move and stuff like this, but that would be a hard-coded solution that won’t adapt to the math content.
That’s…not really a repetition. It’s like saying I don’t like that I have to write x on every line when solving an equation with x variable.
If you mean that 6 chars for 1 visual one is too much, then use let cA = $cal(A)$, or any other alias. Though, 1-letter aliases will have to be preceded by #.
More minimalist maybe - I was just thinking what if this was a blackboard, how might you draw it? I can see that it seems like repetition or a bit crowded if you have both the underbrace with A and the A directly below it.
whether you do this with an underline (markul) or with colors (markhl) depends on the style of the document, colorful highlight fits in certain presentations and textbooks.