Skip to content

compiler: implement the list environment and its lengths (#835) - #845

Merged
d-q222 merged 3 commits into
mainfrom
muse/ross-list-env
Sep 18, 2026
Merged

d-q222 merged 3 commits into
mainfrom
muse/ross-list-env

Conversation

@d-q222

@d-q222 d-q222 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes the main part of #835.

list 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, which is highly visible in a problem set.

  • \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; 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 now accept <factor>\baselineskip, which the corpus needs for \setlength{\topsep}{0.6\baselineskip}.
  • \parsep, \itemindent and \listparindent keep their honest warning rather than pretending to work.

Tests: crates/compiler lib 468 passed / 0 failed; every integration suite ok. Corpus probe: all Ross .tex files parse with zero environment list is not implemented warnings, and set0 yields 8 ListItem blocks 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 regenerated coverage.md, supported-latex.json and docs/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.

⚠️ Lands in 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

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
d-q222 and others added 2 commits September 17, 2026 20:04
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
d-q222 merged commit fbd4c95 into main Sep 18, 2026
22 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant