3.13 Skribilo User Manual — Table
Contents↑ Standard Markups

Tables are defined by the means of the table function.

(table [:rulecolor] [:cellspacing] [:cellpadding] [:cellstyle 'collapse] [:rules 'none] [:frame 'none] [:width] [:border] [:&location] [:class] [:ident] row...)
:ident The node identifier. html lout latex context info xml
:class The node class. html lout latex context info xml
:border The table border thickness. html lout context info
:width The width of the table. html lout latex context info
:frame Which parts of frame to render. Must be one of none, above, below, hsides, vsides, lhs, rhs, box, border. html lout latex context info
:rules Rulings between rows and cols, Must be one of none, rows, cols, header, all. html lout latex context info
:cellstyle The style of cells border. Must be either collapse, separate, or a length representing the horizontal and vertical space separating the cells. html latex
:cellpadding A number of pixels around each cell. html lout context info
:cellspacing An optional number of pixels used to separate each cell of the table. A negative uses the target default. html
:rulecolor The color of rules (see Section Frames and Colors). lout info
row... The rows of the table. Each row must be constructed by the trtr function.

Note: Table rendering may be only partially supported by graphical agents. For instance, the cellstyle attribute is only supported by HTML engines supporting CSS2.

3.13.1 Table Row

Table rows are defined by the tr function.

(tr [:bg] [:class] [:ident] cell...)
:ident The node identifier. html lout latex context info xml
:class The node class. html lout latex context info xml
:bg The background color of the row. html lout latex context
cell... The row cells.

3.13.2 Table Cell

Two functions define table cells: th for header cells and td for plain cells.

(th [:bg] [:rowspan 1] [:colspan 1] [:valign] [:align 'center] [:width] [:class] [:ident] node)
(td [:bg] [:rowspan 1] [:colspan 1] [:valign] [:align 'center] [:width] [:class] [:ident] node)
:ident The node identifier. html lout latex context info xml
:class The node class. html lout latex context info xml
:bg The background color of the cell. html lout
:width The width of the table. html lout latex context
:align The horizontal alignment of the table cell (left, right, or center. Some engines, such as the HTML engine, also supports a character for the alignment.) html lout latex context
:valign The vertical alignment of the cell. The value can be top, center, bottom. html lout latex context
:colspan The number of columns that the cell expands to. html lout latex context
:rowspan The number of columns that the cell spans over. html lout
node The value of the cell.

3.13.3 Example

Ex. 18: A table

... produces:

A table
Col 1Col 2Col 3
10-2030
1221
1234
12345
12345
(made with skribilo)