Changes

Jump to navigation Jump to search
31 bytes added ,  13:24, 9 August 2020
m
Text replacement - "<cmd>" to "{{cmd|"
This is ConTeXts oldest table module. It uses the same formatting as [[Tabulate]] (see [[Tables Overview]]).
This mode is based on Michael Wichura's TaBlE package for PlainTeX. The official manual for it is commercial (about 40 USD), see [http://www.pctex.com/books.html PCTeX] -- but note that the TaBlE manual only talks about the original syntax, which does not use <{{cmd>|NC}}, <{{cmd>|HL}} cum suis.
The only ConTeXt docs are in [[manual:ms-cb-en.pdf|ConTeXt - an excursion]]. There is also two introductory articles in tugboat [http://tug.org/TUGboat/Articles/tb28-3/tb90mahajan.pdf ConTeXt basics for users: Table macros] [http://www.tug.org/TUGboat/Articles/tb29-1/tb91mahajan.pdf Table macros II] by Aditya Mahajan (2007 and 2008).
</td></tr></table>
* You get vertical lines (rules), if you use <{{cmd>|VL}} instead of <{{cmd>|NC}}.* Better use <{{cmd>|SR}}, <{{cmd>|FR}}, <{{cmd>|MR}}, <{{cmd>|LR}} instead of <{{cmd>|NR}}.* You can also use <{{cmd>|AR}} instead of <{{cmd>|SR}}, <{{cmd>|FR}}, <{{cmd>|MR}} and <{{cmd>|LR}} (AR for automatic row).* You can leave out the <{{cmd>|NC}} before the "row" command, but not if you use <{{cmd>|AR}} in a last or single row (see example).* You can influence the table with <{{cmd>|setuptables}}.
==Column Definition==
The table is defined by the template enclosed in square brackets after <{{cmd>|starttable}}. The template has the form
<tt>|keys for the first column|keys for the second column|...|keys for the last column|</tt>. Please note that each column is surrounded by <tt>|</tt> signs. These are necessary. The formatting keys for each column can be a choice of
==Column Spans==
It's possible to create columnspans (i.e. cells that span more than one column) with the command <{{cmd>|use{<i>N</i>}}} where ''N'' is the number of columns spanned by the cell. It's often necessary to use <{{cmd>|ReFormat[<i>new keys</i>]{}}} to reformat this specific cell according to the ''new keys''.
(<{{cmd>|ReFormat}} can be abbreviated <{{cmd>|REF}} for brevity.)
== Row Spans==
It's also possible to create rowspans (i.e. cells that span more than one row) with the command <{{cmd>|Raise(<i>dimen</i>){<i>content</i>}}} or <{{cmd>|Lower(<i>dimen</i>){</i>content</i>}}} that raise or lower ''content'' by ''dimen''.
<table cols="2"><tr valign="top"><td>
</td></tr></table>
(<{{cmd>|Lower(.5\lineheight){a}}} can be abbreviated <{{cmd>|LOW{a}}} for brevity.)
An alternative means of spanning rows by a tall object makes use of a bit of TeX magic:
<{{cmd>|smash{tall object}}}:
<table cols="2"><tr valign="top"><td>
* See [[Floating Objects]] in general.
* If you need information about <{{cmd>|placetable}} look after <{{cmd>|placefloat}} in the manual or texshow!
* If you do not want a caption for your table, to get rid of it altogether you have to add "none" to settings and then leave the braces empty; if you only leave the braces empty, your table will still be numbered ("Table 1" etc.).
won't cover the whole cell.
* <{{cmd>|BL}} makes a gray background: the optional argument tells BL how many cells it should color* <{{cmd>|CL}} makes a colored row
==Fit Table Width==

Navigation menu