table
Aliases:
A table. The body is pipe-delimited rows with inline Chalk in the cells, or nothing at all when data: binds a dataset instead. Header and footer rows and columns are switchable, and rows, columns or single cells can be highlighted.
#Attributes
A
dataset supplying the rows, in place of a body — table:#survey. The same rows can then feed a table, a mark and a code environment without being typed once per consumer.Can be written as shorthand: table:valueWhich columns of
data: to show, and in what order — plain column names, not references, so no #. Omit for every column in the dataset's own order.Also written: headerHas header row. With
data:, the dataset's column names are that row.Default
trueAlso written: highlight-cols, highlight-col, highlight-columnColumn indices to highlight.
Also written: highlight-cellCells to highlight, comma-separated. A single reference is a column letter and a row number (
B2); a range joins two with a hyphen (A1-C3) and covers the block between them.highlight-colour
Also written: highlight-colorHighlight colour.
Default
blueAlso written: captionA caption above the table. Inline Chalk, so
Yield at $T = 300K$ sets the maths.mode
inline for a static display in place, environment to expand it into the canvas.Default
inline#Allowed content
Body { }Pipe-delimited table rows with inline Chalk formatting in cells — or none at all, when
data: supplies the rows from a dataset#Allowed in
#Examples
table{
Name | Score
Alice | 92
Bob | 88
}(
header-row: true
)table{
x | y
0 | 0
1 | 1
}(
title: Sample Data
highlight-rows: 2
)#Notes
highlight-rowsandhighlight-columnsare 1-based and count every row and column drawn, the header among them — so withheader-rowon, the first row of data is row 2.- Every row needs the same number of delimiters as the header: rows are split on the delimiter and nothing is padded, so a row missing one renders short and its cells sit under the wrong headings. A cell with no value keeps its delimiters — write a placeholder in it rather than leaving the line to end early.