feat: add superderive stepwise derivation figures
A third sibling toolkit: rewrite steps, justification rails, cancel/substitute highlights, and lint-on-warning builds.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Antipatterns
|
||||
|
||||
- Drawing a rewrite as `\sfnode` boxes.
|
||||
- A new hue per step.
|
||||
- Two illegal/legal pairs in one figure.
|
||||
- Formula placed before the last row so it centers on an unknown width.
|
||||
@@ -0,0 +1,7 @@
|
||||
# API
|
||||
|
||||
`\usepackage[cjk]{superderive}` or `[en]`.
|
||||
|
||||
Layout: `\sdstage{n}{text}` `\sdrow[height]{name}` … `\sdrowend` `\sdbbox{all}` `\sdtopformula{F}{math}`.
|
||||
|
||||
Call `\sdtopformula` after the last `\sdrowend`.
|
||||
@@ -0,0 +1,7 @@
|
||||
# Checklist
|
||||
|
||||
- Each step is one rewrite. Reasons sit on the rail, not on the shaft.
|
||||
- Cancel/subst encode the actual cancelled or replaced term.
|
||||
- At most one `\sdcol`. At most four active hues plus gray.
|
||||
- No raw `\draw`. Formula after the last row.
|
||||
- Clean `build.sh` (missing glyphs, overfull, package warnings).
|
||||
@@ -0,0 +1,3 @@
|
||||
# Fallback
|
||||
|
||||
`preflight.sh` 0/1/2 matches superfig. Exit 2: no XeLaTeX. Exit 1: no CJK or no pdftocairo.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Grammar
|
||||
|
||||
| Fact | Macro |
|
||||
|---|---|
|
||||
| one legal rewrite | `\sdstep[role=rewrite]{name}{lhs}{rhs}` |
|
||||
| why it is legal | `\sdreason{name}{text}` |
|
||||
| a cancelled term | `\sdcancel{name}{math}` |
|
||||
| substitution | `\sdsubst{name}{from}{to}` |
|
||||
| focus box | `\sdbox[role=keep]{name}{math}` |
|
||||
| illegal vs legal | `\sdcol{name}{bad}{good}` (one per figure) |
|
||||
| bottom | `\sdmeaningbox` (idea / rewrite / caveat) |
|
||||
|
||||
Built-in roles: `keep` `rewrite` `cancel` `intro` `warn` `neutral`.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Layout
|
||||
|
||||
Place by cursor inside `\sdrow` … `\sdrowend`. Never hand-tune a neighbour with a magic offset. If a reason does not fit, move the step to the next row.
|
||||
@@ -0,0 +1,3 @@
|
||||
# Style
|
||||
|
||||
Palette `sdTeal #4F8FA5` `sdOrange #EE995B` `sdCoral #C95B5B` `sdViolet #8A74B5` `sdGray #85898F`. One hue per role. ≤4 active hues plus gray. Lightness `30/55/80`.
|
||||
Reference in New Issue
Block a user