79734315

Date: 2025-08-13 13:14:55
Score: 2
Natty:
Report link

Here is a working solution that requires you to set heading.supplement and redefines the ref body for level 2 heading when it is an appendix:

#show ref: it => {
  let el = it.element
  if el == none or el.func() != heading or el.level != 2 or el.supplement != [Appendix] {
    return it
  }
  let lvl = counter(heading).at(el.location()).at(1)
  let body = el.supplement + numbering(" A", lvl)
  link(el.location(), body)
}

#outline()

This is the body of my text. There is something cool I show in @first, but you
will have to read it to find out.

#heading("Appendices", numbering: none)

#set heading(
  offset: 1,
  numbering: (_, ..rest) => "Appendix " + numbering("A:", ..rest),
  supplement: [Appendix] // <- Important
)

= First <first>
Text of the first appendix.

= Second <second>
Text of the second appendix.

Inspired from this forum post.

enter image description here

Reasons:
  • Probably link only (1):
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: vmartel08