bundles / papyri latest / docs
Doc
Tables and math
docs/specimens:tables-and-math
Structured tables and typeset mathematics.
List tables
The list-table directive builds a table from a nested bullet list — one outer item per row, one inner item per cell. :header-rows: marks how many leading rows are headers:
papyri commands
Command | Run by | Produces |
|---|---|---|
| the library maintainer | a DocBundle directory |
| the maintainer | a |
| the maintainer | an ingested bundle in the viewer |
:widths: is accepted for Sphinx compatibility but has no effect — the structured Table IR carries no presentation hints, so columns always auto-size. It is shown here only to confirm it parses without error:
Field | Meaning |
|---|---|
| The importable root package name (the only required key). |
| Directory scanned recursively for narrative |
CSV tables
The csv-table directive is more compact for dense data, taking the cell values as comma-separated rows. :header: supplies the header row inline:
IR encodings by stage
Stage | "On disk" | "Encoding" |
|---|---|---|
papyri gen | "bundle directory" | "JSON (human-readable)" |
papyri pack | ".papyri artifact" | "gzip + CBOR" |
ingest | "graphstore + blobs" | "derived cache" |
Display math
The math directive typesets a display equation, centred on its own line:
Multi-line aligned math works too:
Inline math
For short expressions inside prose, the :math: role keeps the equation on the baseline: the Gaussian integral reads inline, as does a simple fraction .
Not supported
Grid tables and simple tables (the ASCII-art
+---+and===forms) are not parsed into a table yet — they fall back to a verbatim code block. Uselist-tableorcsv-tablefor real tables.Presentation options on
list-table/csv-table—:widths:,:align:,:stub-columns:,:class:,:name:— are parsed but dropped. TheTableIR is structure-only; only:header-rows:(and the csv:header:) affect the result.