Difference between revisions of "Tables Overview"

From Wiki
Jump to navigation Jump to search
m (tabulate has VL)
(new order of recommended table modes)
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''' and probably obsolete)
+
* [[xtables]] (extreme tables – newest table mode, maybe recommended for MkIV)
* [http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf xtables] (extreme tables)
 
  
 
Older ones:
 
Older ones:
Line 12: Line 11:
 
* [[Table]] (TaBlE, '''deprecated''')
 
* [[Table]] (TaBlE, '''deprecated''')
 
* [[Tables]] (multipage TaBlE, '''deprecated''')
 
* [[Tables]] (multipage TaBlE, '''deprecated''')
 +
* [[Linetable]] ("new" multipage tables, '''experimental''' and probably obsolete)
  
 +
Note that you can use natural and extreme tables with the old Table/Tabulate syntax. (To make this even more confusing...)
  
 
If you have simple tables with lots of contents, and you're tired of typing <code>\bTR\bTD</code>s or <code>\NC\NR</code>s, you can also have a look at
 
If you have simple tables with lots of contents, and you're tired of typing <code>\bTR\bTD</code>s or <code>\NC\NR</code>s, you can also have a look at
Line 161: Line 162:
 
<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>[[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]] / [[source:tabl-ltb.mkiv|tabl-ltb.mkiv]]</td>
 
<td>[[source:tabl-ltb.mkii|tabl-ltb.mkii]] / [[source:tabl-ltb.mkiv|tabl-ltb.mkiv]]</td>
<td>[http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf xtables-mkiv.pdf]</td>
+
<td>[http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf xtables-mkiv.pdf], [[source:tabl-xtb.lua|tabl-xtb.lua]]</td>
 
</tr>
 
</tr>
 
</table>
 
</table>
  
 
[[Category:Tables]]
 
[[Category:Tables]]

Revision as of 09:22, 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)
  • xtables (extreme tables – newest table mode, maybe recommended for MkIV)

Older ones:

  • Table (TaBlE, deprecated)
  • Tables (multipage TaBlE, deprecated)
  • Linetable ("new" multipage tables, experimental and probably obsolete)

Note that you can use natural and extreme tables with the old Table/Tabulate syntax. (To make this even more confusing...)

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 \VL \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, tabl-xtb.lua