Changes

Jump to navigation Jump to search
add line and dash factors
denoting the ''alignment'' within cells of this row.
For instance consider a two-column table: if any text in the
first column should be right aligned (''real''
[[Right and left|<tt>flushright</tt>]]) and the second column
* {{cmd|HL}} draws a horizontal rule,
* {{cmd|NC}} marks a new column (or new cell),
* {{cmd|NS}} marka a new cell that spans more than one column (LMTX only),
* {{cmd|NN}} marks a new math column/cell (see below),
* {{cmd|NR}} starts a new row,
When using fixed width, you can use values relative to the
current page-width. For example: if you want the previous table
to take up all the width and having the second column taking three
quarters of the space, change the {{cmd|starttabulate}} to:
<texcode>
\stopplacetable
</context>
 
=Spanning columns=
 
Only LMTX since September 2021 supports wide cells:
 
<context source=yes>
\starttabulate[|r|l|c|]
\HL
\NC 123 \NC foo \NC bar \NC\NR
\NS[2][c] LMTX \NC\NR
\NC 123 \NC baz \NC bla \NC\NR
\HL
\stoptabulate
</context>
 
The two parameters of {{cmd|NS}} are the number of additional columns (i.e. 1 of you want to span 2 columns), and the formatting for it.
 
This works only with single-line cells, i.e. not with ā€œpā€ columns.
=Spanning Multiple Pages=
[split=yes,
header=text,
title={\color[red] {Fenchurch St. Paul}\strut},
frame=on]
\starttext
\starttabulate[|p(1.2cm)|p(1.2cm)|]
\dorecurse{6}{
}
\stoptabulate
\stoptext
</context>
\stoptabulate
</texcode>
 
In LMTX, the line commands understand one or two numerical parameters: the line factor and the dash factor. (The second is new as of 2024-02-22.)
 
<context source="yes">
\starttabulate
\FL[1,2] % linefactor (old) dashfactor (new)
\NC test \NC test and test and test and done \NC \NR
\ML[1,1]
\NC test \NC test and test and test and done \NC \NR
\NC test \NC test and test and test and done \NC \NR
\NC test \NC test and test and test and done \NC \NR
\LL[1,10]
\stoptabulate
</context>
Other types can be discovered in the source
=Using math mode=
If you want to display numerics, you can simply use {{cmd|NN}} for a new column instead of {{cmd|NC}}. This command works similar to the [http://www.pragma-ade.comnl/general/magazines/mag-0003.pdf digit-module]. Therefore you can also abbreviate:
<texcode>\starttabulate[|l|l|]
* More features are constantly added and documented in the {{src|tabl-tbl.mkiv|source}}.
* {{cmd|starttabulate}}, {{cmd|setuptabulate}}, {{cmd|definetabulate}}
* [[TABLE|Natural Tables]]
* {{cmd|starttable}}, <s>{{cmd|setuptable}}</s>
[[Category:Tables]]

Navigation menu