I followed the guide book for zero-chapter. But I found the chapter levels not expectedly listed in the outline of PDF viewer, which was like:

Is there any way to list the chapter level as the first level in PDF outline? Like the following:
|- I Chapter
|--- Chap Heading
|----- Sub Heading
|- II Chapter again
|--- Chap Heading
|--- Chap Heading
|----- Sub Heading
|------- Sub Sub Heading
according to the guide.
flokl
2
Hi @bowentan, there was just recently a showcase post about it here Part independent section. I personally use:
#let chapter(body) = heading(level: 1, body)
#set heading(
offset: 1,
numbering: (chap, ..nums) => {
if nums.pos().len() == 0 {
numbering("I", chap)
} else {
numbering("1.1", ..nums)
}
})
#outline()
#chapter[Chapter One]
= Section One
== Subsection
#chapter[Chapter Two]
= Section One
== Subsection
= Section Two
Typst does currently not include the numbering in the PDF bookmarks, see #2416.
You can post this variation in Part independent section, as closely related. Easier to find both under one topic. Some might prefer one or another.