How can I change the enum numbering for different levels?

I want to set different formats for enum.


#set enum(spacing: 1.2em, numbering: "1.a)")

What i am intending is to have first level enum as 1., second level as a). How can i do this?

having different suffixes per level is not currently supported, but you can easily work around this with a numbering function:

#set enum(numbering: (..n) => {
  let level = n.pos().len() - 1
  let pattern = "1a".at(level, default: "a")
  let suffix = ".)".at(level, default: ")")
  numbering(pattern, n.pos().last()) + suffix
}, full: true)

example output
+ Test
  + Test
    + Test
    + Test
  + Test
+ Test

you may also wanna check out the numbly package

1 Like

Duplicate of

Feel free to flag your own post/message me if you think this is an error.