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:
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.)