GNU TeXmacsUser manualReferenceAboutEnglishยทDeutsch
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\(:=\)auto

table-vmode\(:=\)auto
(determination of table dimensions)

These parameters specify how to determine the dimensions of the table. When no table-width is specified, the width is determined automatically from the contents (mode auto). When table-width is specified, the possible values of table-hmode are exact (the default in that case: the table gets exactly the specified width), min (the table is at most as wide as table-width, but no wider than needed for its contents) and max (the table is at least as wide as table-width). In the non-automatic modes, unused space is distributed over the columns according to cell-hpart (see below). The height is determined similarly using table-height, table-vmode and cell-vpart.

table-halign\(:=\)l

table-valign\(:=\)f
(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 privileged origin column table-col-origin). Similarly, table-valign 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 privileged origin row table-row-origin).

table-row-origin\(:=\)0

table-col-origin\(:=\)0
(privileged cell)

Table coordinates of a privileged “origin cell” which may be used for aligning the table in the surrounding text (see above). Rows and columns are numbered from 1; negative values count from the bottom resp. right of the table.

table-lsep\(:=\)0fn

table-rsep\(:=\)0fn

table-bsep\(:=\)0fn

table-tsep\(:=\)0fn
(padding around table)

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

table-lborder\(:=\)0ln

table-rborder\(:=\)0ln

table-bborder\(:=\)0ln

table-tborder\(:=\)0ln
(border around table)

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

table-hyphen\(:=\)n
(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 where the page break occurs have 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-cols and table-max-cols are both set to \(3\) for the eqnarray* environment.

Layout of the individual cells
cell-background\(:=\)
(background color)

A background color for the cell. Besides colors, patterns and gradients are also allowed; the special value foreground stands for the current foreground color.

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 \(p_i\) the so determined part for each column (\(i \in \{1, \ldots, n\}\)). Then the extra horizontal space which will be distributed to this column is \(p_i (w - s) / (p_1 + \cdots + p_n)\). A similar computation determines the extra vertical space which is distributed to each row.

cell-hmode\(:=\)auto

cell-vmode\(:=\)auto
(determination of cell dimensions)

These parameters specify how to determine the width and the height of the cell. If no cell-width is specified, the width is determined by the content (mode auto). Otherwise, if cell-hmode is exact (the default when a width is given), then the width is given by cell-width. If cell-hmode is min or max, then the width is the minimum resp. maximum of cell-width and the width of the content. The height is determined similarly.

cell-halign\(:=\)l

cell-valign\(:=\)B
(cell alignment)

These parameters determine the horizontal and vertical alignment of the cell. Possible values of cell-halign are l (left), c (center) and r (right). The upper case variants L, C and R align the cells of a column w.r.t. a common vertical axis; such a value may be followed by a string at whose position the alignment takes place. For instance, L. aligns on the decimal dot and L, on the decimal comma. Possible values of cell-valign are t (top), c (center), b (bottom) and B (baseline); the less common values T and C align the cells of a row w.r.t. common horizontal axes near the top resp. the center.

cell-lsep\(:=\)1spc

cell-rsep\(:=\)1spc

cell-bsep\(:=\)1sep

cell-tsep\(:=\)1sep
(cell padding)

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

cell-lborder\(:=\)0ln

cell-rborder\(:=\)0ln

cell-bborder\(:=\)0ln

cell-tborder\(:=\)0ln
(cell borders)

The borders of the cell (at the left, right, bottom and top). The displayed border between cells \(T_{i, j}\) and \(T_{i, j + 1}\) at positions \((i, j)\) and \((i, j + 1)\) is the maximum of the borders between the right border of \(T_{i, j}\) and the left border of \(T_{i, j + 1}\). Similarly, the displayed border between cells \(T_{i, j}\) and \(T_{i + 1, j}\) is the maximum of the bottom border of \(T_{i, j}\) and the top border of \(T_{i + 1, j}\).

cell-vcorrect\(:=\)a
(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-hyphen\(:=\)n
(allow for hyphenation inside cells)

By default, the cells contain inline content which is not hyphenated. The cell-hyphen variable, which can be set through Cell\(\rightarrow\)Line wrapping, determines whether and how the content is broken into several lines. Possible values are n (disable line breaking) and b, c and t (enable line breaking and align at the bottom, center resp. top line). When line breaking is enabled, the cell content is typeset as a paragraph whose width is the width of the cell.

cell-block\(:=\)auto
(block content inside cells)

This variable determines whether the cell contains block content, i.e. whether its content is wrapped into a document tag. Possible values are no, yes and auto (block content if and only if line wrapping is enabled through cell-hyphen). The editor uses this setting in order to insert or remove the document tags around cell contents.

cell-swell\(:=\)0ex
(extra padding around large cells)

When positive, cells without line wrapping whose content is exceptionally high or deep receive additional vertical padding of at most cell-swell at the top resp. bottom (except at the top and bottom borders of the table). As for par-swell, the amount of padding depends on the thresholds math-top-swell-start, math-top-swell-end, math-bot-swell-start and math-bot-swell-end. This variable is used for instance by matrices.

cell-row-span\(:=\)1

cell-col-span\(:=\)1
(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-orientation\(:=\)portrait
(orientation of cell)

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

cell-row-nr\(:=\)1

cell-col-nr\(:=\)1
(current cell position)

During the typesetting of a table, these environment variables contain the position of the cell which is currently being typeset. Notice that the typesetter numbers rows and columns starting from 0 here, contrary to the cwith primitive.

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