Repository navigation
Conversation
TeX-engine errors for \setlist[itemize]{leftmargin=\mylen}: a bare
\newlength register in the options reached the stomach as a register
assignment, whose dimension scan reported 'Missing number, treated as
zero.' + 'Illegal unit of measure (pt inserted).' on the following
token (real enumitem stores keyval text unexecuted, where the bare
register is a complete <internal dimen> needing no unit).
\setlist now routes through flashtexsetlist, which absorbs the star,
[<names>] and {<options>} with one expansion pass but no execution and
splices dimen/skip register references to their current \the text, so
leftmargin=\mylen behaves exactly like leftmargin=\the\mylen. A
<factor> before the register (2\mylen) is left for the main loop, which
reports it as before. Shared by every dimension key (leftmargin,
itemsep, topsep, ...).
Tests: setlist_register_lengths (exact repro with zero diagnostics;
register vs literal vs \the equivalence for leftmargin/itemsep/topsep).
Implementation-Agent: muse-spark-1.3-contributor
GoKubar
added a commit
that referenced
this pull request
Sep 15, 2026
* GH-TEXT-SYMBOLS-1: add textbullet, textperiodcentered, textregistered, texttrademark
Same rendering path as textcopyright: four TEXT_SYMBOLS rows, parser
BUILT_INS + dispatch arms, vocabulary unlists textbullet/textperiodcentered.
OT1 reaches each through its kernel default (OMS, textcircled,
textsuperscript{TM}); T1 resolves directly. All four glyphs are
representable in the base-14 export path (WinAnsi 0x95/0x99, Latin-1
0xB7/0xAE); U+00B7 reuses the existing cdot font-resource path.
Implementation-Agent: muse-spark-1.3-contributor
* compiler: split hyphens out of math-alphabet runs as math minuses
$\mathrm{a-b}$ fused into one Text run, setting a text hyphen (-- an
en dash) instead of TeX's mathcode"2200 Bin cmsy minus. Split hyphen
runs out into one Symbol("-") atom per hyphen between the alphabet's
own runs (mathrm/mathit/mathsf/mathtt/mathbf/textbf/mathfrak),
mirroring plain $a-b$ exactly. Letter/digit runs are untouched.
Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: muse-spark-1.3-contributor
* compiler: classify frac as an ordinary math atom
What changed:
- Mark parsed \\frac as Ord while keeping infix \\over Inner.
- Correct the fraction-class documentation and add a native-spacing regression test.
What was run:
- /Library/TeX/texbin/pdflatex spacing probe (TeX Live 2026).
- CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-cleanups CARGO_BUILD_JOBS=4 cargo test --manifest-path crates/compiler/Cargo.toml --lib spacing_tests
Next step:
- Align the conditional and group nesting guards.
Implementation-Agent: codex gpt-5.6-luna (max)
Commit-Executor: codex (this session)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
* tex-expansion: make nesting limits exact
What changed:
- Reject the next conditional when the configured depth is already N.
- Add off-by-one tests proving exactly N conditionals and groups are allowed.
- Keep both default limits at 10,000.
What was run:
- /Library/TeX/texbin/pdftex native nested conditional/group probe.
- CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-cleanups CARGO_BUILD_JOBS=4 cargo test --manifest-path crates/tex-expansion/Cargo.toml --test expand_tests depth_limit
Next step:
- Audit compiler and tex-expansion TeX behavior comments and diagnostics.
Implementation-Agent: codex gpt-5.6-luna (max)
Commit-Executor: codex (this session)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
* tex-expansion: correct invalid-character recovery comment
What changed:
- Document that the recovery lexer drops invalid characters without a diagnostic.
- Keep the native TeX invalid-character behavior documented separately.
What was run:
- /Library/TeX/texbin/pdftex invalid-character probe (TeX Live 2026).
- git diff --check.
Next step:
- Run the required full compiler and tex-expansion test suites.
Implementation-Agent: codex gpt-5.6-luna (max)
Commit-Executor: codex (this session)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
* compiler: accept length registers as enumitem key values
TeX-engine errors for \setlist[itemize]{leftmargin=\mylen}: a bare
\newlength register in the options reached the stomach as a register
assignment, whose dimension scan reported 'Missing number, treated as
zero.' + 'Illegal unit of measure (pt inserted).' on the following
token (real enumitem stores keyval text unexecuted, where the bare
register is a complete <internal dimen> needing no unit).
\setlist now routes through flashtexsetlist, which absorbs the star,
[<names>] and {<options>} with one expansion pass but no execution and
splices dimen/skip register references to their current \the text, so
leftmargin=\mylen behaves exactly like leftmargin=\the\mylen. A
<factor> before the register (2\mylen) is left for the main loop, which
reports it as before. Shared by every dimension key (leftmargin,
itemsep, topsep, ...).
Tests: setlist_register_lengths (exact repro with zero diagnostics;
register vs literal vs \the equivalence for leftmargin/itemsep/topsep).
Implementation-Agent: muse-spark-1.3-contributor
---------
Co-authored-by: d-q222 <[email protected]>
Co-authored-by: muse-spark-1.3-contributor <[email protected]>
Contributor
|
Closing: this landed on main via integration PR #648 (commit da1d151, "integration: compiler queue (#602, #604, #629, #630)"). Verified by feature content: this PR's test file |
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.
Scope
Fixes
GH-ENUMITEM-COMPILER-DIMS:\setlist[itemize]{leftmargin=\mylen}(a length register from\newlength) produced two spurious TeX-engine errors (Missing number, treated as zero.,Illegal unit of measure (pt inserted).) that real pdflatex does not produce.Root cause:
\setlistis undefined in the expansion engine, so its[...]/{...}argument tokens flow through the engine's main loop unexecuted. A bare\mylenthere dispatches to the register-reference path, which then tries toscan_glue/scan_dimenthe following token (the closing}) expecting more digits/a unit — exactly like a real TeX<internal dimen>should NOT do (a bare register reference is already a complete dimension, never followed by a unit). Real enumitem avoids this because it absorbs the keyval text unexecuted and only assigns it later, where the register naturally resolves to a complete value.Fix, following the repo's existing
flashtexsetlength-shim pattern:HOST_PRELUDEgains\def\setlist{\flashtexsetlist}; a newPrimitive::FlashtexSetlistabsorbs the star/[names]/{options}with one expansion pass but zero execution, splices each dimen/skip register reference (\newlength/\newdimen, through one\letlevel, plus primitive\dimen<n>) to its current\the-equivalent text, and pushes the reconstructed command back through the main loop. A<factor>before the register (2\mylen) is deliberately NOT spliced (that would silently misread) — reported as before. One fix covers all dimension-valued enumitem keys (leftmargin,itemsep,topsep, ...), not justleftmargin.No
crates/render-pipeline/touch.Overlap check
coord.py claims— held only by daniel-muse-lead. Probed for interference with thesetlist-starlane (#571) —\setlist*with a register value gives the identical single parser error with or without the fix (star handling untouched).Test results
New
crates/compiler/tests/setlist_register_lengths.rs(5 tests, supervisor-run): all pass — exact-repro zero-diagnostics, register≡literal-dimension equivalence forleftmargin/itemsep/topsep, bare-register≡\the-register equivalence.Mutation check (per the lane, quoted verbatim): stashing the 3 source files reproduces all 5 new tests failing with exactly the original
["Missing number, treated as zero.", "Illegal unit of measure (pt inserted).", "\\setlist keys ... are recognised but not implemented"]; restored, all 5 pass.Full suite (per the lane):
crates/compiler676 passed, 0 failed (59/59 suites);crates/tex-expansion60 passed, 0 failed. Supervisor independently re-ran the new test file directly: 5/5 pass.Entry-point repro:
flashtex_compiler::protocol::handle_lineon the exact reported reproduction returns"diagnostics":[].Not done
Two deliberate scope cuts, noted for follow-up: (1) the register resolves at the
\setlistcall site (expansion order), matching the\theform, rather than pdflatex/enumitem's later-assignment timing — a later\setlengthbefore\begin{...}would not be picked up; true use-site timing needs parser-side register access, a bigger separate change. (2) count-register values (start=\c) still flow to the main loop and error as before — same bug family, a different scanner (scan_number), left for a follow-up slice.🤖 Generated with Claude Code