[Tex/LaTex] ConTeXt: vertical spacing

context

I'm a bit confused about how to specify vertical whitespace. The following document works:

\setupwhitespace[line]
\setuphead[subsection]   [after={\blank[2*line]}]

\starttext

\subsection{Title}

\input tufte

\input tufte

\stoptext

But why can't I use \setupwhitespace[2*line], and neither \blank[0.5*line]? Both result in an error. Meanwhile, \setupwhitespace[5cm] doesn't seem to have an effect.

What I'm actually trying to achieve is having the vertical spacing between paragraphs (and subsections) 0.5*line, or if that's not possible some specific centimeters.

Best Answer

A clean way, which doesn't require low level TeX is to use the measure mechanism. A dimension is defined using \definemeasure, the value can be retrieved with \measure.

\definemeasure
  [pointoneline]
  [.5\baselineskip]

\setupwhitespace
  [\measure{pointoneline}]

\setuphead
  [subsection]
  [after={\blank[\measure{pointoneline}]}]

\starttext
  \startsubsection [title=Title]
    \input knuth
  \stopsubsection
\stoptext

result

Related Question