%&context
%\environment env_method_hmc


% TABLE SETUP
\setupTABLE[frame=on, framecolor=blue, rulethickness=4pt]
\setupTABLE[header][each][background=color, backgroundcolor=blue, color=white]
\setupTABLE[row][odd][background=color, backgroundcolor=gray]
\setupTABLE[row][even][background=color, backgroundcolor=lightgray]
\setupTABLE[row][last][bottomframe=on]
\setupTABLE[row][test][background=color, backgroundcolor=darkgray]
%
% HeaderStyle -------------------------------------------------------------\

\startsetups[header]
    \setupTABLE[frame=on]
    \setupTABLE[c][each][width=0.2\textwidth, align=middle, offset=2mm ]
    \setupTABLE[c][2][width=0.6\textwidth]
    \setupTABLE[r][1][height=\headerheight]
    \bgroup
        \bTABLE
        \bTR
          \bTD Rev  \eTD \bTD {\ssbfa \getvariable{document}{projectname}} \\ 
                              {\ssbfa \getvariable{document}{documenttitle}}\eTD \bTD some text\eTD        
        \eTR % End of row 1
        \eTABLE 
    \egroup
\stopsetups
\setupheadertexts[\setups{header}]  


\starttext
\startbuffer[table]
\bTABLE[split=repeat]
    \startTABLEhead
        \bTR \bTD No. \eTD \bTD[nc=2] Length         \eTD \eTR
        \bTR \bTD     \eTD \bTD{} [m] \eTD \bTD{} [inch] \eTD \eTR
    \stopTABLEhead
    \startTABLEbody
        \bTR[background=color, backgroundcolor=darkgray] \bTD[nc=3] This is a section where I can place this and that \eTD \eTR
        \dorecurse{100}
        {\bTR \bTD 1.  \eTD \bTD some dummy text.        \eTD \bTD some more dummy text \eTD \eTR}
    \stopTABLEbody
\eTABLE
\stopbuffer

\placetable[split, none]{}{\getbuffer[table]}
\stoptext
