Difference between revisions of "Tables Overview"

From Wiki
Jump to navigation Jump to search
(linetables have also no repeated header, besides being obsolete; new column for xtables)
Line 5: Line 5:
 
* [[Tabulate]] (tabulation, '''recommended for simple requirements''')
 
* [[Tabulate]] (tabulation, '''recommended for simple requirements''')
 
* [[TABLE]] (natural tables, HTML tables, '''recommended''')
 
* [[TABLE]] (natural tables, HTML tables, '''recommended''')
* [[Linetable]] (new multipage tables, '''experimental''')
+
* [[Linetable]] (new multipage tables, '''experimental''' and probably obsolete)
 
* [http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf xtables] (extreme tables)
 
* [http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf xtables] (extreme tables)
  
Line 23: Line 23:
 
<tr style="background-color:#DDDDDD" align="left" valign="top">
 
<tr style="background-color:#DDDDDD" align="left" valign="top">
 
<th>Feature</th><th>[[Tabulate]]</th><th>[[Table]]</th>
 
<th>Feature</th><th>[[Tabulate]]</th><th>[[Table]]</th>
<th>[[Tables]]</th><th>[[TABLE]]</th><th>[[Linetable]]</th>
+
<th>[[Tables]]</th><th>[[TABLE]]</th><th>[[Linetable]]</th><th>[[xtables]]</th>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top">
 
<tr align="left" valign="top">
 
<th style="background-color:#DDDDDD">horizonal lines</th>
 
<th style="background-color:#DDDDDD">horizonal lines</th>
Line 38: Line 39:
 
</texcode></td>
 
</texcode></td>
 
<td>unknown</td>
 
<td>unknown</td>
 +
<td>yes</td>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<th style="background-color:#DDDDDD">vertical lines</th>
 
<th style="background-color:#DDDDDD">vertical lines</th>
Line 52: Line 55:
 
</texcode></td>
 
</texcode></td>
 
<td>unknown</td>
 
<td>unknown</td>
 +
<td>yes</td>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top">
 
<tr align="left" valign="top">
 
<th style="background-color:#DDDDDD">multipage</th>
 
<th style="background-color:#DDDDDD">multipage</th>
Line 60: Line 65:
 
<td>yes, with <tt>split=yes</tt> or <tt>split=repeat</tt></td>
 
<td>yes, with <tt>split=yes</tt> or <tt>split=repeat</tt></td>
 
<td>yes, even horizontally</td>
 
<td>yes, even horizontally</td>
 +
<td>yes</td>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<th style="background-color:#DDDDDD">repeated header</th>
 
<th style="background-color:#DDDDDD">repeated header</th>
 
<td><texcode>
 
<td><texcode>
\setuptabulate[header=repeat]
+
\setuptabulate
 +
[header=repeat]
 
\starttabulatehead
 
\starttabulatehead
 
...
 
...
Line 86: Line 94:
 
\eTABLEhead
 
\eTABLEhead
 
</texcode></td>
 
</texcode></td>
 +
<td>yes</td>
 
<td>yes</td>
 
<td>yes</td>
 
</tr>
 
</tr>
 +
 
<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>
Line 100: Line 110:
 
\stoptabletail
 
\stoptabletail
 
</texcode></td>
 
</texcode></td>
 +
<td>no</td>
 
<td>no</td>
 
<td>no</td>
 
<td>yes</td>
 
<td>yes</td>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<th style="background-color:#DDDDDD">automatic fitting to given table width</th>
 
<th style="background-color:#DDDDDD">automatic fitting to given table width</th>
Line 115: Line 127:
 
</texcode></td>
 
</texcode></td>
 
<td>unknown</td>
 
<td>unknown</td>
 +
<td>default</td>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top">
 
<tr align="left" valign="top">
 
<th style="background-color:#DDDDDD">problems</th>
 
<th style="background-color:#DDDDDD">problems</th>
Line 136: Line 150:
 
</texcode></td>
 
</texcode></td>
 
<td>there may be problems in width and height calculation and perhaps the multipage features</td>
 
<td>there may be problems in width and height calculation and perhaps the multipage features</td>
<td>still experimental, nearly no documentation</td>
+
<td>experimental, nearly no documentation</td>
 +
<td>very verbose</td>
 
</tr>
 
</tr>
 +
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<tr align="left" valign="top" style="background-color:#EEEEEE;">
 
<th style="background-color:#DDDDDD">documentation (except wiki)</th>
 
<th style="background-color:#DDDDDD">documentation (except wiki)</th>
Line 143: Line 159:
 
<td>[[manual:mp-cb-en.pdf|ms-cb-en.pdf]], [[source:tabl-tab.mkii|tabl-tab.mkii]]</td>
 
<td>[[manual:mp-cb-en.pdf|ms-cb-en.pdf]], [[source:tabl-tab.mkii|tabl-tab.mkii]]</td>
 
<td>[[source:tabl-tab.mkii|tabl-tab.mkii]]</td>
 
<td>[[source:tabl-tab.mkii|tabl-tab.mkii]]</td>
<td>[[manual:enattab.pdf|enattab.pdf]], [http://dl.contextgarden.net/myway/NaturalTables.pdf NaturalTables.pdf], [[source:tabl-ntb.mkii|tabl-ntb.mkii]]</td>
+
<td>[[manual:enattab.pdf|enattab.pdf]], [http://dl.contextgarden.net/myway/NaturalTables.pdf NaturalTables.pdf], [[source:tabl-ntb.mkii|tabl-ntb.mkii]] / [[source:tabl-ntb.mkiv|tabl-ntb.mkiv]]</td>
<td>[[source:tabl-ltb.mkii|tabl-ltb.mkii]]</td>
+
<td>[[source:tabl-ltb.mkii|tabl-ltb.mkii]] / [[source:tabl-ltb.mkiv|tabl-ltb.mkiv]]</td>
</tr></table>
+
<td>[http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf xtables-mkiv.pdf]</td>
 +
</tr>
 +
</table>
  
 
[[Category:Tables]]
 
[[Category:Tables]]

Revision as of 08:48, 30 July 2015

< 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 and probably obsolete)
  • xtables (extreme tables)

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 TablesTABLELinetablextables
horizonal lines \HL \HL \HL
\setupTABLE
[topframe=on]
or
\setupTABLE
[bottomframe=on]
unknown yes
vertical lines no \VL \VL
\setupTABLE
[leftframe=on]
or
\setupTABLE
[rightframe=on]
unknown yes
multipage yes no yes yes, with split=yes or split=repeat yes, even horizontally yes
repeated header
\setuptabulate
[header=repeat]
\starttabulatehead
...
\stoptabulatehead
only one line
no
\setuptables
  [split=repeat]

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

\starttabletail
...
\stoptabletail
no no yes
automatic fitting to given table width no \SetTableToWidth \SetTableToWidth
\setupTABLE
[option=stretch,
 textwidth=10cm]
unknown default
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 experimental, nearly no documentation very verbose
documentation (except wiki) contextref.pdf, tabl-tbl.mkii, MAPS article ms-cb-en.pdf, tabl-tab.mkii tabl-tab.mkii enattab.pdf, NaturalTables.pdf, tabl-ntb.mkii / tabl-ntb.mkiv tabl-ltb.mkii / tabl-ltb.mkiv xtables-mkiv.pdf