Repository navigation
compiler: produce a page for glyphless horizontal material (#843) - #860
Conversation
A body of only non-glyph horizontal material (\hspace, \hfill,
\quad, \hskip, kerns) produced no box, hence no line and no page
('display list has no pages'), where pdflatex ships a one-page PDF.
flush_list_item now prepends a zero-size rule anchor to such
paragraphs: a box that paints nothing and measures nothing, matching
the oracle's empty line. Genuinely empty, comment-only and
label-only bodies still produce nothing. \strut is implemented as a
zero-width rule of .7/.3 baselineskip (latex.ltx strutbox).
Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: muse-spark-1.3-contributor
The lane regenerated crates/compiler/supported/supported-latex.json but cannot touch apps/**, which is outside Muse's editable scope. CI requires the two copies to be byte-identical: Completion.Vocabulary decodes the bundled copy and the editor's completion vocabulary is generated from it, never hand-written. Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]>
…facts #844 (\text/\boxed) and #845 (list) landed on main while this branch was open, and both touch crates/compiler/src/parser.rs next to this branch's work. Two genuine source conflicts, resolved structurally rather than by side: 1. The text-mode dispatch arms. This branch adds `"strut"`, main adds `"text"` and `"boxed"`. All three belong; kept all three. 2. `fn inline_sets_a_box` (this branch, #843) against `fn inline_text` (main, #845). A naive keep-both does NOT work here: this branch's side ends mid-body and is closed by the `}` that follows the conflict block, so concatenating the two sides produced an unclosed delimiter. Closed inline_sets_a_box explicitly and let inline_text take the trailing brace. Verified `cargo check` reports 0 errors and all three of inline_sets_a_box / inline_text / plain_inline_text are present exactly once. Generated artifacts (supported-latex.json x2, coverage.md, docs/user/compiler.md) regenerated with render_supported_latex.sh from the resolved source rather than taking either side, since neither side's counts are correct after the merge. apps/mac sync --check passes. Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
|
Merged #844 ( Conflict 1 — text-mode dispatch arms. This branch adds Conflict 2 — A conflict region is a text range, not a syntactic one; "both sides belong" was right, "concatenate both sides" was not. Verified after resolution:
Generated artifacts ( |
#845's `fn is_list_length` landed adjacent to this branch's `FACTOR_LENGTHS` plus `fn is_length_name`. Same shape as the conflict in #860: this branch's side ends mid-function body and is closed by the `}` that follows the conflict block, so concatenating both sides yields an unclosed delimiter. Closed is_length_name explicitly and let is_list_length take the trailing brace. Verified: cargo check 0 errors; is_length_name, is_list_length and is_length_reference each present exactly once; no conflict markers. Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]>
#849 adds the Inline::PageStyle variant; #860 adds a match over Inline in inline_span. Each PR is individually correct and individually green -- the variant and the match only coexist once both are merged, so neither PR's CI could catch it. Rust's exhaustiveness check turns it into a compile error (E0004) rather than silent misbehaviour. PageStyle is a zero-width marker, so it belongs in the same alternation as the other whatsits already there (Label, PageNumbering, Marginpar). Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]>
Fixes the "no PDF at all" half of #843 — the only case we had found where FlashTeX fails to render outright rather than rendering something wrong.
Measured against pdflatex (TeX Live 2026)
\hspace{1cm}\hfill\strutThose last two rows are the control and they matter: a genuinely empty document correctly produces nothing in both engines, so this is emphatically not "always emit a page". Regression tests pin both.
Two changes
\strutis now implemented rather than being anunsupported_featureerror that left no output. Zero-widthInline::Rule, height 0.7 / depth 0.3 of the current\baselineskipperlatex.ltx's\strutbox, with depth encoded as a negative raise asTextRulerequires.flush_list_item— the single choke point forParagraph/Styled/ListItem, so one insertion covers every route. Covers\hspace,\hskip,\hfill/\hfil,\quad/\qquad/\enskipand kerns like\,. The anchor is a box, which is what makes the line exist.The earlier investigation concluded the guard at
crates/pdf/src/v2.rs:1513is arguably correct and should not be relaxed to emit blank pages; that would paper over the cause and risk spurious pages elsewhere. This fixes paragraph assembly instead, which is where the problem actually was.Tests
New
crates/compiler/tests/glyphless_body.rs, 13 tests: anchor shape and span for\hspace{1cm}/\hfill/\hspace{0pt}; strut dimensions at the default 12pt body (10.08/4.32) and at explicit[10pt](8.4/3.6, the oracle's own numbers);{\Large \strut}scaling; strut followed by a blank line; two\hspacees yielding two anchored paragraphs.Full
crates/compilersuite: 87 binaries ok, 1,069 passed, 0 failed.Housekeeping
Merged
origin/main(f189d339) before publishing — the lane branched earlier and its raw diff would have deleted 557 lines of the KOMAclass-geometrywork that landed meanwhile. The publish gate refused it automatically and named the files. Also re-ranapps/mac/scripts/sync-supported-latex.sh, since the lane regenerated the compiler inventory but cannot touchapps/**.crates/compiler, so it does not reach users untilvendor/compileris re-pinned (currently 15 commits behind, perscripts/check-vendor-pins.sh).Implemented by a sandboxed Muse lane; reviewed and published by the Commander.
🤖 Generated with Claude Code