How to conditionally set heading block parameters?

According to the documentation, weak spacings will always collapse adjacent paragraph spacing, even if the paragraph spacing is larger. I guess this is also the case for heading block spacing.

#show heading: it => {
  set block(above: 2em)
  it
  v(0.4em, weak: true)
}
4 Likes