Difference between revisions of "Tables Overview"

From Wiki
Jump to navigation Jump to search
m
m (minor adjustments, nothing new)
Line 1: Line 1:
ConTeXt has a whole bunch of possibilities to typeset tables. Not each provides everything you may need.
+
__NOTOC__
 +
= Many possibilities for tables typesetting =
  
 +
ConTeXt has a whole bunch of possibilities to typeset tables. Not each provides everything [[#Features|Features]] you may need.
 +
 +
[[Floating_Objects|Floating objects]] enable to place and number tables, like graphics.
 +
 +
{{TwoColumnsUnderLevel1
 +
|
 +
== Recommended ==
 
* [[Tabulate]] (tabulation, '''recommended for simple requirements''')
 
* [[Tabulate]] (tabulation, '''recommended for simple requirements''')
 
* [[TABLE]] (natural tables, HTML tables, '''recommended''')
 
* [[TABLE]] (natural tables, HTML tables, '''recommended''')
 
* [[xtables]] (extreme tables – mostly compatible to natural tables, better for page breaking)
 
* [[xtables]] (extreme tables – mostly compatible to natural tables, better for page breaking)
 
* framed tables (for simple tables that span hundreds of pages)
 
* framed tables (for simple tables that span hundreds of pages)
 
+
|
Older ones:
+
== Deprecated ==
 
 
 
* [[Table]] (TaBlE, '''deprecated''')
 
* [[Table]] (TaBlE, '''deprecated''')
 
* [[Tables]] (multipage TaBlE, '''deprecated''')
 
* [[Tables]] (multipage TaBlE, '''deprecated''')
Line 13: Line 20:
  
 
Note that you can use natural and extreme tables with the old Table/Tabulate syntax. (To make this even more confusing...)
 
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 19: Line 27:
 
* [http://tug.org/TUGboat/Articles/tb28-3/tb90mahajan.pdf ConTeXt basics for users: Table macros] and [http://www.tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf Table macros II] by Aditya Mahajan (2007 and 2008).
 
* [http://tug.org/TUGboat/Articles/tb28-3/tb90mahajan.pdf ConTeXt basics for users: Table macros] and [http://www.tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf Table macros II] by Aditya Mahajan (2007 and 2008).
  
== Features ==
+
= Features =
 
<table style="border:1px solid #DDDDDD; width:100%" align="left" valign="top">
 
<table style="border:1px solid #DDDDDD; width:100%" align="left" valign="top">
 
<tr style="background-color:#DDDDDD" align="left" valign="top">
 
<tr style="background-color:#DDDDDD" align="left" valign="top">

Revision as of 19:12, 7 June 2020

Many possibilities for tables typesetting

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

Floating objects enable to place and number tables, like graphics.

  • Recommended

    • Tabulate (tabulation, recommended for simple requirements)
    • TABLE (natural tables, HTML tables, recommended)
    • xtables (extreme tables – mostly compatible to natural tables, better for page breaking)
    • framed tables (for simple tables that span hundreds of pages)
  • Deprecated

    • 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

Feature TabulateTable/Tables TABLExtablesLinetableframedtable
horizonal lines \HL \HL
\setupTABLE
[topframe=on]
or
\setupTABLE
[bottomframe=on]
\setupxtable[...]
unknown yes
vertical lines \VL \VL
\setupTABLE
[leftframe=on]
or
\setupTABLE
[rightframe=on]
\setupxtable[...]
unknown yes
multipage yes no / yes (tables) yes, with split=yes or split=repeat vertically yes, horizontally not but planned yes, even horizontally yes
repeated header
\setuptabulate
[header=repeat]
\starttabulatehead
...
\stoptabulatehead
only one line
tables only:
\setuptables
  [split=repeat]

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

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