![](https://secure.gravatar.com/avatar/532990f0c5a8331f60e3d0e1173292a6.jpg?s=120&d=mm&r=g)
23 Feb
2023
23 Feb
'23
2:32 a.m.
Hi, I want to make the spacing before headings conditional. Like, apply the spacing if the a heading follows some text, but not if it immediately follows a previous heading. This has been requested before : https://www.mail-archive.com/ntg-context@ntg.nl/msg63950.html Does there exist a way now, to achieve this? Best, Denis \setuphead [section, subsection] [number=yes] \setuphead [section] [before={\blank[2*big]}, after={\blank[big]}] \setuphead [subsection] [before={\blank[2*big]}, after={\blank[big]}] \starttext \section{A} \input knuth \subsection{B} % regular spacing here \input knuth \section{C} \subsection{D} % less spacing here \input knuth \stoptext