Simple table
Simple tables provide a compact and easy-to-understand, but limited row-oriented table display for simple data sets.
For a more complete table description, see Grid tables.
Properties
- Cell contents are typically individual paragraphs, although any text body elements can be displayed in most cells.
- Simple tables allow multi-line rows (in all but the first column) and the linking of columns, but not of rows.
- Simple tables are described with horizontal borders consisting of the characters "=" and "-". The equal sign ("=") is used for upper and lower table borders to separate optional headers from the table body. The hyphen ("-") is used to indicate column spacing in a single row by underlining the linked columns and can optionally be used for explicit and/or visual separation of rows.
- As with other text body elements, blank lines are required before and after tables. To separate two consecutive tables, a paragraph with text or a paragraph with a vertical bar must be inserted. The latter is removed from the output.
- Left table borders should be aligned with the left edge of preceding text blocks. If tables are indented, they are considered as part of a block quote. The minimum indentation is one space.
Samples
(In sample project: B_DocuElements\Tables\FB_Libdoc_SimpleTables)
A simple table starts with an upper border of equal signs and one or more spaces at each column boundary (two or more spaces are recommended). Regardless of the table width, the upper edge must cover all table columns completely.
There must be at least two columns in the table (to distinguish them from section headings). The upper border can be followed by headers. The last of the optional headers is underlined with "=", again with spaces at the column edges. There must not be a blank line below the separator for the header line. The lower boundary of the table consists of "=", including spaces at column boundaries.
For example, here is a truth table, a three-column table with a header row and four body rows:
|
Lines of hyphens "-" can be used to link adjacent columns. The lines must cover all columns and be oriented according to the defined column borders. Text lines with hyphens must not contain any other text. A hyphen applies to the row immediately above. For example, here is a table with connected columns in the header:
|
Each line of text must contain spaces at the column boundaries, unless the cells have been merged across the columns.
Each line of text starts a new table row, except if there is an empty cell in the first column. In this case, the text line is interpreted as a continuation line:
|
To start a new row in a simple table without text in the first column, use
- an empty comment (".."), which is not displayed in the output, or
- a backslash ("\") followed by a space
Blank lines are allowed within simple tables. Their interpretation depends on the context. Blank lines between table rows are ignored. Blank lines within multi-line rows can separate paragraphs or other body elements within cells.
The right column is unlimited; the text can go beyond the table border (as indicated by the table borders). However, it is recommended that the frames are long enough to contain the entire text.
The following sample illustrates:
- Continuation lines (table line 2 consists of two text lines, table line 3 of three text lines and table line 4 of four text lines)
- Blank lines for separating paragraphs (line 3, column 2)
- Text that goes beyond the right margin of the table
- New rows that do not contain any text in the first column (row 4)
(*
===== =====
Col 1 Col 2
===== =====
1 Second column of row 1.
2 Second column of row 2.
Second line of paragraph.
3 Second column of row 2.
Second line of paragraph
4 - Second column of row 3.
- Second item in bullet
list (row 4, column 2).
\ Row 5; column 1 will be empty.
===== =====
*)