# ConTeXt sections blanks

I just realized there is a big problem with the spacing before and after the section titles. I'd like more space before a section title and a small space between the section title and the subsection title. In the following MWE, I tried to have no blank at all, but there is still a larger blank before than after the section title.

I guess I just didn't find the right parameters in the `\setuphead` command, so can someone explain me please ? And would it be possible to have a clear explanation on what the `before` and `after` keywords do, since they appear in nearly all `\setupthing` commands ?

``````\setuphead[section][before={\blank[big]}, after={\nowhitespace}]
\setuphead[subsection][before={\blank}, after={\nowhitespace}]

\starttext
\section{First section}
\subsection{First subsection}
\input ward
\section{Second section}
\subsection{First subsection}
\input ward
\stoptext
``````

• The `before` and `after` keys in most cases just store a set of commands which are placed in the input stream before and after the command. This does not always hold true and has sometimes strange implications as you can infer from this question of yours. Aug 2, 2016 at 14:10

## 1 Answer

For no blank you have to call `\blank[none]`. If you call `\blank` without an argument it will default to `\blank[\currentvspacing]` where `\currentvspacing` defaults to `big`. As usual you can of course set up what the default `\currentvspacing` is using `\setupblank`, e.g.

``````\setupblank[small]
``````

Your corrected example reads

``````\setuphead[section][before={\blank[big]}, after={\nowhitespace}]
\setuphead[subsection][before={\blank[none]}, after={\nowhitespace}]

\starttext
\section{First section}
\subsection{First subsection}
\input ward
\section{Second section}
\subsection{First subsection}
\input ward
\stoptext
``````

• BTW, `\nowhitespace` is equivalent to `\blank[nowhite]`. However, I have no idea what's the difference between `\blank[none]` and `\blank[nowhite]`. Aug 2, 2016 at 15:40
• It is more common (and easier to remember) to use `\setupblank` instead of `\setupvspacing` . `\blank[nowhite]` also ignores whitespace (i.e., `\parskip`). Consider: `\setupwhitespace[big] \starttext A \blank[none] \par B \par A \blank[nowhite] \par B \stoptext` Aug 3, 2016 at 3:26
• @Aditya Indeed `\setupblank` sounds better (it is a synonym of `\setupvspacing`). I tried a similar example to find out about the difference between `none` and `nowhite` but didn't set a non-zero parskip, which means that for zero parskip they are actually equivalent. Aug 3, 2016 at 7:28