Tables

TopLeaf recognises a subset of the CALS and HTML table models. The table model defines the structural markup of all tables declared within the content of a document. Table styling rules controlling the appearance of the rendered tables are defined from the Table tab of a stylesheet mapping, or through the <table-properties/> command.

The table model is selected from the Format » Options... dialog.

Custom tables

Content that is not explicitly marked up as a table can be arranged into rows and columns using a custom table, a structure that maps individual elements to tabular markup that conforms to the underlying table model.

Cell borders

A table may specify that lines are drawn by using the frame property as well as row and column separators. The <cell-properties/> command can also be used to control borders on each of the four sides of the cell.

It is important to note that a cell border from any of these sources is drawn inside the cell boundary. This means that you should specify a value for the cell indents that is sufficient to contain the border.

For example, consider the following representation of a table cell:

The red line represents the boundary of the cell (this would not be visible when the table is rendered). The black line is the 4pt border drawn within the 12pt inset, leaving an 8pt gap between the border and the content.

When borders are present from multiple sources (such as from a row separator and a cell border) they are all drawn at the cell boundary. This has the same effect as if only the border with the greatest thickness were present.

Split table rows

By default, the content within each table row is implicitly bound. This means that a table that is allowed to continue across a column or page boundary will only be broken between the rows of that table. When split table row mode is enabled, a table break may also occur within any table body row.

A table row may only split where a data column break can be inserted at the same vertical offset across all cells within the row. In the following example, a table row containing five cells declares a vertical span in the second table column. The first vertical offset at which a table row split point may occur is below the word Subscriber:

In some cases, it may not be possible to insert a data column break within a table row — for example, when the lines in adjacent cells are irregularly spaced, or if the binding rules within each table cell prohibit a table break. A single column table row that consists entirely of a graphic will never be permitted to break.

Table row splitting is enabled using the <table-properties split-rows="yes" /> command.

The table row split-rowkeepheight property specifies the depth of an implicitly bound region at the top of each table row in which a row split is not permitted. This implicit binding takes precedence over any other binding rules in force within the row.