I guess using fixed horziontal spacing works. Do you per chance know why #h(1fr) does not work the same as in plain text?
Even if i use
#show math.equation.where(block: true): set block(width: 100%)
#h(1fr) still does nothing in the math environment. If i use it in text it would take the whole space and would force everything behind it to be on the right side of the page.
I’d guess this has something to do with relative/fractional lengths being implemented differently when inside of math mode, but i’m not sure why this behavior arises and whether or not it is a bug
This is a good solution. I hope the fractions problem will get fixed soon, that would be a little easier. Until then i guess i will be using intextual. Thank you
intextual has a notice about its side effects - which are probably ok, but if they are not you’ll need to apply its intertext-rule only on select equations.
Side Effects
The show: intertext-rule rule will draw an invisible 100% width line above each math.equation.where(block: true) to determine the boundaries of the container. This affects standard equation alignment in enums/lists and grids/tables with auto width.
In default Typst, block equations in enums/lists will be centered according to the maximum horizontal space required by any enum/list item, however, with the intertext-rule applied, the maximum available width will always be used.