![]() |
Table layout | ![]() |
The environment variables for tables can be subdivided in variables
(prefixed by table-) which apply to the
whole table and those (prefixed by cell-)
which apply to individual cells. Whereas usual environment variables
are set with
table-width≔
These parameters indicate a hint for the dimensions of the table. The table-hmode and table-vmode variables determine how to take into account these settings.
table-hmode≔
These parameters specify how to determine the dimensions of the table. At the moment, the values of table-hmode and table-vmode are actually ignored and table-width and table-height are interpreted as the minimal width and height of the table.
table-halign≔l
These parameters determine how the table should be aligned in the surrounding text. Possible values for table-halign are l (left), c (center) and r (right), and possible values for table-valign are t (top), f (centered at fraction bar height), c (center) and b (bottom).
In addition to the above values, the alignment can take place with respect to the baselines of particular cells. Such values for table-halign are L (align w.r.t. the left column), C (align w.r.t. the middle column), R (align w.r.t. the right column) and O (align w.r.t. the priviledged origin column table-col-origin). Similarly, table-halign may take the additional values T (align w.r.t. the top row), C (align w.r.t. the middle row), B (align w.r.t. the bottom row) and O (align w.r.t. the priviledged origin row table-row-origin).
table-row-origin≔0
Table coordinates of an priviledged “origin cell” which may be used for aligning the table in the surrounding text (see above).
table-lsep≔0fn
table-rsep≔0fn
table-bsep≔0fn
Padding around the table (in addition to the padding of individual cells).
table-lborder≔0ln
table-rborder≔0ln
table-bborder≔0ln
Border width for the table (in addition to borders of the individual cells).
A flag which specifies whether page breaks may occur at the middle of rows in the table. When table-hyphen is set to y, then such page breaks may only occur when
An example of a tabular environment which allows for page breaks
is
table-min-rows≔
table-min-cols≔
table-max-rows≔
It is possible to specify a minimal and maximal numbers of rows or
columns for the table. Such settings constraint the behaviour of
the editor for operations which may modify the size of the table
(like the insertion and deletion of rows and columns). This is
particularly useful for tabular macros. For instance, table-min-columns
and table-max-columns are both set to 3
for the
A background color for the cell.
cell-width≔
Hints for the width and the height of the cell. The real width and height also depend on the modes cell-hmode and cell-vmode, possible filling (see cell-hpart and cell-vpart below), and, of course, on the dimensions of other cells in the same row or column.
cell-hpart≔
When the sum s of the widths of all columns in a table is smaller than the width w of the table itself, then it should be specified what should be done with the unused space. The cell-hpart parameter specifies a part in the unusued space which will be taken by a particular cell. The horizontal part taken by a column is the maximum of the horizontal parts of its composing cells. Now let pi the so determined part for each column (i∈{1,…,n}). Then the extra horizontal space which will be distributed to this column is pi (w - s)/(p1 + ⋯ + pn). A similar computation determines the extra vertical space which is distributed to each row.
cell-hmode≔exact
These parameters specify how to determine the width and the height of the cell. If cell-hmode is exact, then the width is given by cell-width. If cell-hmode is min or max, then the width is the minimul resp. maximum of cell-width and the width of the content. The height is determined similarly.
cell-halign≔l
These parameters determine the horizontal and vertical alignment of the cell. Possible values of cell-halign are l (left), c (center), r (right), . (decimal dot), , (decimal comma) and R (vertical baseline). Possible values of cell-valign are t (top), c (center), b (bottom) and B (baseline).
cell-lsep≔0fn
cell-rsep≔0fn
cell-bsep≔0fn
The amount of padding around the cell (at the left, right, bottom and top).
cell-lborder≔0ln
cell-rborder≔0ln
cell-bborder≔0ln
The borders of the cell (at the left, right, bottom and top). The displayed border between cells Ti,j and Ti,j + 1 at positions (i,j) and (i,j + 1) is the maximum of the borders between the right border of Ti,j and the left border of Ti,j + 1. Similarly, the displayed border between cells Ti,j and Ti + 1,j is the maximum of the bottom border of Ti,j and the top border of Ti + 1,j.
As described above, the dimensions and the alignment of a cell may depend on the dimensions of its content. When cells contain text boxes, the vertical bounding boxes of such text may vary as a function of the text (the letter “k” resp. “y” ascends resp. descends further than “x”). Such differences sometimes leads to unwanted, non-uniform results. The vertical cell correction allows for a more uniform treatment of text of the same font, by descending and/or ascending the bounding boxes to a level which only depends on the font. Possible values for cell-vcorrect are n (no vertical correction), b (vertical correction of the bottom), t (vertical correction of the top), a (vertical correction of bottom and the top).
By default, the cells contain inline content which is not
hyphenated. By selecting
cell-row-span≔1
Certain cells in a table are allowed to span over other cells at their right or below them. The cell-row-span and cell-col-span specify the row span and column span of the cell.
This environment variable may contain a decorating table for the
cell. Such a decoration enlarges the table with extra columns and
cells. The
Other orientations for cells than portrait have not yet been implemented.
cell-row-nr≔1
In the future, these environment variables should contain the current cell position during the typesetting process.