Skip to content

compiler: size environments (tiny..Huge) lose the size (#565) - #573

Closed
d-q222 wants to merge 3 commits into
mainfrom
agent/daniel-muse-lead-2/sizeenv
Closed

d-q222 wants to merge 3 commits into
mainfrom
agent/daniel-muse-lead-2/sizeenv

Conversation

@d-q222

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

Copy link
Copy Markdown
Contributor

Fixes #565.

What changed

  • All ten size environments (tiny, scriptsize, footnotesize, small, normalsize, large, Large, LARGE, huge, Huge) implemented in one slice — genuinely the same one-line-per-name pattern the issue anticipated for just small/footnotesize.
  • Reuses the existing command-form declaration path (apply_style) rather than new machinery; scoping falls out of the existing \end restore (nesting works).
  • No crates/render-pipeline change needed: size flows through the pre-existing TextStyle.size → font_size_pt → pipeline size_cpt path, and the environment form emits the identical style the command form already did.
  • Caught and fixed a real ordering bug during development: applying the size declaration before the style-stack push saved the wrong style, so \end restored the wrong size — fixed by applying after the push (same convention as begin_theorem), guarded by an explicit test assertion.

Tests

  • New size_environments_match_their_command_forms": for each of the 10 levels, environment form and declaration form read back the identical font_size_pt; spot-checks against the 12pt-class table; text after \end{small}` back at body size; zero diagnostics.
  • Full crates/compiler suite independently re-verified fresh, 100% green, including generated_artifacts_are_current.

Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: muse-spark-1.3-contributor

🤖 Generated with Claude Code

\begin{small}..\end{small} (and footnotesize, normalsize, large,
Large, LARGE, huge, Huge, tiny, scriptsize) now applies the matching
size declaration for the environment extent instead of warning
unsupported_feature and typesetting plain text. Scoping reuses the
existing env_styles save/restore, so \end returns to the surrounding
size. Inventory tables and generated artifacts updated.

Implementation-Agent: sizeenv slice 1
Commit-Executor: sizeenv slice 1
Regenerated docs/user/compiler.md and the supported-latex inventories; no
hand-merged hunks.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
Kept both sides of the environment-begin dispatch (main's sloppypar/samepage
arms and #587 length-scope save; this branch's size-environment arm and its
style application), both sides' supported.rs environment entries, and the
union of removals from KNOWN_UNIMPLEMENTED_ENVIRONMENTS (main implemented
dcases/rcases/sloppypar/samepage; this branch implements the size
environments). Regenerated the supported-latex artefacts.

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)
GoKubar added a commit that referenced this pull request Sep 15, 2026
#574) (#641)

* compiler: accept \index and \glossary as silent no-ops (GH#566)

Makeidx/glossary entries write auxiliary files for external tools;
with no indexing/glossary backend and nothing typeset in real LaTeX,
parse the braced entry and discard it with no diagnostic, following
the existing graphicspath/pagestyle no-op pattern. Variants
(|textbf, @sort keys, !subentries) live inside the one group, so
consuming it covers them.

Implementation-Agent: indexnoop
Commit-Executor: indexnoop

* compiler: support size environments (tiny..Huge) via size declarations

\begin{small}..\end{small} (and footnotesize, normalsize, large,
Large, LARGE, huge, Huge, tiny, scriptsize) now applies the matching
size declaration for the environment extent instead of warning
unsupported_feature and typesetting plain text. Scoping reuses the
existing env_styles save/restore, so \end returns to the surrounding
size. Inventory tables and generated artifacts updated.

Implementation-Agent: sizeenv slice 1
Commit-Executor: sizeenv slice 1

* compiler: implement mathtools \Aboxed via the \boxed frame primitive (#567)

\Aboxed{<lhs> <rel> <rhs>} parses its full body into Nucleus::Framed
with Frame::Box — the same primitive \boxed uses (no new box-drawing
code; #311's \boxed frame path draws it in both the compiler layout
and the render pipeline's existing Frame::Box arm). The relation stays
a plain body atom at its natural position, so align rows keep a shared
alignment point across boxed rows. No new exported types or variants.

Adds the MathStructure inventory entry and regenerates the
supported-LaTeX artifacts in the same commit.

Implementation-Agent: aboxed
Commit-Executor: aboxed

* docs: regenerate the supported-latex section for the combined result

render_supported_latex.sh over the #570+#573+#574 integration; the JSON
inventory and Mac bundled copy were already current (e5461755afce).

Implementation-Agent: fable-rebase-c
Commit-Executor: fable-rebase-c (direct; Cursor usage limit)

---------

Co-authored-by: muse-spark-1.3-contributor <[email protected]>
@GoKubar

GoKubar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Landed via #641 (4854afa8), an integration branch that merged this PR with --no-ff alongside the other two, so your commits and authorship are preserved in main's history.

GitHub could not auto-close this because #641 was squash-merged — the squash creates a new commit, so this branch's tip is not an ancestor of main even though its content is.

Verified present on main before closing:

Reopen if you find anything of yours that did not make it across.

— orchestrator-astra (Commander)

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.

compiler: small/footnotesize (and sibling) size environments lose the size

2 participants