Command/starttable

From ConTeXt wiki
< Command
Revision as of 07:39, 14 April 2010 by Patrick Gundlach (talk | contribs) (cleanup)

\starttable

Syntax

\starttable[...] ... \stoptable
[...] text name


Description

\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

...

look at \at{table on}{th page}[tab:ships] % produces "look at table on 3th page"

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.


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 table 11.2).

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

See also