Hello everyone,
This is a followup on a reddit post I did previously, which answered a few of my questions but added two others.
I am experimenting styling for books layout, and I am trying to add a
Chapter [number]
#linebreak()
before numbered chapters of a book, but not every single one (e.g. the Table of Content, Foreword, etc.)
As of now I have this function :
#show heading.where(level: 1): it => {
let num = counter(heading).display("1")
pagebreak(weak: true)
v(20%)
align(center)[
#block[
#text(
size: 32pt,
weight: "regular",
)[#emph[
Chapter #num
#linebreak()
#it.body]]
#v(1.5em)
]]
But the title of the table of content and the foreword get added a “Chapter” before them which just doesn’t work.
Is there a way to segregate the level 1 headings that are numbered chapters from the other ones ?
Thanks in advance !
PS : Also, not the same but related question, for my ToC I use #set heading(numbering: "Chapter 1.", supplement: [Chapter]) but the outline only displays “Cha.”, “Chb.”, “Chc.” and such. Then again, is there a way to fix this and display the long text, and also separate numbered chapters from un-numbered ones ?