[NTG-context] Multi-page tables
Randall Skelton
randall.skelton at gmail.com
Wed Mar 8 20:44:08 CET 2006
Hi all,
I'm having a bit of trouble getting multiple page tables to work when
also using \placetable for captions. Essentially, I want:
(1) Captions and the ability to reference with \in[].
(2) Alignment within a cell at a decimal point.
(3) Span multiple pages with header/footer.
I think I would prefer to use the standard 'TABLES' method but it
looks like item 2 is only supported in natural tables?
Below are two examples. I don't get page breaks in either case and
the table runs off the bottom of pages 2 and 3.
Thanks,
Randall
\definepapersize
[width=8.5in,
height=11in]
\setupcaption[table]
[location=top]
\starttext
\section{Testing}
This is a silly table test.
\placetable[page][tbl:sample]
{Sample table caption goes here}
{\start
\switchtobodyfont[small]
\starttablehead
\HL
\VL command \NC meaning \NC $\lambda$ (deg.) \VL\SR
\HL
\stoptablehead
\starttabletail
\HL
\stoptabletail
\starttables[|c|l|c|]
\VL \tex{NC} \NC next column \NC 1.15 \VL\FR
\VL \tex{HL} \NC horizontal line \NC 10.20 \VL\MR
\VL \tex{VL} \NC vertical line \NC -14.30 \VL\MR
\VL \tex{NR} \NC next row \NC -100.00 \VL\MR
\VL \tex{SR} \NC single row \NC 2.35 \VL\MR
\VL \tex{FR} \NC first row \NC 159.00 \VL\MR
\VL \tex{MR} \NC middle row \NC -1.00 \VL\MR
\VL \tex{LR} \NC last row \NC nr \VL\MR
\VL \tex{NC} \NC next column \NC 1.15 \VL\MR
\VL \tex{HL} \NC horizontal line \NC 10.20 \VL\MR
\VL \tex{VL} \NC vertical line \NC -14.30 \VL\MR
\VL \tex{NR} \NC next row \NC -100.00 \VL\MR
\VL \tex{SR} \NC single row \NC 2.35 \VL\MR
\VL \tex{FR} \NC first row \NC 159.00 \VL\MR
\VL \tex{MR} \NC middle row \NC -1.00 \VL\MR
\VL \tex{LR} \NC last row \NC nr \VL\MR
\VL \tex{NC} \NC next column \NC 1.15 \VL\MR
\VL \tex{HL} \NC horizontal line \NC 10.20 \VL\MR
\VL \tex{VL} \NC vertical line \NC -14.30 \VL\MR
\VL \tex{NR} \NC next row \NC -100.00 \VL\MR
\VL \tex{SR} \NC single row \NC 2.35 \VL\MR
\VL \tex{FR} \NC first row \NC 159.00 \VL\MR
\VL \tex{MR} \NC middle row \NC -1.00 \VL\MR
\VL \tex{LR} \NC last row \NC nr \VL\MR
\VL \tex{NC} \NC next column \NC 1.15 \VL\MR
\VL \tex{HL} \NC horizontal line \NC 10.20 \VL\MR
\VL \tex{VL} \NC vertical line \NC -14.30 \VL\MR
\VL \tex{NR} \NC next row \NC -100.00 \VL\MR
\VL \tex{SR} \NC single row \NC 2.35 \VL\MR
\VL \tex{FR} \NC first row \NC 159.00 \VL\MR
\VL \tex{MR} \NC middle row \NC -1.00 \VL\MR
\VL \tex{LR} \NC last row \NC nr \VL\MR
\VL \tex{NC} \NC next column \NC 1.15 \VL\MR
\VL \tex{HL} \NC horizontal line \NC 10.20 \VL\MR
\VL \tex{VL} \NC vertical line \NC -14.30 \VL\MR
\VL \tex{NR} \NC next row \NC -100.00 \VL\MR
\VL \tex{SR} \NC single row \NC 2.35 \VL\MR
\VL \tex{FR} \NC first row \NC 159.00 \VL\MR
\VL \tex{MR} \NC middle row \NC -1.00 \VL\MR
\VL \tex{LR} \NC last row \NC nr \VL\MR
\VL \tex{NC} \NC next column \NC 1.15 \VL\MR
\VL \tex{HL} \NC horizontal line \NC 10.20 \VL\MR
\VL \tex{VL} \NC vertical line \NC -14.30 \VL\MR
\VL \tex{NR} \NC next row \NC -100.00 \VL\MR
\VL \tex{SR} \NC single row \NC 2.35 \VL\MR
\VL \tex{FR} \NC first row \NC 159.00 \VL\MR
\VL \tex{MR} \NC middle row \NC -1.00 \VL\MR
\VL \tex{LR} \NC last row \NC nr \VL\LR
\stoptables
\stop}
\section{Natural Testing}
This is a silly natural table test.
\placetable[page][tbl:naturalSample]
{Sample table caption goes here}
{\start
\switchtobodyfont[small]
\bTABLE[split=repeat,
splitmethod=a]
% Outside border
\setupTABLE[frame=off]
\setupTABLE[column][first][leftframe=on]
\setupTABLE[column][last][rightframe=on]
\setupTABLE[row][first][topframe=on]
\setupTABLE[row][last][bottomframe=on]
% Heading line bottom rule
\setupTABLE[row][first][bottomframe=on]
% Alignment
\setupTABLE[column][1][width=2.5cm,align=middle]
\setupTABLE[column][2][width=2.5cm,align=right]
\setupTABLE[column][3][width=2.5cm,alignmentcharacter={.},aligncharacter=yes,align=middle]
% Header
\bTABLEhead
\bTR\bTD command \eTD\bTD meaning \eTD\bTD $\lambda$ (deg.) \eTD\eTR
\eTABLEhead
% Body
\bTABLEbody
\bTR\bTD \tex{NC} \eTD\bTD next column \eTD\bTD 1.15 \eTD\eTR
\bTR\bTD \tex{HL} \eTD\bTD horizontal line \eTD\bTD 10.20 \eTD\eTR
\bTR\bTD \tex{VL} \eTD\bTD vertical line \eTD\bTD -14.30 \eTD\eTR
\bTR\bTD \tex{NR} \eTD\bTD next row \eTD\bTD -100.00 \eTD\eTR
\bTR\bTD \tex{SR} \eTD\bTD single row \eTD\bTD 2.35 \eTD\eTR
\bTR\bTD \tex{FR} \eTD\bTD first row \eTD\bTD 159.00 \eTD\eTR
\bTR\bTD \tex{MR} \eTD\bTD middle row \eTD\bTD -1.00 \eTD\eTR
\bTR\bTD \tex{LR} \eTD\bTD last row \eTD\bTD nr \eTD\eTR
\bTR\bTD \tex{NC} \eTD\bTD next column \eTD\bTD 1.15 \eTD\eTR
\bTR\bTD \tex{HL} \eTD\bTD horizontal line \eTD\bTD 10.20 \eTD\eTR
\bTR\bTD \tex{VL} \eTD\bTD vertical line \eTD\bTD -14.30 \eTD\eTR
\bTR\bTD \tex{NR} \eTD\bTD next row \eTD\bTD -100.00 \eTD\eTR
\bTR\bTD \tex{SR} \eTD\bTD single row \eTD\bTD 2.35 \eTD\eTR
\bTR\bTD \tex{FR} \eTD\bTD first row \eTD\bTD 159.00 \eTD\eTR
\bTR\bTD \tex{MR} \eTD\bTD middle row \eTD\bTD -1.00 \eTD\eTR
\bTR\bTD \tex{LR} \eTD\bTD last row \eTD\bTD nr \eTD\eTR
\bTR\bTD \tex{NC} \eTD\bTD next column \eTD\bTD 1.15 \eTD\eTR
\bTR\bTD \tex{HL} \eTD\bTD horizontal line \eTD\bTD 10.20 \eTD\eTR
\bTR\bTD \tex{VL} \eTD\bTD vertical line \eTD\bTD -14.30 \eTD\eTR
\bTR\bTD \tex{NR} \eTD\bTD next row \eTD\bTD -100.00 \eTD\eTR
\bTR\bTD \tex{SR} \eTD\bTD single row \eTD\bTD 2.35 \eTD\eTR
\bTR\bTD \tex{FR} \eTD\bTD first row \eTD\bTD 159.00 \eTD\eTR
\bTR\bTD \tex{MR} \eTD\bTD middle row \eTD\bTD -1.00 \eTD\eTR
\bTR\bTD \tex{LR} \eTD\bTD last row \eTD\bTD nr \eTD\eTR
\bTR\bTD \tex{NC} \eTD\bTD next column \eTD\bTD 1.15 \eTD\eTR
\bTR\bTD \tex{HL} \eTD\bTD horizontal line \eTD\bTD 10.20 \eTD\eTR
\bTR\bTD \tex{VL} \eTD\bTD vertical line \eTD\bTD -14.30 \eTD\eTR
\bTR\bTD \tex{NR} \eTD\bTD next row \eTD\bTD -100.00 \eTD\eTR
\bTR\bTD \tex{SR} \eTD\bTD single row \eTD\bTD 2.35 \eTD\eTR
\bTR\bTD \tex{FR} \eTD\bTD first row \eTD\bTD 159.00 \eTD\eTR
\bTR\bTD \tex{MR} \eTD\bTD middle row \eTD\bTD -1.00 \eTD\eTR
\bTR\bTD \tex{LR} \eTD\bTD last row \eTD\bTD nr \eTD\eTR
\bTR\bTD \tex{NC} \eTD\bTD next column \eTD\bTD 1.15 \eTD\eTR
\bTR\bTD \tex{HL} \eTD\bTD horizontal line \eTD\bTD 10.20 \eTD\eTR
\bTR\bTD \tex{VL} \eTD\bTD vertical line \eTD\bTD -14.30 \eTD\eTR
\bTR\bTD \tex{NR} \eTD\bTD next row \eTD\bTD -100.00 \eTD\eTR
\bTR\bTD \tex{SR} \eTD\bTD single row \eTD\bTD 2.35 \eTD\eTR
\bTR\bTD \tex{FR} \eTD\bTD first row \eTD\bTD 159.00 \eTD\eTR
\bTR\bTD \tex{MR} \eTD\bTD middle row \eTD\bTD -1.00 \eTD\eTR
\bTR\bTD \tex{LR} \eTD\bTD last row \eTD\bTD nr \eTD\eTR
\bTR\bTD \tex{NC} \eTD\bTD next column \eTD\bTD 1.15 \eTD\eTR
\bTR\bTD \tex{HL} \eTD\bTD horizontal line \eTD\bTD 10.20 \eTD\eTR
\bTR\bTD \tex{VL} \eTD\bTD vertical line \eTD\bTD -14.30 \eTD\eTR
\bTR\bTD \tex{NR} \eTD\bTD next row \eTD\bTD -100.00 \eTD\eTR
\bTR\bTD \tex{SR} \eTD\bTD single row \eTD\bTD 2.35 \eTD\eTR
\bTR\bTD \tex{FR} \eTD\bTD first row \eTD\bTD 159.00 \eTD\eTR
\bTR\bTD \tex{MR} \eTD\bTD middle row \eTD\bTD -1.00 \eTD\eTR
\bTR\bTD \tex{LR} \eTD\bTD last row \eTD\bTD nr \eTD\eTR
\eTABLEbody
\eTABLE
\stop}
\stoptext
More information about the ntg-context
mailing list