Repository navigation
Typst tables framed by rules, with row-header columns, widths, topic labels, and raw cells - #9
Merged
Conversation
…topic labels, and raw cells
The "typst" backend now draws a rule under the column header (inside
table.header, so it repeats with the header on every page) and one at the
end of the table, framing the data. Four optional table attributes adjust
a table further, each beside the existing tabtibble_align:
- tabtibble_header_cols: the number of leading columns that label their
rows; a table.vline() separates them from the rest.
- tabtibble_widths: Typst column widths ("auto", a length, or a fraction),
named by column or in column order.
- tabtibble_topic_labels: TRUE shows each topic header as
"<column name>: <value>", so a subject row reads "Subject: S001".
- tabtibble_typst_raw: columns whose cells are Typst markup (such as
$r^2$), written without escaping.
Each is validated with an error naming the attribute. A Quarto render test
compiles a table that uses all of them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and compile the backend in CI
Review fixes to the Typst table attributes:
- tabtibble_topic_labels must be a single TRUE or FALSE; anything else is
an error naming the attribute (it was read with isTRUE()).
- tabtibble_widths is named for every column or for none: a partly named
vector, a name that is not a data column, and a column named twice are
each an error naming the attribute and the name. A length or fraction
may start with a decimal point (".5in").
- Column names are escaped in the column header, as they are in topic
headers.
- tabtibble_header_cols on a table whose every column is a topic column
says so.
- The other backends ignore the four attributes; under them, and the
markdown fallback outside Quarto, a raw column is escaped (documented).
The R-CMD-check workflow installs Quarto, so the render tests compile the
Typst in CI rather than skip. The render tests now check the typeset math
and that a long table's header repeats on every page. The vignette
documents each attribute with an example.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
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.
The "typst" backend now frames each table's data with a rule under the column header and one at the end of the table. The header rule sits inside table.header, so it repeats with the header on every page. Four optional table attributes, beside the existing tabtibble_align, adjust a table further:
Each attribute is validated with an error naming it, and column header names are now escaped like cell text. Unit tests pin the exact Typst for each, a Quarto render test compiles a table that uses all of them (asserting the typeset math and the repeating header on a multi-page table), and the workflow installs Quarto so that test runs in CI. nca.reporter uses these for its report tables (Bill's report review items 4, 12, 13 and 14).
🤖 Generated with Claude Code