Open main menu

Changes

remove MkII stuff, fix errors
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
&ndash; ''not'' vertical lines.
<!--
- wtf this listing was full of <tab> chars‽ Was this supposed
- to be a bad pun on *tabulate*?
- - No, I formatted it readably in my text editor. --HR
-->
{|
! width="55%"|
\starttabulate[|r|l|lB|]
\HL
\NC {\bf format} \NC {\bf meaning} \NC Mk \NC\NR
\HL
\NC c \NC centered \NC \NC\NR\NC l \NC left aligned \NC \NC\NR\NC r \NC right aligned \NC \NC\NR\NC w(1cm) \NC one line, fixed width \NC \NR\NC p \NC paragraph, remaining width \NC\NR\NC p(2cm) \NC paragraph, lines broken to fixed width \NC \NC\NR\NC cg(.) \NC align on a character \NC IV: cg{.} \NC\NR\NC m \NC math mode \NC IV only \NC\NR\NC b \NC before , e.g. b{\star} \NC IV only \NC\NR\NC a \NC after, e.g. a{\percent} \NC IV only \NC\NR
\HL
\stoptabulate
\starttabulate[|r|l|lB|]
\HL
\NC {\bf format} \NC {\bf meaning}\NC Mk \NC\NR
\HL
\NC c \NC centered \NC\NR
\NC r \NC right aligned \NC\NR
\NC w(1cm) \NC one line, fixed width \NC\NR
\NC p \NC paragraph, remaining width \NC\NR
\NC p(2cm) \NC paragraph, lines broken to fixed width \NC\NR
\NC cg(.) \NC align on a character \NC\NR\NC m \NC math mode \NC\NR\NC b \NC before, e.g. b{\star} \NC\NR\NC a \NC after, e.g. a{\percent} \NC\NR
\HL
\stoptabulate
* {{cmd|HL}} draws a horizontal rule,
* {{cmd|NC}} marks a new column (or new cell),
* {{cmd|NS}} marka marks 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,
* {{cmd|NB}} starts a new row as a block (avoids page breaking inside of a block, to keep some lines together),
* {{cmd|TB}} (= "Table Blank") adds some vertical space between rows -- see an example below,* {{cmd|VL}} (instead of {{cmd|NC}}) draws a vertical rule -- for more info see below.
When using fixed width, you can use values relative to the
current page-width. For example: if you want the previous tableto take up all the width and having the second column taking three
quarters of the space, change the {{cmd|starttabulate}} to:
<texcode>
=Spanning columns=
Only LMTX supports wide cells (since September 2021 supports wide cells):
<context source=yes>
<context source=yes>
\setuppapersize[A10, landscape][A8, landscape]
\setuppaper[nx=2,ny=2]
\setuparranging[XY]
\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