Skip to contents

S7 class definitions backing tabular's display-side IR. Users do not construct these directly except for col_spec(); every other class is built and chained by the verb pipeline (tabular() -> cols() -> headers() -> sort_rows() -> style() -> paginate() -> preset() -> as_grid() / emit()).

Details

The class set is intentionally small (~11 concepts) so the IR fits in one mental model:

classroleconstructor
tabular_specroot container; carries data + every other spec slottabular()
col_specper-column DSL (usage, label, format, align, ...)col_spec()
header_nodeone node in the multi-level header treeinternal — built by headers()
sort_specsort keys + per-key directioninternal — built by sort_rows()
style_nodeone resolved style attribute set (per-cell)internal — built by style()
style_layerone tabular_location + style_nodeinternal — built by style()
style_specthe cascade root (defaults + cols + headers + layers)internal — built by style()
pagination_specpage-split policy (keep_together, panels, floors)internal — built by paginate()
preset_specrender geometry (paper, orientation, font, margins)internal — built by preset()
inline_astparsed inline-formatting AST (runs of bold / sup / …)internal — built by parse_inline()
tabular_gridresolved per-page cells + ASTs + styles + headersas_grid()

Every spec slot is typed: a verb that would mutate a slot to an invalid value fails at construction time (the S7 validator runs as a last-line defense behind the cli-friendly verb-level validators).

Class predicates. Each class has a matching is_<name>() predicate; see tabular_predicates for the full list.

See also

Class predicates: tabular_predicates.

Pipeline entry verbs: tabular(), as_grid(), emit().