Hey there.
Why overcomplicate?
#show heading.where(level: 1, outlined: true): set heading(numbering: n => {
let number = numbering("1", n)
[Section #number:]
})
// Or
// #show heading.where(level: 1, outlined: true): set heading(
// numbering: n => [section #numbering("1", n):],
// )
#outline()
= First
#lorem(5)
== Second
#lorem(5)
= First
#lorem(5)
== Second
#lorem(5)
The only issue is that outline also has a heading. You can do
#show heading.where(level: 1): set heading(numbering: n => {
let number = numbering("1", n)
[Section #number:]
})
#show outline: it => {
show heading.where(level: 1): set heading(numbering: none)
it
}
to prevent styling it, but it’s not as neat as the solution above.
