Tabular material

Tables offer a general way to align markup in complex manners. They can be useful for the presentation of data, but also for typesetting computer programs or the design of web sites. TeXmacs provides a wide variety of parameters to control the precise layout of tables and its cells.

1.Creating tables

In order to create a table, you may either use InsertTable or one of the following keyboard shorthands:


Create a plain table.


Create a table whose cells are centered.


Create a “block”, whose cells all have a small border.


Create a block whose cells are centered.

In math mode, a few other table-like structures are provided:


Create a matrix.


Create a determinant.


Create a choice list.

Examples of a plain table, a centered block and a matrix are shown below. Notice that the environments with the explanatory text below the tables were created using InsertTableSmall table. The use of “small tables” allows you to put several tables besides each other on the same line. For a single large table, one may use InsertTableBig table.

boom tree
hallo hello
wiskunde mathematics

Table 1. A plain table.

boom tree
hallo hello
wiskunde mathematics

Table 2. A centered block.

Table 3. A matrix.

There are several other table-like environments and new ones may be created by the user. For instance, using InsertMathematicsEquations or ⌥&, you may insert an eqnarray* environment, which allows mathematically oriented users to align a list of equations which span over entire lines. An example of such a list of equations is

When starting a new table, its size is minimal (usually ) and its cells are empty. New rows and columns are inserted using the ⌥←, ⌥→, ⌥↑ and ⌥↓ shorthands. For instance, ⌥→ creates a new column at the right of the current cursor position, as illustrated in the figure below. You may also start a new row below the current cursor position by hitting .

Figure 1. Example of the insertion of a new column in a matrix. Assuming that the cursor is at the position indicated in the left-hand matrix, insertion of a new column using ⌥→ results in the right-hand matrix.

2.The formatting mode

In TeXmacs, arbitrary blocks of cells in the table may be formatted in particular ways. For instance, you may give individual cells a background color, but you may also decide an entire column to be horizontally centered. By default, formatting commands operate on individual cells, but this may be changed via TableCell operation mode. The following operation modes are available:


Operate on individual cells.


Operate on rows.


Operate on columns.


Operate on the entire table.

It is also possible to select a block of cells using the mouse and perform a single operation on that rectangle.

3.Specifying the cell and table alignment

The most frequent formatting operation is the horizontal or vertical alignment of a block of cells. You may use the ?, ?, ? and ? keystrokes to quickly align more to the left, right, top or bottom.

A specific alignment can also be selected in the TableHorizontal cell alignment and TableVertical cell alignment menus. Alternatively, you may use keyboard shorthands of the types ⌘th and ⌘tv for horizontal resp. vertical alignment.

Similarly, you may specify how the table itself should be aligned with respect to the surrounding text. This is either done via the TableHorizontal table alignment and TableVertical table alignment submenus, or using keyboard shorthands of the form ⌘tH or ⌘tV. Here represents l for “left”, c for “centered”, r for “right”, b for “bottom” and t for “top”.

4.Specifying the cell and table size

Using TableCell widthSet width resp. TableCell heightSet height you may specify the width or height of a cell. In fact, the specified width (or height) may be taken into account in three different ways:

Minimum mode

The actual width of the cell will be the minimum of the specified width and the width of the box inside the cell.

Exact mode

The width of the cell will be precisely the specified one.

Maximum mode

The actual width of the cell will be the maximum of the specified width and the width of the box inside the cell.

The border width and the cell padding (to be explained below) are taken into account in the size of the box inside the cell.

You may also specify the width and the height of the entire table in TableSpecial table properties. In particular, you may specify the table to run over the entire width of a paragraph. When specifying a width (or height) for the entire table, you may specify how the unused space is distributed over the cells using TableSpecial cell propertiesDistribute unused space. By default, the unused space is equally distributed.

5.Borders, padding and background color

You may specify the border widths and padding spaces of a cell in all possible four directions: on the left, on the right, at the bottom and at the top (see TableCell border). You have keyboard shorthands of the forms ⌘tb and ⌘tp in order to specify border widths and cell padding.

The default border width for cells in the block environment is 1ln, i.e. the standard line width in the current font (like the width of a fraction bar). This width occurs at the right and the bottom of each cell (except when the cell is on the first row or column). The default horizontal cell padding is 1spc: the width of a white space in the current font. The default vertical cell padding is 1sep: the standard minimal separation between two close boxes.

Cells may be given a background color via TableCell background color.

The entire table may also be given a border and a table padding in TableSpecial table propertiesBorder. In this case, the padding occurs outside the border.

6.Advanced table features

In the menus, you also find some other more special features for tables. Very briefly, these include the following:

Currently, all tables come inside an environment like tabular, block, matrix, etc. When creating your own table macros, you may use TableSpecial table propertiesExtract format to extract the format from a given table.