How to make a block with math not breakable, while keeping center alignment

Hi,
I have an issue with the render of my compiled file. I wanted to get my text in the block function to prevent page break, but the math text is no more centered as it was and should be i guess. Btw, I even tried to add #align(alignment.center)[…] to it but there were no changements.
Here is my typst code:

#block(breakable:false)[
   - e.g.:
   $ 5,75_(10) = 5_10 + (1/2^1)_(10) + (1/2^2)_(10)= 101,11_2 = 1,0111_2 times 2^2 $
   $ underbrace(0,"signe") | underbrace(10000001,"exposant") | underbrace(01110000000000000000000,"mantisse") $
]

Here is the result:

And here is what i was expecting;

Can someone help me?
Have a nice day!

The math is centered within the block, but the block is only as wide as it needs be to fit the math. You can fix this by setting block(width: 100%)

Alternatively, you may be interested in block.sticky: you could put only the - e.g.: into a sticky block, and then that block will stick together with the subsequent equation on the same page. This way your math is not part of an extra block, and therefore the alignment will also be unaffected. (But admittedly, this makes more sense if you had only one equation following the leading text, not two.)

1 Like

Thank you for your quick answer, changing the width to 100% was what i was looking for!
Have a nice day!