Command/starttable

From ConTeXt wiki

\starttable

Syntax

\starttable[...][...] ... \stoptable
[...] text name
textwidth dimension max

Description

The table entries are placed between the \starttable ... \stoptable pair. Between the bracket pair your can specify the table format with the column separators | and the format keys (see below), or the name of a defined table template (see \definetabletemplate)

KeyMeaning
| column separator
c center
l flush left
r flush right
s<n> set intercolumn space at value n = 0; 1; 2
w<> set minimum column width at specified value
CommandMeaning
\AR next row make row with automatic vertical space adjustment
\NR next row make row with no vertical space adjustment
\FR first row make row, adjust upper spacing
\LR last row make row, adjust lower spacing
\MR mid row make row, adjust upper and lower spacing
\SR separate row make row, adjust upper and lower spacing
\VL vertical line draw a vertical line, go to next column
\NC next column go to next column
\HL horizontal line draw a horizontal
\DL division line? draw a division line over the next column
\DL[n] division line? draw a division line over n columns
\DC division column? draw a space over the next column
\DR division row? make row, adjust upper and lower spacing
\LOW{text} lower text
\TWO, \THREE etc. use the space of the next two, three columns
? \DL, \DC and \DR are used in combination.

Example

The first command \placetable has the same function as \placefigure. It takes care of spacing before and after the table and numbering. Furthermore the floating mechanism is initialized so the table will be placed at the most optimal location of the page.


\placetable[here][tab:ships]{Ships that moored at Hasselt.}
\starttable[|c|c|]
\HL
\NC \bf Year \NC \bf Number of ships \NC\SR
\HL
\NC 1645 \NC 450 \NC\FR
\NC 1671 \NC 480 \NC\MR
\NC 1676 \NC 500 \NC\MR
\NC 1695 \NC 930 \NC\LR
\HL
\stoptable

...

See \in{Table}[tab:ships] on \at{page}[tab:ships] 

yields

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: