Trouble customizing numbered list

I need to display numbered list with following rules:
first line has indent with 1.25cm
second line has no indent at all (even with removing indent it still adds indent to align second line with first line AFTER the number)

I achieved this in unnumbered list with

#show list.item: it => {
    set par(first-line-indent: 1.25cm)
    "-"
    h(0.5em)
    it.body
  }

but in numbered list it.number is auto value, which cant be concatenated with anything, i dont know how to extract actual value to do the logic above. i need it.number + h(0.5em) + it.body

you could set a show rule on the whole enum:

#set enum(indent: 1.25cm, body-indent: 0.5em)

#show enum: it => {
  // for nested enums
  set enum(indent: it.indent + 1.25cm)
  show enum: it => parbreak() + it
  
  // display current enum
  for (count, child) in it.children.enumerate() {
    let number = if child.number != auto {child.number} else {count + 1}
    h(enum.indent)
    numbering(it.numbering, number)
    h(enum.body-indent)
    child.body
    parbreak()
  }
}

Also, when posting code snippets make sure to wrap them in ```<lang> triple backticks```. See:

1 Like

thanks, bro, u gave me an idea how to solve my problem. Added backticks for code.