What are the default formatting values for headings?

To just inspect the spacing of blocks created by a heading, you can write the following:

= #context (block.above, block.below)

This would print a heading, and the content of that heading is the values of block.above and below. Note that you can’t easily store these values in e.g. a variable: Why is the value I receive from context always content? - #2 by laurmaedje but you can copy the values (1.29em, 0.54em) into your code now that you know them.

I don’t think there’s thorough documentation on all the things heading does to a text; you’d probably need to look into the Rust source code. I think the right place is here, and with a bit of deduction you can see that level 1 headings have an above value of 1.8em/1.4 (which is roughly equal to 1.29em, so that checks out), and that headings have a different font size, are bold, and are sticky.