How do I make block math inside of a list use the whole width of the page?

Having block math inside of a list centers the math with respect to the widest list item. How do I set block math inside of a list to have as width the whole page?

Example:


minimal example that includes the unwanted behaviour:

- List item 1
  $ sin(x) $
- List item 2

compiles to:

Previously answered here: How to make centralized formulae in enums - #2 by Andrew

But it’s also the case that just using the package itemize will apply a workaround for this, like this, by default:

#import "@preview/itemize:0.2.0" as el
#show: el.default-enum-list

// draw page margin
#set page(header: context {
  block(width: 100%, stroke: (x: 0.5pt), outset: (bottom: page.height))
})

#set block(stroke: 0.5pt + blue)

$ sin(x) $

- List item 1
  $ sin(x) $
- List item 2

But the example also shows that because of the indent, even a full width list centers the equation slightly differently than the equation before the list.

2 Likes