Difference between revisions of "Tables Overview"

From ConTeXt wiki
m (reorder and emphasize)
(no repeat of tabulate foot, only one line in tabulatehead (according to Wolfgang's mail to Hongwen Qiu on 2010-09-20))
Line 67: Line 67:
 
...
 
...
 
\stoptabulatehead
 
\stoptabulatehead
</texcode></td>
+
</texcode>
 +
only one line</td>
 
<td>no</td>
 
<td>no</td>
 
<td><texcode>
 
<td><texcode>
Line 88: Line 89:
 
<tr align="left" valign="top">
 
<tr align="left" valign="top">
 
<th style="background-color:#DDDDDD">repeated footer</th>
 
<th style="background-color:#DDDDDD">repeated footer</th>
<td><texcode>
+
<td>no</td>
\setuptabulate[footer=repeat]
 
\starttabulatetail
 
...
 
\stoptabulatetail
 
</texcode></td>
 
 
<td>no</td>
 
<td>no</td>
 
<td><texcode>
 
<td><texcode>

Revision as of 11:08, 20 September 2010

< Visuals | Structurals >

ConTeXt has a whole bunch of possibilities to typeset tables. Not each provides everything you may need.

  • Tabulate (tabulation, recommended for simple requirements)
  • TABLE (natural tables, HTML tables, recommended)
  • Linetable (new multipage tables, experimental)

Older ones:

  • Table (TaBlE, deprecated)
  • Tables (multipage TaBlE, deprecated)


If you have simple tables with lots of contents, and you're tired of typing \bTR\bTDs or \NC\NRs, you can also have a look at

Features

FeatureTabulateTable TablesTABLELinetable
horizonal lines \HL \HL \HL
\setupTABLE
[topframe=on]
or
\setupTABLE
[bottomframe=on]
unknown
vertical lines no \VL \VL
\setupTABLE
[leftframe=on]
or
\setupTABLE
[rightframe=on]
unknown
multipage yes no yes yes, with split=yes or split=repeat yes, even horizontally
repeated header
\setuptabulate[header=repeat]
\starttabulatehead
...
\stoptabulatehead
only one line
no
\setuptables
  [split=repeat]

\starttablehead
...
\stoptablehead
\bTABLE
[split=repeat]
\bTABLEhead
...
\eTABLEhead
yes
repeated footer no no
\setuptables
  [split=repeat]

\starttabletail
...
\stoptabletail
no yes
automatic fitting to given table width no \SetTableToWidth \SetTableToWidth
\setupTABLE
[option=stretch,
 textwidth=10cm]
unknown
problems very limited limited
\starttext
\starttablehead
  \HL
\stoptablehead
\starttables[|l|l|]
\dorecurse{50}{%
  \VL SomeText
  \VL SomeText
  \VL \AR}
\stoptables
Problem: top margin on
first page is bigger.
\stoptext
there may be problems in width and height calculation and perhaps the multipage features still experimental, nearly no documentation
documentation (except wiki) cont-eni.pdf, tabl-tbl.mkii, MAPS article ms-cb-en.pdf, tabl-tab.mkii tabl-tab.mkii enattab.pdf, NaturalTables.pdf, tabl-ntb.mkii tabl-ltb.mkii