Tables are a rectangular grid of table cells, arranged in table rows and table columns. Each table cell contains XML/SGML content that is formatted to fit in the appropriate location of the table.
The table editor is based on the notion of a current table cell. The current cell is the table cell that contains the insertion cursor; it corresponds to an XML/SGML element in the document text (a TD element in the HTML table models, an ENTRY element in CALS tables). The content of this element is shown within the corresponding table cell in the table editor.
To modify the content of a table cell, you can simply edit the content of the table cell within the table editor in the same way as you would edit the element content in the document. This means you can type text, insert entity references, or insert, delete, or rename elements in the content of the current table cell.
All changes that you make to the content of a table cell will be reflected in the document pane below the table editor. For example, if you insert a new element into a table cell, the element would appear in the table editor and the document will show the new element at the location where it occurs in the document. If you type into a table cell, the new text will appear within the table in the table editor and in the document text below.
The table layout can be modified by operations that apply to a single cell and one of its neighbors, or by operations that affect a complete row or column in the table. These operations use the current cell to determine which cells, rows, or columns should be affected by the operation.
New rows can be inserted into a table by selecting ->-> or ->-> from the main menu. Both operations will create a new row in the table (either above or below the row containing the current cell) and populate the new table row with as many empty table cells as there are columns in the table. You can then modify the new table cells by placing the insertion cursor into one of the cells (making this cell the current cell) and editing the cell content.
Columns can be inserted into a table by using the ->-> and ->-> commands.
Both operations insert a new, empty table cell into each table row at the appropriate location. The new cells are inserted to the left or the right of the column containing the current cell. You can then edit the new table cells like any other cell in the table.
Rows and columns can be deleted from a table by using the ->-> and ->-> commands. These commands delete the row or column containing the current table cell.
Rows and columns that involve cell spanning can only be deleted if the table will not become invalid by this operation.
The information in a table cell sometimes needs to be displayed over two or more columns and/or rows. This is called spanning.
The table editor supports spanning of table cells in the vertical and horizontal direction. Spanning cells are created by merging a table cell with one of its direct neighbors (i.e. with the table cell to the left, to the right, above, or below the cell). Cells that span over three or more columns or rows are created by merging a table cell that is already spanning two or more columns with one of its neighboring cells.
The example table above shows how spanning cells appear in a table layout with four rows and four columns.
To merge a cell with one of its neighbors, follow these steps:
Select the cell you want to merge by placing the insertion cursor inside the cell.
Select on of the merge commands from the main menu, e.g. ->-> to merge the cell with its left neighbor.
If cells are to be merged vertically (i.e. with the cell above or below the current cell), both cells must have the same horizontal spanning (i.e. the must span over the same columns). If cells are to be merged horizontally (i.e. with their left or right neighbors), the cells must have the same vertical spanning (i.e. they must span over the same rows).
In the example above, it would be possible to merge the cells in the bottom row (6, 7, 8, 9) horizontally or to merge cells 3 and 6 vertically. All other table cells have neighbors with a different horizontal or vertical spanning and cannot be merged.
Cells that span over two or more columns or rows can be split into the corresponding number of individual cells by using the ->-> and ->-> commands. These commands remove the spanning information from the current cell and create the appropriate number of new table cells for the space that was formerly occupied by the spanning.
The content of a cell that has been split remains in the original cell that was spanning a table range .