---
format:
typst:
include-before-body:
- text: |
#set heading(numbering: "1.1", supplement: [chapter])
#show ref: it => if it.element.func() != heading { it } else {
let h = it.element // heading
let c = context {
let n = numbering("1.1", ..counter(heading).at(h.location())) // numbering
return h.supplement + " " + n + " " + h.body
}
link(it.target, c)
}
---
# First chp {#sec-chp1}
A link to @sec-chp2
# Second chp {#sec-chp2}
A link to @sec-chp2-sub1
## First subchp of second chp {#sec-chp2-sub1}
A link @sec-chp1
您可以定义自己的显示规则
ref
: