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:
dela
2026-08-17 10:05:03 +08:00
commit 9f635d358b
22 changed files with 724 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Exit 0 full, 1 degraded, 2 no LaTeX.
set -uo pipefail
QUIET=0
[[ "${1:-}" == "--quiet" ]] && QUIET=1
say() { [[ $QUIET -eq 1 ]] || echo -e "$*"; }
ok=0; warn=0; fail=0
check() {
local name="$1"; shift
if "$@" >/dev/null 2>&1; then say " ok $name"; return 0
else say " MISS $name"; return 1; fi
}
say "superderive preflight"
say "--- required ---"
check "xelatex" command -v xelatex || fail=$((fail+1))
check "standalone.cls" kpsewhich standalone.cls || fail=$((fail+1))
check "tikz.sty" kpsewhich tikz.sty || fail=$((fail+1))
check "etoolbox.sty" kpsewhich etoolbox.sty || fail=$((fail+1))
say "--- chinese figures ---"
check "ctex.sty" kpsewhich ctex.sty || warn=$((warn+1))
check "fandol" kpsewhich FandolSong-Regular.otf || warn=$((warn+1))
say "--- export ---"
check "pdftocairo" command -v pdftocairo || warn=$((warn+1))
if [[ $fail -gt 0 ]]; then say "RESULT: no LaTeX."; exit 2; fi
if [[ $warn -gt 0 ]]; then say "RESULT: degraded."; exit 1; fi
say "RESULT: full path."
exit 0