30.13.1 What is a Text-based Table?
Look at the following examples of valid tables as a reference while
you read this section:
+--+----+---+ +-+ +--+-----+
| | | | | | | | |
+--+----+---+ +-+ | +--+--+
| | | | | | | |
+--+----+---+ +--+--+ |
| | |
+-----+--+
A table consists of a rectangular frame and the contents inside the
frame. A table's cells must be at least one character wide and one
character high with two adjacent cells sharing a boarder line. A cell
can be subdivided into multiple rectangular cells but cannot nest or
overlap.
Both the table frame and cell border lines must consist of one of
three special characters. The variables that hold these characters
are described below:
table-cell-vertical-char
- Holds the character used for vertical lines. The default value is
‘|’.
table-cell-horizontal-char
- Holds the character used for horizontal lines. The default value is
‘-’.
table-cell-intersection-char
- Holds the character used at where horizontal line and vertical line
meet. The default value is ‘+’.
Based on this definition, the following five tables are examples of invalid
tables:
+-----+ +-----+ +--+ +-++--+ ++
| | | | | | | || | ++
| +-+ | | | | | | || |
| | | | +--+ | +--+--+ +-++--+
| +-+ | | | | | | | +-++--+
| | | | | | | | | || |
+-----+ +--+--+ +--+--+ +-++--+
a b c d e
From left to right:
- Nested cells are not allowed.
- Overlapped cells or non-rectangular cells are not allowed.
- The border must be rectangular.
- Cells must have a minimum width/height of one character.
- Same as d.