Command/startcolumnset

From ConTeXt wiki

\startcolumnset

Syntax (autogenerated)

\startcolumnset[...][...=...,...] ... \stopcolumnset
[...]name
...=...,...inherits from \setupcolumnset


Syntax

\startcolumnset[...] ... \stopcolumnset
[...] columnset name

Description

Start a column environment using the columnset mechanism.

Note

Using columnsets may cause overlapping lines at the end of columns.

To avoid this,

\setuplayout[grid=yes]

must be placed in the preamble of the document.

Problem blank lines in the output

Discussed here. The new column set and mixed columns environments use grid snapping by default which can result in blank lines in the output. See the problem here:

%\showboxes
\setuppapersize[A7,landscape]

\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:

  • to disable the strut for the section or
  • to disable the grid snapping for the section.

See the solutions here:

%\showboxes
\setuppapersize[A7,landscape]

\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

Problem overlapping lines in the first column

\setuppapersize[A6,landscape]

\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

\setuplayout[grid=yes] % Without this, last lines in the first column overlap

%

\starttext
  \noheaderandfooterlines

  \startcolumnset[example]
    \startcolumnsetspan[wide]
      \externalfigure[hacker][width=60mm]
    \stopcolumnsetspan

    \input knuth
  \stopcolumnset
\stoptext

(General – typical – non-problematic) examples

% mode=mkiv
\setuppapersize[A5]

\definecolumnset[TwoColumns][n=2]

\startcolumnset [TwoColumns]
  \title{Test page}
  \framed
    [frame=off,
     bottomframe=on,
     width=\textwidth,
     frameoffset=1mm,
     foregroundstyle=small,
    ]{\copyright\ \date[][year] Donald E. Knuth}
  \input knuth
\stopcolumnset

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: