Skip to content

compiler: parse multicol multicols/multicols*, \columnbreak, \raggedcolumns (companion of #160) - #164

Merged
jay3332 merged 1 commit into
mainfrom
agent/kabir-claude/multicol-compiler
Sep 13, 2026
Merged

jay3332 merged 1 commit into
mainfrom
agent/kabir-claude/multicol-compiler

Conversation

@GoKubar

@GoKubar GoKubar commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

compiler: parse multicol's multicols/multicols*, \columnbreak, \raggedcolumns

Compiler-only companion of #160 (render-pipeline multicol layout). Independent: #160 blanks the environment before parsing, so neither PR needs the other; after a later vendor re-pin the pipeline keeps working unchanged.

Transcribed from multicol.sty 2025/10/21 v2.0b (TeX Live 2026):

  • \begin{multicols}{<n>}[<preface>][<premulticols>] and multicols* (lines 145-205, 894-905): \par at begin and end; the column count checked like \multicols (<2: multicol's "Using n' columns doesn't seem a good idea" warning; >20: its "Too many columns" error); the preface stays body material (FT-002: dispatch to claude — acknowledgement required #1\par: [blanked,]becomes the paragraph break) so a\sectionor text preface parses normally;[]` consumed. No more "environment 'multicols' is not implemented" or the column count typeset as text.
  • \columnbreak[n], \newcolumn (919-950): accepted inside multicols; outside, multicol's error.
  • \raggedcolumns, \flushcolumns (564-567): accepted.
  • \usepackage{multicol} (tracing options only) no longer warns "recognised but not implemented"; with the twocolumn class option it warns "May not work with the twocolumn option" (111-113).
  • Inventory: 4 commands, 2 environments, 1 package; supported/* and docs/user/compiler.md regenerated with scripts/render_supported_latex.sh.

The compiler's own v1 layout does not set columns (the render pipeline does); the inventory descriptions say so.

Not in this PR (outside the lane): apps/mac bundled supported-latex.json sync.

Tests

  • New tests/multicol.rs (5 tests): arguments and preface, text preface paragraph break, column-count diagnostics, \columnbreak outside, package/twocolumn warning.
  • cargo test --release --no-fail-fast in crates/compiler (CI's profile): all green, incl. supported_latex (inventory = parser arms, probes) and robustness.
  • Debug-profile robustness::deeply_nested_input_does_not_blow_the_stack overflows the stack in the debug profile on origin/main c40d2a6 too (pre-existing, not from this PR); release passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu

…ggedcolumns

\begin{multicols}{n}[preface][premulticols] as multicol.sty v2.0b's
\mult@@cols reads it: \par at both ends, the column count checked with
multicol's warning/error, the preface kept as body material (#1\par), the
premulticols argument dropped. \columnbreak/\newcolumn error outside the
environment; \raggedcolumns/\flushcolumns accepted; the package is silent
except for its twocolumn-option warning. Inventory regenerated.

Implementation-Agent: Claude Opus 5 (subagent kabir-claude multicol, mac-m5pro-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar added a commit that referenced this pull request Sep 13, 2026
Conflicts: parser.rs initialisers/fields (hyperref + boxes fields; #164's twocolumn_option placed inside struct P before main's OpenList struct), \usepackage (main's colour-package loop, then #164's twocolumn warning), \begin/\end (main's bibliography/subequations and float line, #164's multicols branches), package matches (both); supported.rs environments (minipage/lrbox + multicols/multicols*) and packages (multicol tuple after siunitx, before PSEUDOCODE_PACKAGES). Generated docs took main.

Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, mac-m5pro-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar added a commit that referenced this pull request Sep 13, 2026
…ession handoff)

Stage 1 partly done: #131, #137, #153 (incl. #142), #144, #147, #149, #150,
#155, #159, #163, #164 merged with conflicts and post-expansion fixes recorded
in docs/evidence/integration-2026-09-13b/merge-log.md. Remaining: #166, #169,
#148, #161, then the inventory regeneration and stages 2-4. The helper scripts
under tools/ hard-code the original worktree path.

Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, mac-m5pro-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar added a commit that referenced this pull request Sep 13, 2026
…merges

Every stage 1 merge took main's side of the generated inventory and deferred
the regeneration to the end of the stage. Running
crates/compiler/scripts/render_supported_latex.sh picks up #131, #137, #144,
#147, #149, #150, #153, #155, #159, #163, #164, #166 and #169, so
supported_latex::generated_artifacts_are_current passes again.

The TeX Live-derived canonical denominator is deliberately untouched: this
machine has TeX Live 2025, not the MacTeX the committed file was pinned from.

Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, nixos-pc-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
@jay3332
jay3332 merged commit cde980a into main Sep 13, 2026
11 of 18 checks passed
@GoKubar
GoKubar deleted the agent/kabir-claude/multicol-compiler branch September 13, 2026 18:12
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