How can I set the first level 2 heading's numbering to none?

Hello, everyone, I’d like to set the first level 2 heading’s numbering to none, I don’t have a clue how to deal with this

the desired result is, for example,

== Heading 2 (without numbering)

= Heading 1 (with numbering)

== Heading 2 (with numbering)

Styling – Typst Documentation:

A top level set rule stays in effect until the end of the file. When nested inside of a block, it is only in effect until the end of that block. With a block, you can thus restrict the effect of a rule to a particular segment of your document. Below, we use a content block to scope the list styling to one particular list.

So you can do this:

#set heading(numbering: "1.1")

#[
  #set heading(numbering: none)
  == Heading 2 (without numbering)
]

= Heading 1 (with numbering)

== Heading 2 (with numbering)
1 Like

This is a very clever solution! Thanks!

1 Like