I created first-level headings that look like in the picture, which is what I want.
However there is a problem then the heading is close to the end of the page, then the line is on the next page but the heading text stays on the same page.
I implemented the heading like this:
stack(
block[
#counter(heading).display()
#h(4pt)
#it.body
],
v(13pt),
line(length: 100%, stroke: 1pt),
v(32pt)
)
What I need is something like an breakable: false attribute of stack.
I tried to wrap the stack inside block(breakable: false)[/*stack ...*/], but this added unwanted vertical space above the heading.
I want to use stack since I need to precisely control the spacing between the line and the heading ...