Workarounds for bug with `#set heading(outlined:false)`?

I have reported the bug here, this is the problem :thinking:.

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

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