Conversation
Introduces the model layer for TeX's fixed-size delimiter commands (\big, \Big, \bigg, \Bigg and their l/r/m classed variants). The atom is a single-atom subclass of MTMathAtom — it does not pair — and reuses the inherited type field to carry the correct math class (Ord/Open/ Close/Rel) so the existing inter-element spacing machinery applies unchanged. An empty nucleus is permitted to represent the null delimiter (`.`). No parser, typesetter, or serializer wiring yet — those follow in subsequent commits.
Adds a table-driven dispatch in MTMathListBuilder for the 16 fixed-size delimiter commands (\big/\Big/\bigg/\Bigg × ∅/l/r/m). The existing getBoundaryAtom: helper is reused to read the delimiter token, validate it against MTMathAtomFactory.delimiters, and surface MTParseErrorMissingDelimiter / MTParseErrorInvalidDelimiter with the command name embedded in the message. Also guards MTTypesetter's Rule 14 Ordinary fusion against collapsing an MTLargeDelimiter into an adjacent plain-Ordinary atom. Without this, a subsequent typesetter dispatch branch on isKindOfClass: would never see the delimiter atom. Renderer-level behaviour is unchanged — large delimiters still fall through the generic Ord/Open/Close/Rel path; dedicated rendering arrives in a follow-up commit.
Serialization is intrinsic to an atom and symmetric with the already-public +[MTMathListBuilder mathListToString:]. Declaring the selector once on the base class gives subclasses a canonical override point and lets the compiler type-check call sites. Removes the duplicate `MTMathAtom (MTMathListBuilderSerialization)` category declarations from MTMathList.m and MTMathListBuilder.m. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Resolved conflict in MTMathListBuilder.m's mathListToString: by keeping the polymorphic appendLaTeXToString: dispatch from this branch and adding an MTMathStack appendLaTeXToString: implementation that mirrors the inline stack handling added on master. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.