[NTG-context] Spacing between headings

denis.maier at unibe.ch denis.maier at unibe.ch
Thu Feb 23 10:32:49 CET 2023


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20230223/4c2fccf1/attachment.htm>


More information about the ntg-context mailing list