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 assign and with, the tabular environment variables are rather set with the tformat primitive. This makes it possible to apply certain settings to any rectangular subtable of the entire table and in particular to rows or columns. For more details, see the documentation of the twith and cwith primitives.

Layout of the table as a whole

table-width

table-height
(hint for table dimensions)

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

table-vmode
(determination of table dimensions)

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-halignl

table-valignf
(alignment inside text)

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-origin0

table-col-origin0
(priviledged cell)

Table coordinates of an priviledged “origin cell” which may be used for aligning the table in the surrounding text (see above).

table-lsep0fn

table-rsep0fn

table-bsep0fn

table-tsep0fn
(padding around table)

Padding around the table (in addition to the padding of individual cells).

table-lborder0ln

table-rborder0ln

table-bborder0ln

table-tborder0ln
(border around table)

Border width for the table (in addition to borders of the individual cells).

table-hyphenn
(allow for hyphenation?)

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

  1. The table is not surrounded by other markup in the same paragraph.
  2. The rows whether the page break occurs has no borders.

An example of a tabular environment which allows for page breaks is eqnarray*.

table-min-rows

table-min-cols

table-max-rows

table-max-cols
(constraints on the table's size)

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 eqnarray* environment.

Layout of the individual cells

cell-background
(background color)

A background color for the cell.

cell-width

cell-height
(hint for cell dimensions)

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

cell-vpart
(fill part of unused space)

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-hmodeexact

cell-vmodeexact
(determination of cell dimensions)

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-halignl

cell-valignB
(cell alignment)

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-lsep0fn

cell-rsep0fn

cell-bsep0fn

cell-tsep0fn
(cell padding)

The amount of padding around the cell (at the left, right, bottom and top).

cell-lborder0ln

cell-rborder0ln

cell-bborder0ln

cell-tborder0ln
(cell borders)

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.

cell-vcorrecta
(vertical correction of text)

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).

cell-hyphenn
(allow for hyphenation inside cells)

By default, the cells contain inline content which is not hyphenated. By selecting TableSpecial cell propertiesHyphenationMulti-paragraph, the cell contents becomes multi-paragraph. In that case, cell-hyphen determines how this content is hyphenated. Possible values are n (disable line breaking) and b, c and t (enable line breaking and align at the bottom, center resp. top line).

cell-row-span1

cell-col-span1
(span of a cell)

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.

cell-decoration
(decorating table for cell)

This environment variable may contain a decorating table for the cell. Such a decoration enlarges the table with extra columns and cells. The tmarker primitive determines the location of the original decorated cell and its surroundings in the enlarged table are filled up with the decorations. Cell decorations are not really used at present and may disappear in future versions of TeXmacs.

cell-orientationportrait
(orientation of cell)

Other orientations for cells than portrait have not yet been implemented.

cell-row-nr1

cell-col-nr1
(current cell position)

In the future, these environment variables should contain the current cell position during the typesetting process.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".