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.
In order to create a table, you may either use
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
|
||||||
|
||||||
There are several other table-like environments and new ones may be
created by the user. For instance, using
When starting a new table, its size is minimal (usually ) and its cells are empty. New rows and columns are inserted using the Meta+, Meta+, Meta+ and Meta+ shorthands. For instance, Meta+ 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 Return.
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
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.
The most frequent formatting operation is the horizontal or vertical alignment of a block of cells. You may use the Meta+Ctrl+, Meta+Ctrl+, Meta+Ctrl+ and Meta+Ctrl+ keystrokes to quickly align more to the left, right, top or bottom.
A specific alignment can also be selected in the
Similarly, you may specify how the table itself should be aligned with
respect to the surrounding text. This is either done via the
Using
The actual width of the cell will be the minimum of the specified width and the width of the box inside the cell.
The width of the cell will be precisely the specified one.
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
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
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
The entire table may also be given a border and a table padding in
In the menus, you also find some other more special features for tables. Very briefly, these include the following:
Change the “span” of a cell and let it run over its neighbouring cells on its right and below.
Creation of entire subtables inside cells.
Correction of the depth and height of text, in order to let the baselines match.
Horizontal hyphenation of cell contents and vertical hyphenation of the entire table.
Gluing several rows and/or columns together, so that the glued cells become “part of the borders” of the remaining cells.
Deactivation of the table, in order to see its “source code”.
Setting the “extension center” of a table. From now on, the formatting properties of this cell will be used for new cells created around this center.
Specification of the minimal and maximum size of a table, which will be respected during further editing. (this is mainly useful when creating table macros).
Currently, all tables come inside an environment like