table
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.
tableAliases:tbl#Attributes
dataA
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:valuecolumnsWhich 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.header-rowHas header row. With
data:, the dataset's column names are that row.Also written:
headerDefault
trueheader-columnHas header column.
Also written:
header-colDefault
falsefooter-rowHas footer row.
Default
falsefooter-columnHas footer column.
Also written:
footer-colDefault
falsehighlight-rowsRow indices to highlight.
Also written:
highlight-rowhighlight-columnsColumn indices to highlight.
Also written:
highlight-cols, highlight-col, highlight-columnhighlight-cellsCells 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.Also written:
highlight-cellhighlight-colourHighlight colour.
bluelight-bluedark-blueredlight-reddark-redorangelight-orangedark-orangeyellowlight-yellowdark-yellowteallight-tealdark-tealgreenlight-greendark-greenpinklight-pinkdark-pinkpurplelight-purpledark-purplegreylight-greydark-greyneutralhex(…)rgb(…)highlight-colorDefault
bluedelimiterColumn delimiter character.
Also written:
delimDefault
|titleA caption above the table. Inline Chalk, so
Yield at $T = 300K$ sets the maths.Also written:
captionmodeHow the table presents:
inline for a static display in place, environment to expand it into the canvas.inlineenvironmentDefault
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.