[NTG-context] spacing

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Sat Nov 10 12:39:00 CET 2018



Hans Hagen schrieb am 09.11.18 um 17:01:
> - the new mixed column code has been around for even longer (and 
> always was default on my machine) btu the old code is available as module

A big difference between the old columns environment and the new mixed 
columns code is that the new environment uses grid snapping by default 
which can result in blank lines in the output.

Below is a simplified version of Henning problems which produces an 
blank line when you use bold text.


\showboxes

\starttext

\startcolumns[balance=no]

\snaptogrid[]\hbox{\setstrut\begstrut Ward\endstrut}

\samplefile{ward}

\snaptogrid[]\hbox{\bf\setstrut\begstrut Ward\endstrut}

\samplefile{ward}

\stopcolumns

\stoptext


Two simple ways to get rid of the blank line are

1. to disable the strut for the section or

2. to disable the grid snapping for the section.


\showboxes

\setuphead[section][before=,after=]
\setuphead[section][style=bold]

\define[1]\Sample
   {\begingroup
      \setuphead[section][#1]
      \section{Ward \doifsomething{#1}{\tttf [#1]}}
      \samplefile{ward}\par
    \endgroup}

\starttext

\startcolumns[balance=no]

\Sample{}

\Sample{style=}

\Sample{strut=no}

\Sample{grid=no}

\stopcolumns

\stoptext


Wolfgang


More information about the ntg-context mailing list