I don’t think there is a simpler alternative. However, I think your formula is not correctly structured regarding your alignx
directives. You request full right alignment with alignr{}
and you immediately cancel it wit alignc
. You get what you want but this is clumsy. It does not emphasize that you want the denominator centred relative to the wider numerator (note that you in fact request both to be centred over the fraction bar; so this is not a mistake). The weirdness comes from alignr
being applied to “nothing”.
My version would rather be:
matrix{
alignr{ 3+{2+3x} over {alignc 2}}# {}={} # alignl {a+a+a+a} ##
alignr{x+x+x+x+x} # {}={} # alignl{{2a-8} over {alignc 3} }
}
alignl
can be omitted.
Tested with 24.8.4.2 under Fedora 41, KDE Plasma desktop.
PS: when asking here, always mention OS name, LO version and save format.