Found this trick:
#heading("H1",outlined: true, level:1)
#heading("H2",outlined: false, level:2)
#heading("H2",outlined: true, level:2)
[UPDATE]
Too bad it doesn’t work in this case:
#heading("H1",outlined: true, level:1)
#quote(block:true)[#heading("H1",outlined: false, level:1)]
#heading("H2",outlined: true, level:2)
From reading the GitHub issue(s), this seems to be a duplicate of Hide or ignore? ToC structure issue.
Well summed up by this post.
Duplicate of
- #heading(outlined: false) should not appear in PDF outline #1422
- Bookmarks are displaying at the correct depth only in the Typst app but not in other PDF readers. #5615
- discuss#2681
- forum#3894
My view: that’s not a code thing, but a logic thing.
If you want something looks like a heading, but not appear in typst-outline() or pdf-reader-bookmark(), is it a real heading for sure? Why not…
#let heading-pretend(l, h) = {text(1.6em-l*0.2em, weight:"bold")[#h]} = 1 == 1.1 #heading-pretend(2)[1.x] #heading(level:2)[1.2] #outline()
2 Likes