Repository navigation
compiler: implement the list environment and its lengths (#835) - #845
Merged
Merged
Conversation
The list environment is the LaTeX kernel primitive behind itemize, enumerate
and description. It was unimplemented, so its body was typeset as plain text --
items ran together and indentation was lost.
\begin{list}{label}{decl} now opens a real list through the existing
open_list/begin_item/flush_list_item machinery; \item and \item[x] work and
nesting is cumulative. The {decl} group stays in the token stream so its
\setlength declarations execute in list scope: \leftmargin, \labelsep,
\itemsep and \topsep route to the innermost open list. List lengths also
accept <factor>\baselineskip, which the corpus needs for
\setlength{\topsep}{0.6\baselineskip}.
\parsep, \itemindent and \listparindent keep their honest warning.
Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: daniel-parent
Co-authored-by: muse-spark-1.3-contributor <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
Two CI failures, same cause for all three of these PRs. The branch predated the TAB catcode merge, so its diff against current main deleted crates/tex-expansion/src/catcode.rs's new lines and the whole of crates/compiler/tests/tab_whitespace.rs -- merging it would have silently reverted that fix. Merged origin/main in. `bundled inventory matches the compiler` failed because the lane regenerated crates/compiler/supported/supported-latex.json but could not touch apps/**, which is outside Muse's editable scope, leaving the Mac app's copy stale. The two must be byte-identical: Completion.Vocabulary decodes the bundled copy and the editor's completion vocabulary is generated from it, never hand-written. Ran apps/mac/scripts/sync-supported-latex.sh; --check now passes. Commit-Executor: daniel-parent Co-authored-by: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
d-q222
added a commit
that referenced
this pull request
Sep 18, 2026
…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
d-q222
added a commit
that referenced
this pull request
Sep 18, 2026
#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]>
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.
Fixes the main part of #835.
listis the LaTeX kernel primitive behinditemize,enumerateanddescription. It was unimplemented, so its body was typeset as plain text — items ran together and indentation was lost, which is highly visible in a problem set.\begin{list}{label}{decl}now opens a real list through the existingopen_list/begin_item/flush_list_itemmachinery;\itemand\item[x]work; nesting is cumulative.{decl}group stays in the token stream so its\setlengthdeclarations execute in list scope:\leftmargin,\labelsep,\itemsepand\topseproute to the innermost open list.<factor>\baselineskip, which the corpus needs for\setlength{\topsep}{0.6\baselineskip}.\parsep,\itemindentand\listparindentkeep their honest warning rather than pretending to work.Tests:
crates/compilerlib 468 passed / 0 failed; every integration suite ok. Corpus probe: all Ross.texfiles parse with zeroenvironment list is not implementedwarnings, andset0yields 8ListItemblocks where it previously produced 0.Reviewer, please look hardest at: this touches more files than its brief implied (
biblatex.rs,incremental.rs,layout.rs) and it regeneratedcoverage.md,supported-latex.jsonanddocs/user/compiler.md. Confirm those generated files were regenerated rather than hand-edited. Note the lane's check-in says "all 21 Ross files" where there are 20 — a small inaccuracy that warrants checking its other counts.crates/compiler, so it does not reach users until the vendor re-pin.Implemented by a sandboxed Muse lane; committed and published by the Commander after verification.
🤖 Generated with Claude Code