In a list, how do I align equations to the center of the page and not to the center of the longest line in the list?

When I include a center-aligned equation inside of a list, the equation is not aligned to the center of the page. Instead, it is aligned to the center of the longest line in the list. Observe:

- Here's some text.

  $ 1 + 1 = 2 $

When not in a list, an equation looks like:

$ 2 + 2 = 4 $

- Here is a line that wraps all the way around. As you can see, the equation below has the same alignment as equations that are not in a list:

  $ 3^2 + 4^2 = 5^2 $

Notice how the first equation, “1 + 1 = 2,” is displayed to the left of the other two equations because the text in the list containing it does not reach the right end of the page.

I don’t want this behavior. How do I make it so that by default, the three equations in this example are all aligned in the same way, at the center of the page?

Here is a previous solution to this problem: How to make centralized formulae in enums - #2 by Andrew

It’s also been discussed in an issue, and there are some lengthy workarounds: Center alignment broken in lists · Issue #529 · typst/typst · GitHub

Note that most of the solutions still end up with the equation centered slightly more to the right because of the indentation of the list.

Duplicate of

Thanks for pointing it out @bluss! @ihaveausername, feel free to flag your own post/message me if you think this is an error.