Open main menu

Changes

2,396 bytes added ,  10:59, 19 September 2005
no edit summary
</texcode>
The different "row end" commands make a better spacing. Better use <cmd>SR</cmd>, <cmd>FR</cmd>, <cmd>MR</cmd>, <cmd>LR</cmd> instead of <cmd>NR</cmd>. You can also use <cmd>AR</cmd> instead of <cmd>SR</cmd>, <cmd>FR</cmd>, <cmd>MR</cmd> and <cmd>LR</cmd> (AR for automatic row).
If you need information about <cmd>placetable</cmd> look after <cmd>placefloat</cmd> in the manual!
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 PCTeX] -- but note that the TaBlE manual only talks about the original syntax, which does not use <cmd>NC</cmd>, <cmd>HL</cmd> cum suis.
 
The table is defined by the template enclosed in square brackets after <cmd>starttable</cmd>. 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 the each column is surrounded by <tt>|</tt> signs. These are a necessary. The formatting keys for each column can be a choice of
{|
! Key || Meaning
|-
! colspan="2" | Primitive keys
|-
|a{<i>tokens</i>} || Adds <i>tokens</i> '''after''' the column content
|-
|b{<i>tokens</i>} || Adds <i>tokens</i> '''before''' the column content
|-
|\{ || Enclose the column in braces
|-
|*{<i>n</i>}{<i>keys</i>} || Equivalent to repeating the formatting keys <i>keys</i> <i>n</i> times
|-
! colspan="2" | Positioning keys
|-
|\LeftGlue || Specifies the left glue to be used before the column
|-
|\RightGlue || Specifies the right glue to be used after the column
|-
|l || Left-align the column
|-
|c || Center the column
|-
|r || Right-align the column
|-
|k || Insert a kern both left and right of the column
|-
|i || Add a kern to the left of the column
|-
|j || Add a kern to the right of the column
|-
! colspan="2" | Numeric item keys
|-
|n || Numeric item not in math mode
|-
|N || Numeric item in math mode
|-
! colspan="2" | Attribute keys
|-
|m || Each cell is in (inline) math mode. Equivalent to <tt>b$ a$</tt>
|-
|M || Each cell is in display math mode. Equivalent to <tt>\{b{$\displaystyle}a$</tt>
|-
|\m || Equivalent to <tt>l b{{}}m</tt>
|-
|\M || Equivalent to <tt>l b{{}}M</tt>
|-
|f || Set font according to following <cmd>command</cmd>
|-
|B || Bold. Equivalent to <tt>f\bf</tt>
|-
|I || Italic. Equivalent to <tt>f\it</tt>
|-
|S || Slanted. Equivalent to <tt>f\sl</tt>
|-
|R || Roman. Equivalent to <tt>f\rm</tt>
|-
|T || Teletype. Equivalent to <tt>f\tt</tt>
|-
|p || Set each cell as a paragraph
|-
! colspan="2" | Minimum column width key
|-
|w || Set minimum column width
|-
! colspan="2" | Tabskip keys
|-
|s || Set the tabskip to the right of this column and of all following columns until the next <tt>s</tt> or <tt>o</tt> key
|-
|o || Set the tabskip to the right of this column only.
|}
 
 
It's possible to create columnspans (i.e. cells that span more than one column) with the command <cmd>use[<i>N</i>]</cmd> where <i>N</i> is the number of columns spanned by the cell. It's often necessary to use <cmd>ReFormat[<i>new keys</i>]</cmd> to reformat this specific cell according to the <i>new keys</i>.
The only ConTeXt docs about it are in [http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf ms-cb-en.pdf].
 
The sample looks like this:
2

edits