feat: equation layout for mathematical-style graphics - #47
Merged
Conversation
New layout type that renders equations like "Satisfaction = Perception −
Expectation" as stacked, typographically rich graphics. Parses equation
strings into terms and operators, renders each term on its own line with
the operator aligned left.
- Supports CSS (default) and Pretext SVG text rendering modes
- Auto-detects operators: =, +, −, ×, ÷
- Themes work via color_scheme integration (dark, apple, etc.)
- Optional label (small caps above) and footnote (italic below rule)
- Three size presets: small (64px), medium (84px), large (108px)
- CLI: --equation, --eq-label, --footnote, --eq-size
- MCP: layout="equation", args={"equation": "...", "label": "...", ...}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- DIAGRAM_TYPES.md: add Equation Diagrams section with CLI example - CREATE_COMMAND.md: add equation row to Layout Decision Table - QUICKSTART.md: add equation to diagram types list, update count to 11+ - New examples/equation_examples.py with 4 variants (dark, apple, corporate themes; CSS and Pretext rendering modes) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated dark and apple theme equation examples into the showcase directory so they render inline in the docs on GitHub. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
equationlayout type that renders equations as stacked, typographically rich graphics=,+,−,×,÷)Usage
CLI:
MCP:
{"layout": "equation", "theme": "dark", "args": {"equation": "Satisfaction = Perception - Expectation", "label": "The Satisfaction Gap", "footnote": "The gap is where churn lives."}}Test plan
🤖 Generated with Claude Code