I moved your question to the Questions category, as it fits better there :)
One (admittedly quite hacky) way is to make a custom show rule that ignores the “enum” value, and instead manually inserts a value from a counter, like so:
#let cnt = counter("resume-enum-numbering")
#cnt.update(1)
#show grid: it => {
show enum.item: i => context [
#cnt.display(enum.numbering)
#cnt.step()
#i.body\
]
it
cnt.update(1) // reset
}
One way to make this more elegant would be to update the enum counter directly, but this is not supperted yet
The #i.body\ adds the hackyness level (since it doesn’t visually separate multiple markup lines), so you should probably make it more descriptive:
#show grid: it => {
show enum.item: item => context {
[#cnt.display(enum.numbering) #item.body]
linebreak()
cnt.step()
}
it
cnt.update(1) // reset
}
Here, a reader clearly sees that a linebreak() is used, which is a regular form of \ sugar syntax. Also, the i makes it look like an index, so naming it item further improves the readability. And the last point, is that in markup mode each code expression needs to be prefixed with #, which adds unnecessary visual noise, if it can be avoided. You can use the code mode first, and write a single markup line inside. This is usually results in a cleaner solution.
Note that since .step() is called inside context, the .display() call won’t be affected by it, so you can put them in any order.
I would personally also avoid the cnt name as well as move the number value to a variable:
#show grid: it => {
let counter = counter("resume-enum-numbering")
counter.update(1)
show enum.item: item => context {
let num = counter.display(enum.numbering)
counter.step()
[#num #item.body]
linebreak()
}
it
counter.update(1) // reset
}
Since the counter is used in just one place, you can move everything into a single place to keep it all together.