Repository navigation
Rich table cells: [[LISTTABLE]] with lists, header rows, merged cells and diagrams - #219
Merged
Merged
Conversation
[[LISTTABLE]] (optionally with widths=a,b,c) followed by | ... | rows becomes a headerless pandoc grid table after includes, conditions and variables, so cells hold several paragraphs (<br>) and bullet lists (- ). Markers in code are left alone; a row with the wrong number of cells or a marker with no rows is a warning naming the file and line. Word table formatting now reads the header row from w:tblLook (or w:tblHeader). A headerless table keeps its style, centring and width, but gets a fixed layout on pandoc's column widths, no header formatting, and rows that may break across pages. Lint reads each cell paragraph as prose of its own and accepts a caption before the marker. Documented in the writing guides, requirements (FR-029) and README; the example guide has a commissioning table, and the example templates have Highlight Yellow and Highlight Grey character styles. Refs #218 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
[[LISTTABLE]] now takes `header` for a header row, numbered items (`1. `) beside bullets, items nested by two spaces, cells merged across (`<`) and down (`^`), and `[[BLOCK: name]]` cells filled from [[BLOCK: name]] ... [[ENDBLOCK]] elsewhere in the file: a diagram, a picture or code. A wrapped word that looks like a list marker is escaped. The tables are made while each file's directives are expanded, so warnings name the right file and line inside includes. listtable.lua moves the blocks into their cells (without figure captions) and marks the tables for Word, where a rich table keeps its widths in a fixed layout, lets its body rows split, formats only a real header row and fits its pictures to their cells. The Word merge adds numbering one list at a time, as docxcompose gave every list in one table the same numbering. Also: Word tables with paragraphs, lists or merged cells, or without a header row, import as [[LISTTABLE]]; py-doc check and lint report table and block mistakes; the build report counts rich tables per source; the VS Code extension highlights directives and variables; the tool image workflow checks the example's rich table with the image's pandoc. Docs, requirements (FR-029, FR-064) and the example guide are updated. Refs #218 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
Pandoc writes \multirow for a grid table cell that spans rows, which the example guide's [[LISTTABLE]] now has, and py-doc's LaTeX template (and the example templates made from it) did not load the package, so the PDF build stopped with "Undefined control sequence". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
Four sentences added for [[LISTTABLE]] were over Vale's 30 words, which `py-doc lint docs --strict` fails on in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #218.
What it does
[[LISTTABLE]]tables hold what a pipe table cannot: several paragraphs, bullet and numbered lists, merged cells and blocks such as diagrams in a cell.<br>starts a paragraph,-a bullet,1.a numbered item, and two spaces nest an item.<merges with the cell on the left,^with the cell above.headermakes row 1 the header row;widths=sets relative column widths.[[BLOCK: name]]puts a diagram, picture or code from elsewhere in the same file into a cell, without a caption.How
listtable.py, driven bydirectives.py): each table becomes a pandoc grid table, with row and column spans, while each file's directives are expanded. It runs after conditions and variables and before diagrams, so warnings name the right file and line inside includes. A wrapped word that looks like a list marker is escaped.listtable.lua(all formats and sites): moves block contents into their cells, without figure captions. In Word it adds a hidden bookmark so the finishing step knows a rich table.docx_post.py,docx_finish.py):docx_import.py): a Word table with paragraphs or lists in cells, merged cells or no header row imports as[[LISTTABLE]]with its widths. Other tables still import as pipe tables.rich_tablescount per source (schema updated).{{variables}}in Markdown.Testing
python -m pytest: 1961 passed, 29 skipped (pandoc 3.1.3 and Graphviz on the host).ruff check .,ruff format --check .,py-doc lint docs --strict, andcd examples && py-doc lint docs poster --strictare clean.cd editors/vscode && npm run lint && npm test: 18 passed.Still to check by hand in Word
Generated by Claude Code