CALS Tables
The CalsTable component adds support for the CALS table model used by DocBook and DITA: merged cells, per-column widths and alignment, and fine-grained border control. A graphical grid editor in the CMS handles the structure—merging and splitting cells, inserting and deleting rows and columns, aligning cells and columns—so you never need to hand-edit the underlying table data.
- Select CALS Table from the Embed list.
- Use the Frame, Title and Page-wide controls at the top to set the table's outer border, caption and width.
- Click a cell to select it. Shift-click or drag to select a rectangular range of cells.
- Click Merge to combine the selected cells, or Split to undo a merge. Merge is only enabled when the selection is a clean rectangle that doesn't cut through an existing merged cell.
- Use Insert Row Above/Below, Delete Row, Insert Column Left/Right and Delete Column to change the grid's shape.
- Use Cell align, Cell vertical and Column align to set how the selected cells and their columns are aligned.
- Double-click a cell to edit its content. Cell content is Markdown, so
**bold**,*italic*, links and inline code all work. Press Enter to start a new line inside a cell. - Save your changes.
Each table supports one header, body and footer section with a single set of columns. DocBook's multiple-tgroup-per-table and nested-table (entrytbl) features aren't supported.
Aligning cells
CALS takes a cell's alignment from the first of three places that sets one: the cell, then any span it belongs to, then its column. The editor writes two of those three, the cell and the column:
- Cell align sets the horizontal alignment of the selected cells.
- Cell vertical sets the vertical alignment of the selected cells.
- Column align sets the horizontal alignment of every cell in the selected columns.
Choosing Inherit clears a setting rather than storing one, so a cell falls through to its column, and a column to the site default.
To set that default, select Settings from the collection list, open CALS tables, and choose a Cell alignment. It applies to every CALS table on the site, headings included, and only to cells that set no alignment of their own—alignment set on a cell or a column always wins over it. Browser default leaves headings centred and body cells left-aligned.
Using variables in a table
Cells, headings and the table title can all contain variables, which resolve to the language of the page they appear on.
- Select a cell, then choose from the Cell variable list to add a variable to it.
- To put a variable in the caption, choose from the list beside the Title field.
Both lists add the variable to the end of the text, so edit the cell or the title afterwards if you need it somewhere else. The title accepts Markdown as well, so **bold** and links work there too.
A variable whose key no longer exists says so in place, the way it does in a paragraph:
set_key NOT FOUND
The build still succeeds, so one mistyped key does not stop you previewing the site.
Example:
Channel | Cadence | Support |
|---|---|---|
Stable | Monthly | Full |
Beta | Weekly | |
Nightly | None | |
For more on the underlying model, see the CALS table model reference or the DocBook table documentation.
Related topics
- Footnotes – Automatically numbered and back-linked footnotes.
- Tabs – Using tabs in docStatic.
- Related Topics – Automatically generate links to related content based on shared taxonomy tags.
- Create a doc – Create a Markdown document.
- Creating pages – Creating pages in the CMS.
- Hosted CMS – Using docStatic with cloud-hosted or self-hosted TinaCMS.
- Citations – Cite sources from a central CSL bibliography.