Conversation
…ixes #495) Parse \addvspace{len} like its \vspace sibling into Block::VSpace, removing the unsupported_feature diagnostic and producing real inter-paragraph space through the existing layout and render-pipeline VSpace path. Honest simplification, documented at the new parser arm: real LaTeX's \@xaddvskip merges with preceding addvspace glue (keeps the larger), but Block::VSpace carries no glue provenance and the correct merge point (page-builder's VListBuilder::addvspace) is out of scope, so consecutive calls add up instead of taking the maximum. Implementation-Agent: muse-spark-1.3-contributor
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED
Point 2 is the actionable item; everything else is either confirmed-correct or a pre-existing, disclosed-elsewhere limitation. |
) Real \addvspace (ltspace.dtx) takes one plain argument with no \@ifstar — \addvspace*{10pt} is a hard TeX error, since the * itself gets consumed as the (invalid) mandatory argument. This compiler was silently consuming the star and inserting a real 10pt skip, a materially different, non-erroring result from the oracle on that exact input (review finding on #504). Unlike \vspace* (which real TeX does support), the star must not be consumed here. Adds addvspace_star_is_diagnosed_not_silently_tolerated, confirming \addvspace*{10pt} is diagnosed and produces no vertical-glue block. Implementation-Agent: muse-spark-1.3-contributor Commit-Executor: daniel-muse-lead (Claude Sonnet)
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED Earlier findings, resolved one by one
New findings
Everything substantive from the original review is now fixed and independently re-verified (real pdflatex comparison, real compiler-binary repro, mutation check). The only open item is the trivial test-count update in the body. |
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED Prior findings
New finding
Reconfirmed, no issues
SummaryTwo items to fix before ready: (a) update the stale test-count numbers in the PR body (341→342, "2 new"→"3 new", mutation-check "2 passed"→"3 passed" — flagged last round, still unfixed), and (b) correct the |
…description The comment claimed real \addvspace's \@xaddvskip only merges with glue that itself came from a previous \addvspace, and that \vspace/\bigskip glue next to it is "kept in full". Real ltspace.dtx checks \ifdim \lastskip=\z@ generically -- any preceding vertical glue triggers the same max-or-sum merge, regardless of what inserted it. Corrected. Implementation-Agent: muse-spark-1.3-contributor
…d/addvspace # Conflicts: # apps/mac/Sources/FlashTeXMac/Resources/supported-latex.json # crates/compiler/src/parser.rs # crates/compiler/src/vocabulary.rs # crates/compiler/supported/coverage.md # crates/compiler/supported/supported-latex.json # docs/user/compiler.md
The merge with main dropped \addvspace from the outer dispatch list that routes bigskip/medskip/vspace/etc. into vertical_command (main had reorganized this list independently), so \addvspace fell through to the generic unsupported() catch-all and tripped its own debug_assert(!BUILT_INS.contains(name)) sanity check. Add it back alongside vspace. Also update Block::VSpace construction/pattern sites for the stretch_pt/shrink_pt fields GH-VSKIP-GLUE-STRETCH (#606) added to main during the wind-down. Implementation-Agent: muse-spark-1.3-contributor
…/flash-tex/flashtex into agent/daniel-muse-lead/addvspace # Conflicts: # crates/compiler/src/parser.rs
|
daniel-muse-lead: merged origin/main, now MERGEABLE. Merge (not rebase) One real post-merge bug found and fixed (not just conflict markup): main's outer command-dispatch list that routes A second merge was needed for a review-fix commit ( Literal test output after both merges, Full Now |
Scope
Fixes #495.
\addvspace{len}previously erroredunsupported_feature.crates/compiler/src/parser.rs+ inventory files regenerated via the project's ownrender_supported_latex.shscript (not hand-edited).Documented, honest simplification (flagged as required before implementing, and the right call here): real TeX's
\@xaddvskipmerges with whatever glue already ends the current vertical list (\ifdim\lastskip=\z@, checked generically — not only when that glue came from a previous\addvspace; a preceding\vspace/\bigskiptriggers the exact same merge, since\lastskipcarries no provenance in real TeX either). The merge itself takes the larger of the two skips (falling back to summing only when the new length is negative and the existing one is not). This compiler'sBlock::VSpacecarries a flat point amount with no provenance and no way to inspect or replace the previous block, and the correct merge point (page-builder'sVListBuilder::addvspace) is a separate crate out of scope for this lane — reaching it would also require re-vendoring the render-pipeline's compiler snapshot. So\addvspace{len}unconditionally insertslen, exactly like\vspace{len}: a single call (nothing but non-glue material before it) matches real TeX, while two consecutive calls (or an\addvspaceright after any other vertical glue) add up where real TeX would keep the larger. This is documented in a doc comment on the new parser arm and in the inventory description, the same pattern used for the recentBoxMeasurerPR's own honest limitation.Overlap check
git branch -a --list '*addvspace*'— no other branch.coord.py claims—GH-ADDVSPACEheld only by me,--branchset.Test results
Full
cargo test --libincrates/compiler(supervisor-run, freshCARGO_TARGET_DIR): 342 passed, 0 failed (includes all 3addvspacetests: the originaladdvspace_inserts_vertical_space_without_an_unsupported_diagnosticandaddvspace_twice_in_a_row_adds_safely_without_negative_space, plusaddvspace_star_is_diagnosed_not_silently_toleratedfrom the star-form review fix below).--test supported_latex: 8/8 (parser-arm/inventory parity, artifacts current).Mutation check (independently re-run by the reviewer): with the
addvspacematch arm disabled, both original tests fail with the originalunsupported_featureerror; restored with a fresh build, all pass.Not done
True
\@xaddvskipmax-merge semantics (needs glue provenance on the vertical-spacing IR, apage-builder/vendor/compilerchange outside this lane's scope, and pdflatex-oracle tests) — left as a documented follow-up, not attempted here.Update (review fix)
The star-form claim in the original body was wrong and has been fixed: real
\addvspacehas NO star form at all (ltspace.dtx's kernel definition takes one plain argument) —\addvspace*{10pt}is a hard TeX error in real LaTeX, not tolerated like\vspace*. This compiler previously silently consumed the star and inserted a real skip; it now does not consume it, so\addvspace*is diagnosed instead of silently succeeding. New testaddvspace_star_is_diagnosed_not_silently_tolerated, mutation-checked, fullcrates/compilersuite green.Update 2 (review fix)
Two more fixes: (1) the "Test results" section above was stale — it now reflects the current 3-test count including the star-form test, and gives a full-suite total rather than the original partial count. (2) The glue-merging justification in the Scope section, and the matching code comment, wrongly claimed real TeX only merges
\addvspacewith glue that itself came from a previous\addvspacecall specifically. Checked realltspace.dtx/latex.ltx(\@xaddvskip,\ifdim\lastskip=\z@): the check is generic — it fires on any nonzero\lastskip, regardless of what inserted that glue (a plain\vspaceor\bigskipimmediately before an\addvspacetriggers the identical max-or-sum merge). Both the Scope text above and the source comment on theaddvspacedispatch arm are corrected to say so.🤖 Generated with Claude Code