Wiki Formatting: Tables
Opening and closing tables
Tables are automatically created when a table sequence is found in the input. In this case the table is formatted using some built-in defaults. The "|+" sequence can be used to start a new table explicitly, e.g. for a nested table. |+ may have some options:
where
- X
-
a literal "X" turns tables borders on.
- num[%]w
-
sets the table widht either as absolute value or percentage.
- class
-
uses class as style class for the table.
- id
-
sets an object id.
- name
-
sets the table's name, e.g. used for table queries.
- title
- sets a title for the table. The title is printed below the table and all named tables in a document are numbered.
All of this parameters are optional and separated by commas, their particular order is not significant. Notice that the title is given behind the |+ sequence. Tables must be closed with a |. (pipe-bar followed by a dot).
Table rows and cells
New table rows start usually with a "|:". This opens a new table row and the first (leftmost) cell in that row. Following text goes into this cell until the next cell is opened (||), the next row is started (|: or |=) or the table is closed (|.).
| Markup | Function |
| |= | starts a new table row. |
| |: | starts a new table row and cell. Formatting options apply to the cell. |
| || | begins a new table cell. |
Optional formatting characters are allowed between the leading pipe-bar "|" and the ending control character. These are
(shown as regular expression):
| Option | Function |
| [L|R|C] | sets left, right or centered text adjustment. |
| [T|M|B] | sets top, middle or bottom vertical text adjustment. |
| [0-9]+%?[wh] | sets width or height in either pixels or percent. |
| [0-9A-F][0-9A-F]+c | hexadecimal digit (at least two) followed by a lowercase "c" sets the background color. |
| %c-=[a-z0-9]+ | sets a style sheet class for the row or cell. |
Additionally you may add pipe-bars to increase the colspan count or colons for the rowspan. Comma characters can be used to separate conflicting control sequences from each other.
Color Scheme
Table rows are automatically green/white colored. Applying a row background color resets the color counter to restart with green background color.The colors may set set using the "|-" sequence:
sets the given colorlist as the row background colors. The color values are expected to be hexadecimal values.
The interpretation of the value "000001" is special. This sets no-color (instead of "almost black").
Cell Classes
A sequence of style classes can be assigned to the cells of each table row using the "|$" sequence as in
This formats the first cell in each row with the style class class1, the second with class2 and so on. If there a more cells in a row than class listed the last class will be used for all following cells.