-
Notifications
You must be signed in to change notification settings - Fork 64
feat: add Priority 1 symbols, delimiter sizing, and negated relations #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
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
2 3 Fix varsigma to use U+03C2 (Greek small letter final sigma ς) 4 instead of incorrect U+03C1 (Greek small letter rho ρ). 5 6 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Add 20 new symbol mappings to supportedLatexSymbols dictionary: 4 5 Greek variants: 6 - varkappa (U+03F0), digamma (U+03DD), Digamma (U+03DC) 7 8 Arrows: 9 - longmapsto (U+27FC), hookrightarrow (U+21AA), hookleftarrow (U+21A9) 10 11 Slanted inequalities: 12 - leqslant (U+2A7D), geqslant (U+2A7E) 13 14 Precedence relations: 15 - preceq (U+2AAF), succeq (U+2AB0) 16 17 Turnstile relations: 18 - vdash (U+22A2), dashv (U+22A3), bowtie (U+22C8) 19 20 Binary operators: 21 - diamond (U+22C4) 22 23 Hebrew letters: 24 - beth (U+2136), gimel (U+2137), daleth (U+2138) 25 26 Miscellaneous: 27 - varnothing (U+2205), Box (U+25A1), measuredangle (U+2221) 28 29 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Add 9 new test functions covering all Priority 1 symbol additions: 4 - testGreekVariants: varkappa, digamma, Digamma and existing variants 5 - testVarsigmaCorrectUnicode: verify varsigma maps to U+03C2 (final sigma) 6 - testNewArrows: longmapsto, hookrightarrow, hookleftarrow 7 - testSlantedInequalities: leqslant, geqslant 8 - testPrecedenceRelations: preceq, succeq 9 - testTurnstileRelations: vdash, dashv, bowtie 10 - testDiamondOperator: diamond binary operator 11 - testHebrewLetters: aleph, beth, gimel, daleth 12 - testMiscSymbols: varnothing, Box, measuredangle 13 14 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2
3 Verify that \mathbb{} command works correctly for common letters
4 (N, Z, Q, R, C, H, P) and round-trips correctly to LaTeX string.
5
6 Note: \mathbb was already implemented in the codebase.
7
8 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Add support for \big, \Big, \bigg, \Bigg and their variants (\bigl, \bigr, 4 \Bigl, \Bigr, \biggl, \biggr, \Biggl, \Biggr, \bigm, \Bigm, \biggm, \Biggm). 5 6 Implementation details: 7 - Add delimiterHeight property to MTInner class for explicit size control 8 - Add delimiterSizeCommands dictionary to MTMathListBuilder with multipliers: 9 - \big: 1.2x font size 10 - \Big: 1.8x font size 11 - \bigg: 2.4x font size 12 - \Bigg: 3.0x font size 13 - Parse sizing commands and create MTInner atoms with explicit delimiter height 14 - Modify MTTypesetter.makeLeftRight() to use explicit height when provided 15 - Standalone delimiters render without inner content (empty innerList) 16 17 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Add 6 new test functions covering delimiter sizing functionality: 4 - testBigDelimiterCommands: basic \big, \Big, \bigg, \Bigg parsing 5 - testBigDelimiterLeftRightVariants: \bigl, \bigr, \Bigl, \Bigr, etc. 6 - testBigDelimiterMiddleVariants: \bigm, \Bigm, etc. 7 - testBigDelimiterMissingDelimiter: error handling for missing delimiter 8 - testBigDelimiterInvalidDelimiter: error handling for invalid delimiter 9 - testBigDelimiterInExpression: sizing commands in larger expressions 10 11 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Mark manual delimiter sizing (\big, \Big, \bigg, \Bigg) as implemented. 4 Update summary statistics: now 8/12 features implemented (67%). 5 6 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Add DelimiterSizingRenderTests class with testBigDelimiterRendering() that 4 generates PNG images to visually verify \big, \Big, \bigg, \Bigg commands 5 render delimiters at progressively larger sizes. 6 7 Test cases include: 8 - Nested parentheses showing all 4 size levels 9 - Individual size comparisons with fraction content 10 - Standalone delimiters without content 11 - Mixed expressions with different delimiter sizes 12 - Brackets, braces, and vertical bars 13 - Comparison with \left \right auto-sizing 14 15 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Update delimiter sizing multipliers to more closely match standard TeX: 4 - \big: 1.0x (was 1.2x) 5 - \Big: 1.4x (was 1.8x) 6 - \bigg: 1.8x (was 2.4x) 7 - \Bigg: 2.2x (was 3.0x) 8 9 This ensures all 4 sizes are visually distinguishable and better matches 10 actual LaTeX rendering behavior. 11 12 Also fix test cases to use correct nesting order (outer=larger, inner=smaller) 13 which is the standard convention in mathematical typesetting. 14 15 Co-Authored-By: Claude Opus 4.5 <[email protected]>
2 3 Add comprehensive set of negated relation symbols: 4 5 Inequality negations (14): 6 - nless, ngtr, nleq, ngeq, nleqslant, ngeqslant 7 - lneq, gneq, lneqq, gneqq, lnsim, gnsim, lnapprox, gnapprox 8 9 Ordering negations (10): 10 - nprec, nsucc, npreceq, nsucceq 11 - precneqq, succneqq, precnsim, succnsim, precnapprox, succnapprox 12 13 Similarity/congruence negations (6): 14 - nsim, ncong, nmid, nshortmid, nparallel, nshortparallel 15 16 Set relation negations (12): 17 - nsubseteq, nsupseteq, subsetneq, supsetneq 18 - subsetneqq, supsetneqq, varsubsetneq, varsupsetneq 19 - varsubsetneqq, varsupsetneqq, notni, nni 20 21 Triangle negations (4): 22 - ntriangleleft, ntriangleright, ntrianglelefteq, ntrianglerighteq 23 24 Turnstile negations (4): 25 - nvdash, nvDash, nVdash, nVDash 26 27 Square subset negations (2): 28 - nsqsubseteq, nsqsupseteq 29 30 Co-Authored-By: Claude Opus 4.5 <[email protected]>
… Math 2 3 Remove digamma (U+03DD) and Digamma (U+03DC) from supportedLatexSymbols 4 as they are not present in the Latin Modern Math font and cause render 5 errors. 6 7 Also add SymbolRenderTests class with visual render tests for: 8 - Priority 1 symbols (10 test images) 9 - Negated relations (18 test images) 10 11 Co-Authored-By: Claude Opus 4.5 <[email protected]>
Author
|
Closing this PR and splitting into separate PRs:
This separation makes review easier and allows features to be merged independently. |
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.
This PR adds commonly-used LaTeX symbols, implements manual delimiter sizing, and adds negated relations.
Part 1: Priority 1 Symbol Additions
Bug Fix
New Symbol Mappings (20 symbols)
Greek variants:
Arrows:
Slanted inequalities:
Precedence relations:
Turnstile relations:
Binary operators:
Hebrew letters:
Miscellaneous:
Part 2: Manual Delimiter Sizing Commands
Implements
\big,\Big,\bigg,\Biggand their variants for manual control of delimiter sizes.Supported Commands
\big,\bigl,\bigr,\bigm\Big,\Bigl,\Bigr,\Bigm\bigg,\biggl,\biggr,\biggm\Bigg,\Biggl,\Biggr,\BiggmPart 3: Negated Relations (amssymb)
Adds 48 negated relation symbols from the amssymb package.
Inequality Negations (14)
\nless,\ngtr,\nleq,\ngeq,\nleqslant,\ngeqslant,\lneq,\gneq,\lneqq,\gneqq,\lnsim,\gnsim,\lnapprox,\gnapproxOrdering Negations (10)
\nprec,\nsucc,\npreceq,\nsucceq,\precneqq,\succneqq,\precnsim,\succnsim,\precnapprox,\succnapproxSimilarity/Congruence Negations (6)
\nsim,\ncong,\nmid,\nshortmid,\nparallel,\nshortparallelSet Relation Negations (12)
\nsubseteq,\nsupseteq,\subsetneq,\supsetneq,\subsetneqq,\supsetneqq,\varsubsetneq,\varsupsetneq,\varsubsetneqq,\varsupsetneqq,\notni,\nniTriangle Negations (4)
\ntriangleleft,\ntriangleright,\ntrianglelefteq,\ntrianglerighteqTurnstile Negations (4)
\nvdash,\nvDash,\nVdash,\nVDashSquare Subset Negations (2)
\nsqsubseteq,\nsqsupseteqTest Coverage
Priority 1 Symbols (10 tests):
Delimiter Sizing (6 unit tests + visual render tests):
Negated Relations (7 tests covering 48 symbols):
Notes
Generated with Claude Code