How do I make the math area take up the whole width of the page?

Hello! I’m trying to add notes to my math. This is the code:

$
&a a(a union (b a))^* b & \
=& a a a* (b a a*)* b& "(Property g)" \
=& a (a a* b)* a a* b& "(Property h; " R = a a*, S = b ")" \
$

However, the math becomes super scrunched up, and centered on the page:

I really wanted it to look more like this:

However, I couldn’t figure out how to style the math area in the docs. The docs are ALMOST helpful.

How can I fix this? Thank you.

Typst will scale math blocks only as big as they need to be. You could in theory increase the block width manually with something like:

#show math.equation.where(block: true): set block(width: 100%)

but that might lead to other layouting issues. Rather, I recommend manually inserting horizontal spaces where you need them to be as Typst’s align environment does not do that on its own. Either use the pre-defined spaces like quad or wide or just #h(5cm) directly.

$
&a a(a union (b a))^* b & \
=& a a a* (b a a*)* b& #h(3cm) "(Property g)" \
=& a (a a* b)* a a* b& #h(3cm) "(Property h; " R = a a*, S = b ")" \
$

image

1 Like