#set heading(numbering: "1.1")
Blabla 1
= This is test 1
#set heading(numbering: (..n) => h(1cm) + numbering("1.1", ..n))
Blabla 2
= This is test 2
Blabla 3
You probably can also use pad(left: 1cm, <numbering>)
instead of h() +
, if you want. Or you can even reconstruct the heading and embed the spacing there, but be sure to wrap it all in block()
.
However, note that if you plan on using a period (or other symbol) at the end of the numbering format string, this will introduce an unwanted behavior when referencing a heading label:
#set heading(numbering: "1.1.")
= A <a>
@a.
#set heading(numbering: (..n) => numbering("1.1.", ..n))
= B <b>
@b.
This is because with a custom/user function, Typst can’t know if the last period is mandatory or can be lifted when a period already exist (at the end of a sentence).