Tables¶
Alignment¶
Colons in the separator row set the alignment of a column. Cells can hold inline formatting, code and links.
Markdown

Column widths¶
Columns are sized by their content, as in Obsidian, also for tables with long source lines. A table with set widths (an HTML <colgroup>) keeps their ratio. A very narrow column, such as an image column, is widened to half of an equal share, at most 20%.
Header rows repeat when a table breaks across pages. Rows do not split.
Wide tables¶
A table that needs more width than a portrait page has goes to its own landscape page. The text after it continues on a new portrait page.
Markdown
A table that does not fit the page width moves to its own landscape page.
| ID | Requirement | Rationale | Owner | Status | Verification | Notes |
| -- | ----------- | --------- | ----- | ------ | ------------ | ----- |
| R-1 | The export runs without network access | Builds run in closed networks | Build team | Done | Automated test on an offline runner | None |
| R-2 | Every page shows the document version | Readers can tell revisions apart | Docs team | Open | Review of the footer on each page | Needs template change |
The text continues on the next portrait page.

A table goes to landscape when it has at least 6 columns and its content does not fit. The width is estimated from the text: each column counts with its longest cell (up to 25 characters, longer text wraps) or its longest word, which cannot wrap. An image counts as a full cell. A table of short values, such as keys and numbers, stays in the text.
After the layout, every table is measured. A word does not wrap, so a table with long words can be wider than the page whatever its column count. Such a table goes to a landscape page too, and the document is laid out again. If it is still too wide there, or the template has no landscape page, every word in its cells may break. A document whose tables all fit is laid out once. tables.landscape=off turns this off as well. Redlines keep their tables portrait.
With tables.premeasure=on, the tables that may be too wide are laid out on their own first, each on a portrait page with the CSS of the document: tables with 5 or more columns, with code, images or math in a cell, or with long words. The ones that are too wide go to landscape before the document is laid out, so a large document with a few wide tables is often laid out only once. The measurement after the layout stays and catches the tables the check can not see, for example in a list or a callout, where less width is left.
| Option | Effect | Default |
|---|---|---|
-O tables.landscape=auto\|on\|off |
auto uses the estimate. on turns every table with enough columns. off keeps all tables portrait. |
auto |
-O tables.landscape_min_cols=N |
Fewest columns for landscape. | 6 |
-O tables.premeasure=on\|off |
on lays out the tables that look wide on their own before the document, see below. |
off |
A template styles the landscape page with @page landscape-page, see Header and footer.
Large tables¶
Pandoc writes a style attribute on every cell of a column with an alignment. WeasyPrint 70.0 computes the style of each such cell on its own, which makes the layout of large tables slow. The export applies a small patch to WeasyPrint for this: cells with the same style attribute share one computed style. The PDF is the same, only faster. The patch is applied only to WeasyPrint versions known to lack the fix, and only when the WeasyPrint function it wraps looks as expected. The same option also covers a second patch, which builds the image streams of the PDF in a few threads.
| Option | Effect | Default |
|---|---|---|
-O weasyprint.patches=on\|off |
off renders with WeasyPrint as installed, without the patches. |
on |