Skip to content

compiler: accept \tabcolsep, \arrayrulewidth, \doublerulesep, \extrarowheight assignments (#56) - #526

Merged
GoKubar merged 1 commit into
mainfrom
agent/daniel-parent/tabular-lengths-compiler
Sep 15, 2026
Merged

GoKubar merged 1 commit into
mainfrom
agent/daniel-parent/tabular-lengths-compiler

Conversation

@d-q222

@d-q222 d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What

The compiler half of #56's table-length work. It pairs with render-pipeline PR #525.

  • \setlength and \addtolength of \tabcolsep, \arrayrulewidth, \doublerulesep and \extrarowheight no longer warn "is recognised but not implemented here", in the preamble or the body (TABLE_LENGTHS in parser.rs). The render pipeline's table layout reads these assignments from the source, with their group scope.
  • The TeX form \tabcolsep=1pt (or \tabcolsep 1pt) is now parsed as a length assignment through length_assignment. Before, it was an unknown_command error and the value was typeset as text.

Why

In a pdflatex oracle probe, {\tabcolsep=1pt \begin{tabular}{|l|r|}...} rendered =1pt as text and moved the table by 25.5 bp (rules by 39.8 bp). The warning for the \setlength forms is also untrue once #525 lands.

Overlap check

Test results

cargo test --release (crates/compiler): 57 test binaries, all "test result: ok", 0 failed
tests/preamble_lengths.rs: test result: ok. 14 passed; 0 failed   (new: table_lengths_are_accepted_in_every_assignment_form)
lib: test result: ok. 339 passed; 0 failed
the new test fails on main: 5 "not implemented here" warnings + unknown_command \tabcolsep error

No vocabulary or inventory entry changed, so render_supported_latex.sh has nothing to regenerate. clippy -D warnings and cargo fmt --check already fail on main for unrelated lines, and nothing new on the lines changed here.

Not done

  • The render-pipeline vendor/compiler re-pin (integration lane). After it, add the \tabcolsep=1pt fixture to the tabular corpus.

🤖 Generated with Claude Code

https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

…owheight assignments (#56)

What changed:
- \setlength/\addtolength of the four table lengths no longer warn "is
  recognised but not implemented here" (the render pipeline's table layout
  reads them, with group scope), in the preamble or the body.
- The TeX form \tabcolsep=1pt is a length assignment, not an unknown command
  whose value is typeset as text.

What was run:
- cargo test --release (compiler): 57 test binaries ok, 0 failed
- preamble_lengths: test result: ok. 14 passed; 0 failed
- the new test fails on main (5 warnings + unknown_command error)

Next step: re-pin vendor/compiler in render-pipeline (integration lane);
then add the \tabcolsep=1pt corpus fixture.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@d-q222

d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

daniel-parent independent review (subagent)

Verdict: APPROVE

Checked out the head (15572f48) in a detached worktree, built and ran the full compiler suite from clean.

  1. \tabcolsep/\arrayrulewidth/\doublerulesep/\extrarowheight now dispatch to length_assignment in both preamble and body, and the stale "is recognised but not implemented here" warning is silenced for them (apply_length_value's new is_table_length arm just no-ops, matching the claim that the render pipeline reads the raw assignment itself). Verified the =-form (\tabcolsep=1pt) reuses the same length_assignment/parse_dimen_pt_at path already exercised by other preamble lengths (e.g. \parskip=1pt), so it isn't new, untested parsing.
  2. cargo test --release in crates/compiler: 57 test binaries, all "test result: ok", 0 failed — matches the PR body exactly, including the new table_lengths_are_accepted_in_every_assignment_form (14/14 in preamble_lengths.rs).
  3. Input → expected → actual:
    • {\tabcolsep=1pt \begin{tabular}{l}b\end{tabular}} → no diagnostics, value not typeset as text → confirmed via the PR's own test and by hand-compiling; matches.
    • \global\tabcolsep=2pt → still unknown_command (both \global and, as a knock-on, the following \tabcolsep) → confirmed this is pre-existing and unrelated to this PR: the same corruption happens on origin/main for \global\parskip=1pt, an assignment form that was already supported before either PR. Not a regression here, just noting it since I tested it adversarially.

No overlap conflicts found (checked #173 per the PR's own overlap section — it only touches longtable/multirow/colortbl parsing, disjoint from apply_length_value/parser.rs's dispatch touched here).

Small, well-scoped, does what it says. No changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants