Add source linter, negative test fixtures, and fallback guidance

- scripts/lint.py: reject raw rectangles, absolute coordinates, hue-budget
  and callout/group/formula-order violations at the source level
- tests/invalid/ + tests/lint-invalid/: negative fixtures proving the
  package and linter reject bad input; test.sh now runs both directions
- references/fallback.md: degraded path when no LaTeX is available
- tests/group-callout.tex: exercise \stgroup and \stcallout
- agents/openai.yaml: agent config
- Docs and .sty updated to match
This commit is contained in:
dela
2026-08-05 16:41:22 +08:00
parent 7b59c81d02
commit 866173a831
34 changed files with 786 additions and 54 deletions
+6 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Compile a supertensor figure and export every delivery artifact.
# Lint, compile, and export every delivery artifact for a supertensor figure.
#
# ./scripts/build.sh figure.tex [outdir]
#
@@ -23,6 +23,11 @@ OUT="${2:-$SRCDIR/build}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
mkdir -p "$OUT"
if [[ "${ST_SKIP_LINT:-0}" != "1" ]]; then
echo "==> lint $BASE"
python3 "$ROOT/scripts/lint.py" "$SRC"
fi
echo "==> xelatex $BASE"
# supertensor.sty lives in assets/; keep it off the user's texmf tree.
TEXINPUTS="$ROOT/assets:$SRCDIR:" \