Repository navigation
Rich tables: header shading, long links, nested tables, cell colours - #220
Merged
Merged
Conversation
- Word header rows: py-doc made header text white but relied on the
table style for the dark fill, which its own Table Grid lacks, so
headers were white on white. The fill (the style's header colour, or
navy) is now set on the header cells.
- Only the Markdown's tables are formatted: they are marked before the
merge, so a template's own tables keep their look. The example
templates lose pandoc's sample table from their title page.
- A picture in any table cell, nested tables included, is made no
wider than its column.
- [[LISTTABLE]]: a link or picture too long for its column becomes a
reference defined after the table; a block may come from an included
file or the including one; a block may hold a table, which is
formatted like any other (a tabular in PDF, as LaTeX cannot nest
longtables); a cell may start with {bg=RRGGBB valign=middle}.
- Tests for these and for rich tables on MkDocs and Starlight sites.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHtcxeRPPmXcydfxoEHGJ4
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.
Follow-up to #219 (rich table cells, issue #218).
Fixes
Table Gridstyle has none, so with the default or the example templates, header text was unreadable in Word, LibreOffice and Google Docs.tblStylePr firstRow), or navy, set on the cells themselves.sensor.docx,sensor_Draft.docxanddatasheet.docxhad pandoc's sample "Table / 1 / 2" table. It's removed, andmake_templates.pynow strips it.New
[[LISTTABLE]].[[LISTTABLE]], a link or picture too long for its column becomes a reference defined after the table, so the grid stays readable.[[BLOCK:]]may be defined in a file the table's file includes, or in the file that includes it. Lint follows includes to check the names.[[LISTTABLE]], and it's formatted like any other.tabular, because LaTeX can't nest longtables.{bg=E8F5E9 valign=middle}.\cellcolor(colortbladded to the LaTeX templates); vertical alignment isn't used there.vAlign, through a hidden bookmark thatlisttable.luawrites.Docs
Testing
python -m pytest: 1994 passed, 14 skipped (pandoc 3.1.3, Graphviz and XeLaTeX on the host).ruff check .andruff format --check .are clean.py-doc lint docs --strictand the examples lint with Vale 3.24.0: 0 warnings.Still to check by hand in Word
1F3864) as the default header colour when the template's table style has none.Generated by Claude Code