Build a publication table from a JSON spec with table_write - grouped headers, row and column spans, bands, best-value emphasis, and the LaTeX / Markdown / DOCX / CSV outputs plus a compiled PNG preview.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Paper Tables?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vecnode-paper-tables)
---
name: paper-tables
description: Build a publication table from a JSON spec with table_write - grouped headers, row and column spans, bands, best-value emphasis, and the LaTeX / Markdown / DOCX / CSV outputs plus a compiled PNG preview.
---
# Paper tables
A table in a paper is a **grid with a claim**: which columns belong together,
which blocks are being compared, which number won, and what the bold means. Those
are four facts, not four hundred cells. The spec says them once; the compiler
emits LaTeX, Markdown, DOCX and CSV from the same resolved grid, so the four
outputs cannot disagree about a number or about a winner.
```
table_write({ source: <JSON>, id: "vqa-results" })
```
Files land in `tables/<id>/` in the workspace: `spec.json`, `table.tex`,
`table.md`, `table.csv`, `table.docx`, and `table.png` when TeX is installed.
`table_read` lists them or returns one spec.
## The spec
```json
{
"table": {
"id": "vqa-results",
"caption": "Single-image performance. Bold marks the best value in each family.",
"label": "tab:single-image",
"style": "booktabs",
"size": 7,
"notes": ["A dash is a benchmark the model does not report."]
},
"columns": [
{ "key": "model", "title": "Model", "align": "left", "width": 1.7 },
{ "key": "mmmu", "title": "MMMU", "group": "General VQA Understanding", "align": "right", "best": "max", "digits": 1 },
{ "key": "ocr", "title": "OCRBench", "group": "OCR Recognition", "align": "right", "best": "max", "digits": 1 }
],
"groups": [
{ "title": "Modular Vision-Language Models (Instruct-2B)", "tone": "meta" }
],
"rows": [
{ "group": 0, "cells": { "model": "Qwen2-VL", "mmmu": 41.1, "ocr": 80.9 } },
{ "group": 0, "emphasis": "total", "cells": { "model": "NEO-ov", "mmmu": 54.7, "ocr": 81.2 } }
]
}
```
## The four facts
- **Column groups** — `column.group`. The header's `\multicolumn` widths and its
`\cmidrule` spans are DERIVED from these strings. Adding a column widens its
rule by itself; no number is typed twice.
- **Row groups** — `row.group` names an entry in `groups`. A group with a `title`
gets a section row; `"band": true` tints the group's data rows instead (or as
well), which is how a table of prose blocks stays readable.
- **Spans** — `row.span` merges across (`{"pretrain": 3}` starting at a column),
`row.rowSpan` merges down (`{"task": 4}` on the first row of a block). A span
whose covered cells also carry a value is REFUSED: a spanned cell is one cell.
- **Emphasis** — `best: "max"` (or `"min"`) marks the winner of each column
**within each row group**, because a 2B family and an 8B family are separate
races. `emphasis: "total"` bolds a whole summary row.
## What the rungs mean
| rung | proved |
|---|---|
| `t0-spec` | the JSON parsed and every column, row and span resolved |
| `t1-grid` | every row covers exactly the columns the header declares |
| `t2-data` | numbers formatted, best marks resolved, no quoted numbers |
| `t3-typeset` | `pdflatex` compiled it (real booktabs/multirow) |
| `t4-drawn` | a PNG exists, rendered from the compiled PDF |
A table that reaches `t2-data` is structurally sound but has never been SET. If
the host has no TeX engine the answer says so; do not describe such a table as
verified.
## Formats, and what each one cannot do
- **LaTeX** — the primary target. `booktabs`, `\multicolumn`, `\multirow[t]`,
`\cellcolor` bands, maths passed through `$...$`. This is what the paper takes.
- **Markdown** — flattened: a span keeps its text in the first cell, a row span
repeats, a group becomes a bold full-width row. Good for a README or a review.
- **DOCX** — a real Word table with `gridSpan`, `vMerge`, shading and horizontal
rules. Word has no LaTeX maths without OMML, so a maths cell is written as plain
text and the result SAYS the DOCX degraded.
- **CSV** — the data, with spanned values repeated so it is self-contained.
## Rules that keep a table printable
- **One claim per table.** If the caption needs "and", it is two tables.
- **Bold means one thing**, and the note says what. A table of bold numbers with
no note is a puzzle.
- **A missing number is `null`**, which prints as a dash — never `0`, never `""`.
An empty string is indistinguishable from a bug.
- **Do not fight the width.** A 12-column table at 7 pt fills a two-column page;
at 3.5 in it does not. The compile reports a multi-page table as a warning, and
the fix is fewer columns, not smaller type.
- **Numbers as numbers.** `"41.1"` is a string: it is not formatted and it cannot
win a best-value mark. The build warns when it sees one.
## The corpus
`reference/tables/` holds three published tables rebuilt from their structure,
each with a target, an `anatomy.md`, the spec, the built artifacts and an
executable rubric. Read the anatomy of the one that looks like your table before
writing a spec:
| table | what it teaches |
|---|---|
| `vqa-results` | two header levels, four family bands, best-per-family bolding |
| `dataset-summary` | row spans over prose blocks, alternating bands |
| `implementation-details` | column spans in the body, maths in cells |
```sh
node packages/dsh-tables/checks/check-tables-node.mjs
```