Difference between revisions of "Command/starttable"

From Wiki
Jump to navigation Jump to search
m (Stray HTML)
(add “\SetTableToWidth“-functionality of MarkIV as described in http://www.ntg.nl/pipermail/ntg-context/2010/055004.html)
Line 7: Line 7:
<table cellspacing="4" cellpadding="2" class="cmd">
<table cellspacing="4" cellpadding="2" class="cmd">
     <td colspan="2" class="cmd">\starttable<span class="first" >[...]</span> ... \stoptable</td>
     <td colspan="2" class="cmd">\starttable<span class="first" >[...]</span><span class="second" style=color:red>[...]</span> ... \stoptable</td>
   <tr valign="top" class="first">
   <tr valign="top" class="first">
     <td class="cmd">[...]</td>
     <td class="cmd">[...]</td>
     <td>text name </td>
     <td>text name </td>
  <tr valign="top" class="second" style=color:red>
    <td class="cmd">textwidth</td>
    <td>dimension max</td>

Revision as of 12:40, 30 March 2013



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


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)

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


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.}
\NC \bf Year \NC \bf Number of ships \NC\SR
\NC 1645 \NC 450 \NC\FR
\NC 1671 \NC 480 \NC\MR
\NC 1676 \NC 500 \NC\MR
\NC 1695 \NC 930 \NC\LR


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


See also

Help from ConTeXt-Mailinglist/Forum

All issues with: