TopLeaf recognises a subset of the CALS and HTML table models. A table model defines the structural markup of all tables in the document. Table markup and table styling rules control the appearance of the rendered tables within the document and specific contexts.

The table model is assigned 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. You can use the <cell-properties/> command for additional control of each of the four table cell borders.

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, a table that is allowed to continue across a column or page boundary can only be broken between the body rows of the table. When split table row mode is enabled, a table break is also permitted within any table body row.

The content of a table body row is splittable if a data column break can be inserted at the same vertical offset across all cells within that 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:

It may not always be possible to locate a suitable split point within a table row. For example, a table row cannot split if the lines in adjacent cells are irregularly spaced, if the binding rules within each table cell prohibit a table break, or if the table row consists entirely of a single graphic.

The table row split-rowkeepheight property specifies the depth of a 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. Table row splitting is enabled using the <table-properties split-rows="yes" /> stylesheet command.