Skip to main content

Standard Markdown tables

| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |
The separator row (|---|---|) marks the first row as a header. Without a separator, all rows are treated as data rows.

Tables with inline formatting

Table cells support all inline formatting:
| Name | Description | Status |
|------|-------------|--------|
| **Project A** | Main project | *Active* |
| **Project B** | Secondary | ~~Cancelled~~ |
| **Project C** | See @[smith2023] | `pending` |

Images in table cells

Embed images directly in table cells:
| Name | Logo |
|------|------|
| Company A | ![alt](logo-a.png){width=100 height=50} |
| Company B | ![alt](logo-b.png){width=100 height=50} |
Image attributes width and height are supported inside table cells.

Table directive

For full styling control, wrap your table in a :::table{attrs} directive:
:::table{caption="Sales Data" headerBg="#f0f0f0" rowAltBg="#fafafa"}
| Product | Q1 | Q2 |
|---------|----|----|
| Widget  | 100| 150|
| Gadget  | 200| 250|
:::

Invisible tables (layout tables)

Remove all borders and backgrounds to use tables for layout purposes:
:::table{invisible=true cellPadding=12}
| Logo | Company |
|------|---------|
| ![logo](a.png){width=50} | Company A |
:::

Hidden headers

Hide the header row while keeping it for structure:
:::table{hideHeaders=true}
| Col 1 | Col 2 |
|-------|-------|
| Data  | Data  |
:::

Table captions

Add a caption for automatic numbering in the List of Tables:
:::table{caption="Revenue by Quarter"}
| Quarter | Revenue |
|---------|---------|
| Q1 | €150,000 |
| Q2 | €180,000 |
:::
This renders as: Table 1: Revenue by Quarter The caption prefix (e.g., "Table", "Tabelle") and styling (font, alignment, color) are configured in your document’s style settings.

Attribute reference

General attributes

AttributeValuesDescription
captionStringTable caption text (enables auto-numbering)
invisibletrue, falseHide all borders and backgrounds
hideHeaderstrue, falseHide the header row
cellPaddingNumber (pt)Uniform cell padding

Header styles

AttributeValuesDescription
headerBgCSS colorHeader background color
headerColorCSS colorHeader text color
headerFontSizeNumber (pt)Header font size
headerFontWeightnormal, boldHeader font weight
headerAlignleft, center, rightHeader text alignment

Row styles

AttributeValuesDescription
rowBgCSS colorRow background color
rowAltBgCSS colorAlternating row background
rowColorCSS colorRow text color
rowFontSizeNumber (pt)Row font size
rowAlignleft, center, rightRow text alignment

Border styles

AttributeValuesDescription
borderWidthNumber (pt)Border width
borderColorCSS colorBorder color
borderStylesolid, dashed, dottedBorder style

Full example

:::table{caption="Team Overview" headerBg="#1e293b" headerColor="#ffffff" headerAlign=center rowAltBg="#f8fafc" borderWidth=1 borderColor="#e2e8f0" cellPadding=8}
| Name | Role | Status |
|------|------|--------|
| Alice | Engineering Lead | Active |
| Bob | Designer | Active |
| Carol | Product Manager | On Leave |
:::