Repository navigation
Conversation
…dhere
Theorem-like environments now carry the structure a faithful layout needs,
as non-breaking side tables on Parsed:
- Parsed::theorems: one TheoremRecord per instance (kernel \newtheorem,
amsthm \newtheorem, proof) with kind, \begin[note] and \end spans,
name/number/note, swap, head/note/body fonts, head punctuation, head
space (kernel \labelsep, amsthm \thm@headsep glue, { }, \newline),
indent and \thm@preskip/\thm@postskip.
- Parsed::qed_marks: every end-of-proof symbol (\end{proof}, text
\qedhere, \qedhere inside a display, \qed) with its placement.
Heads follow the sources: without amsthm, latex.ltx \@BeginTheorem
({\bfseries Name Number (Note)}, no period, italic body); with amsthm,
\thm@headfont Name Number, the note in \thm@notefont, \thm@headpunct in
the head font. New: \newtheoremstyle (amsthm.sty 236-272), \swapnumbers,
amsmath \numberwithin, [within] on any counter (theorem numbering moves
onto xref::Counters, new Counters::set_within), \renewcommand of
\proofname/\qedsymbol, \@addpunct for proof headings, \qedhere (text and
math mode). Supported inventory regenerated.
Tests: tests/amsthm.rs 26 (was 17); compiler cargo test all green except
supported_latex::canonical_names_outside_the_inventory_are_diagnosed,
which fails identically on origin/main (built-in \and reaches
unsupported; pre-existing). clippy --lib and touched tests -D warnings
clean (main.rs has a pre-existing clippy error).
Implementation-Agent: Claude Opus 5 (subagent kabir-claude theorem fidelity, 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
This was referenced Sep 13, 2026
Closed
GoKubar
added a commit
that referenced
this pull request
Sep 13, 2026
Conflicts: lib.rs modules (boxes + color/color_names), parser.rs modules (hyperlinks/boxes/lists + colors) and Inline enum (#137's Box/SetLength/LengthGlue + #150's ColorBox variant, then main's ReferenceForm and #150's ColorBox struct), incremental.rs span shifting (both). Integration fixes: #150's parser/colors.rs box_inlines renamed color_box_inlines (clashed with #137's); #149's theorems.rs ITALIC const gains color: None; set_length records \fboxsep/\fboxrule before #137's set_box_length claims the assignment, so \colorbox sees it (xcolor_parse fboxsep 3.0 vs 5.0). 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
Semantic overlap with #153 resolved to one counter model: equation/figure/table step through xref::Counters (#155); Counters::report() registers them within chapter (#153's numbering), so \chapter's step resets them, and #153's hand-kept equation/figure/table counters and within_chapter are removed. Kept #131's caption/equation hyperref anchors and label_inline. Conflicts: HOST_PRELUDE (amsthm defaults + \counterwithin/\counterwithout pass-through), parser.rs fields/dispatch/captions/bibliography OpenList + subequations begin/end/equation/multirow/labels, supported.rs (counter commands + main's hyperref url/href). Also: Counters::set_within rewritten on #155's Vec reset_by/pieces; #149's \numberwithin arm and fn removed (shadowed #155's counter_numbering with [style]); #155's theorem-counter special case removed (theorem counters are Counters entries since #149); TEXT_EXTRA_ARMS drops numberwithin (now in BUILT_INS); unused HashMap import in parser/boxes.rs. 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
Contributor
Author
|
Closing as abandoned (per backlog triage). The theorem lane landed on main through a different architecture while this draft sat: crates/compiler/src/theorems.rs plus merged amsthm PRs #190, #196, #480 and #267. This draft's TheoremRecord side-table model conflicts with that landed design. Its genuinely-unlanded pieces — \newtheoremstyle, \swapnumbers, \qedhere (absent from crates/compiler/src on main) — are worth re-implementing on top of theorems.rs, but that is a new task, not this branch. agent/kabir-claude/theorem-fidelity-compiler is preserved. |
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.
Compiler half of the theorem-fidelity lane. This PR is based on main and has no dependencies. The render-pipeline layout comes in a separate PR that needs this one pinned into
vendor/compiler.What changes
Parsed. NoBlockorInlineenum changes.theorems: Vec<TheoremRecord>: kind (kernel / amsthm / proof),\begin[note]and\endspans, name, number, note, swap, fonts (head, note, body), head punctuation, head space, indent, and\thm@preskip/\thm@postskip.qed_marks: Vec<QedMark>: each end-of-proof symbol, placed at the end of a proof, by\qedherein text, by\qedhereinside a display, or by an explicit\qed.\@begintheorem:{\bfseries Name Number (Note)}with no period.\thm@notefont, and the period in the head font.\newtheoremstyle(amsthm.sty 236-272). A custom head spec (argument 9) is diagnosed.\swapnumbers.\numberwithin.[within]on any counter: numbering now usesxref::Counters, with a newset_within.\renewcommandof\proofnameand\qedsymbol.\@addpunctfor proof headings.\qedherein text and in math.Tests
tests/amsthm.rs: 26 tests, up from 17. They cover kernel vs amsthm heads, records,\newtheoremstyle,\swapnumbers,\numberwithin, and\qedherein a list and in a display.cargo test: everything passes exceptsupported_latex::canonical_names_outside_the_inventory_are_diagnosed. It fails the same way on origin/main (built-in\andreachesunsupported), so it predates this PR.clippy -D warningsis clean on the lib and the touched tests.src/main.rshas a clippy error that predates this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu