5

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.

5
  • 2
  • Thanks, halfline works. But what about, say 0.1*line? Pasting \installwhitespacemethod \v!pointoneline {\s_spac_whitespace_parskip.1\baselineskip} gives an error.
    – mb21
    Aug 17, 2013 at 19:49
  • 2
    Enclose the installwhitespace line in \starttexcode … \stoptexcode and replace \v!pointoneline with {pointoneline}.
    – Marco
    Aug 17, 2013 at 23:27
  • okay, seems I'm starting to figure it out (feel free to edit my answer below). So the only missing case would be: 0.1*line spacing after a subsection. Is that possible as well?
    – mb21
    Aug 18, 2013 at 7:26
  • \setuphead[section][style=\tfc, before={\blank[line]}, after={\blank[none]}]
    – mb21
    Feb 2, 2014 at 15:05

1 Answer 1

6

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.