You could use an enum for both the list and the actual enum. In the “list” you would then just hide the regular numbering and replace it with a symbol of your choice. This will automatically give you the perfect alignment. I used the function highlight()
here to style the numbers, but you could also use your custom rectangle here instead. By using hide(num)
for the “list”, the positioning should always work.
#let enum-numbering(n, show-num: true) = {
let num = highlight(fill: blue, extent: 3pt, text(style: "italic", fill: white, str(n)))
if show-num {
num
} else {
hide(num)
place(center + horizon, sym.square.filled)
}
}
#set enum(spacing: 0.5em, numbering: enum-numbering)
#let dot-enum = enum.with(numbering: enum-numbering.with(show-num: false))
#slide[
#only(1)[
#grid(columns: (1fr,1fr))[
#dot-enum(..("a",) * 6)
][
#enum(..("a",) * 6)
]
]
#only(2)[
#grid(columns: (1fr,1fr))[
#enum(..("a",) * 6)
][
#dot-enum(..("a",) * 6)
]
]
]