typssst
1
I have written a custom #section function that sets level of text based on nesting level:
#section(title: [Section 1 Title])[
Level 1 text
#section(title: [Section 2 Title])[
Level 2 text
]
Level 1 text again
]
Is there a way to accomplish this using the plain old =+ heading markup?
# Section 1 Title
Level 1 text
## Section 2 Title
Level 2 text
// ???
Level 1 text again
Thanks in advance.
Hello @typssst,
Just checking, have you had a look at heading.level:
#show heading.where(level: 2): set text(red)
= Level 1
== Level 2
#set heading(offset: 1)
= Also level 2
== Level 3
or using heading.offset:
= Level 1
#set heading(offset: 1, numbering: "1.1")
= Level 2
#heading(offset: 2, depth: 2)[
I'm level 4
]
If this not what you are looking for, could you please elaborate on exactly what you would be expecting?
This is from Heading Function – Typst Documentation