% interface=en, output=pdf

% Used version:
% TeXExec 2.5 - ConTeXt / PRAGMA ADE 1997-2001 
% pdfeTeX, Version 3.14159-14h-released-20010417-2.1 (Web2C 7.3.3.1)
% ConTeXt  ver: 2001.9.14  fmt: 2001.9.19  int: english  mes: english

\setupcolors[state=start]
\setupbodyfont[10pt]
\setuplayout
        [topspace=15mm, height=267mm,
        backspace=15mm, width=18cm, lines=61,
        header=0pt, headerdistance=0pt,
        footer=\baselineskip, footerdistance=\baselineskip,
        margin=0pt,
        grid=yes]
\setuppagenumbering[location=bottom]

\setupindenting[medium]
\indenting[first]

\setuptolerance[tolerant]

\definecolumnset[three cols]
        [n=3]
\setupcolumnset[three cols]
        [offset=0pt, balance=yes, distance=0cm, tolerance=verytolerant]

\newif\ifInCols \InColsfalse 
\let\OriSec=\section
\def\section#1{%
	\ifInCols\stopcolumnset\fi%
	\OriSec{#1}%
	\startcolumnset[three cols]%
	\InColstrue
}

\showgrid

\starttext
\dorecurse{3}{\input knuth}

\section{This is the first section}

\dorecurse{4}{\input knuth}

\section{This is the second section}

\dorecurse{5}{\input knuth}

\stoptext
