Expand grammar: cal(), logic/sequent, vec, overbrace, tables, bra-ket, intervals
generate_typeset.py:
- Add _CALLIGRAPHIC pool; cal(X) appears in _atom() at ~10% and cal(P)(expr) in tail
- Add phi.alt, epsilon.alt, theta.alt (LaTeX \varphi, \varepsilon, \vartheta variants)
- Add logic/sequent block (3%): tack.r, and/or/=>/<=>/xor, not, models, top/bot, type judgments
- Add vec(a,b) / vec(a,b,c) column vectors
- Add underbrace/overbrace/underbracket/overbracket/underparen/overparen with atom labels
- Add bra-ket Dirac notation: lr(|ψ⟩), lr(⟨ψ|), lr(⟨φ|ψ⟩), lr(⟨A⟩)
- Add intervals via lr(): closed [a,b], open (a,b), half-open [a,b) and (a,b]
- 3x3 matrices (35% of matrix branch, was 2x2 only)
- Cartesian product type signatures: f: A×B→C, f: A×B×C→D
- _atom() now includes calligraphic letters
generate_mixed.py:
- Add _generate_table(): 15% of bodies; 2-4 cols, 2-5 rows; cell complexity
inversely proportional to table size; delegates to _inline_seq for unified
content (inherits emoji, math/text mix automatically)
- Table inset (x:5pt, y:7pt) to prevent underbrace/overbrace label clipping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>