Skip to content

compiler: verbatim tabs as one space, lstinline, listings configuration commands - #144

Closed
GoKubar wants to merge 2 commits into
mainfrom
agent/kabir-claude/verbatim-fidelity-compiler
Closed

GoKubar wants to merge 2 commits into
mainfrom
agent/kabir-claude/verbatim-fidelity-compiler

Conversation

@GoKubar

@GoKubar GoKubar commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Compiler half of verbatim/listings fidelity. Based on main 85ec30c, not stacked. The render-pipeline half is a separate draft PR (agent/kabir-claude/verbatim-fidelity); it reads this behaviour once vendor/compiler is re-pinned by the integrator. No vendor edits.

Changes

  • Tabs in verbatim and \verb: a tab is one space, as in latex.ltx (\@vobeytabs makes ^^I the \@xobeytab of \@xobeysp; \@setupverbvisibletab gives the visible space under the star form). It was an 8-column tab stop, which pdfLaTeX does not do.
  • \lstinline: \lstinline[<keys>]<c>...<c> and \lstinline{...} are lexed like \verb, as one TokenKind::Verb over the whole invocation (listings.sty \lstinline@, \lst@InlineG). The code no longer leaks as text. The AST is unchanged: it is an Inline::Verbatim whose span starts with \lstinline.
  • Configuration commands: \lstset{..}, \lstdefinestyle{..}{..} and \lstloadlanguages{..} set no text.
  • \lstinputlisting[<keys>]{file}: lists a project document as a Block::Verbatim. The block span is the command; the lines point into that document.
  • Listings keys: keys outside parser::LISTING_KEYS (the keys the render pipeline lays out) are reported by name. Previously any lstlisting option produced "not implemented". upquote and label are reported too, since the pipeline does not set them.
  • \verb in an argument: \verb read inside a heading or caption argument reports LaTeX's \verb illegal in argument.
  • Inventory: listings is a supported package. The inventory, docs/user/compiler.md and supported/* are regenerated (scripts/render_supported_latex.sh).

Tests

  • cargo test --lib: 243 passed, including new lexer and parser tests for tabs, \lstinline, listings keys, configuration commands, \verb in arguments and \lstinputlisting.
  • All other compiler test binaries are green except two, which fail the same way on main 85ec30c:
    • robustness::deeply_nested_input_does_not_blow_the_stack (stack overflow)
    • supported_latex::canonical_names_outside_the_inventory_are_diagnosed (debug assertion in unsupported)

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu

GoKubar and others added 2 commits September 13, 2026 07:16
…ion commands

- A tab in verbatim/\verb is one space (latex.ltx \@vobeytabs: ^^I is
  \@xobeytab = \@xobeysp; the visible space under the star form), not an
  8-column tab stop.
- \lstinline[<keys>]<c>...<c> and \lstinline{...} are lexed like \verb
  (one Verb token over the whole invocation; listings.sty \lstinline@,
  \lst@InlineG), so the code no longer leaks as text.
- \lstset, \lstdefinestyle, \lstloadlanguages set no text; \lstinputlisting
  lists a project document as Block::Verbatim.
- lstlisting/\lstset keys: only keys outside LISTING_KEYS (the ones the
  render pipeline lays out) are reported, by name.
- \verb read inside a heading/caption argument reports LaTeX's
  "\verb illegal in argument".
- listings is a supported package; inventory, docs and coverage regenerated.

Implementation-Agent: Claude Opus 5 (subagent kabir-claude verbatim fidelity, mac-m5pro-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
…er pipeline)

upquote changes the quote glyphs and label needs lstnumber references,
neither of which the render pipeline sets; they are now reported with the
other unimplemented listings keys instead of being accepted silently.

Implementation-Agent: Claude Opus 5 (subagent kabir-claude verbatim fidelity, mac-m5pro-kabir)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
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
@GoKubar

GoKubar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded — the work is already on main.

Replacement: 44f2f4e (#235 verbatim tab), 9abbf33 (#188 \lstinline), d1fdf8e (#456 \lstset)

Closed by the integration lane while clearing a 219-PR backlog (112 of them drafts). If this is wrong, reopen it and tell me — I would rather be corrected than leave stale work buried.

— orchestrator-astra (Commander)

@GoKubar GoKubar closed this Sep 15, 2026
@GoKubar
GoKubar deleted the agent/kabir-claude/verbatim-fidelity-compiler branch September 16, 2026 04:18
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.

1 participant