feat: add superfig paper-figure toolkit

Standalone LaTeX/TikZ skill for non-tensor paper figures: node/edge
macros, lint-on-warning build, golden examples, and negative fixtures.
This commit is contained in:
dela
2026-08-17 09:40:12 +08:00
commit db5598fbf7
39 changed files with 1732 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
% A callout hanging off a node, not a band, must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\sfsetrole{x}{sfTeal}
\begin{document}\begin{tikzpicture}
\sfrow{R1}{10mm}
\sfnode[role=x]{A}{A}{12mm}{8mm}
\sfrowend
\sfcallout{N}{3cm}{A}{aside}{anchored to a node}
\end{tikzpicture}\end{document}
+14
View File
@@ -0,0 +1,14 @@
% A second callout in the figure must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\sfsetrole{x}{sfTeal}
\begin{document}\begin{tikzpicture}
\sfrow{R1}{10mm}
\sfnode[role=x]{A}{A}{12mm}{8mm}
\sfrowend
\sfrow{R2}{10mm}
\sfnode[role=x]{B}{B}{12mm}{8mm}
\sfrowend
\sfcallout{N1}{3cm}{R1}{one}{first}
\sfcallout{N2}{3cm}{R2}{two}{second}
\end{tikzpicture}\end{document}
+10
View File
@@ -0,0 +1,10 @@
% A callout inside an open row is a package error.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\sfsetrole{x}{sfTeal}
\begin{document}\begin{tikzpicture}
\sfrow{R1}{10mm}
\sfnode[role=x]{A}{A}{12mm}{8mm}
\sfcallout{N}{3cm}{R1}{t}{b}
\sfrowend
\end{tikzpicture}\end{document}
+7
View File
@@ -0,0 +1,7 @@
% An empty band must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\begin{document}\begin{tikzpicture}
\sfrow{R1}{10mm}
\sfrowend
\end{tikzpicture}\end{document}
+8
View File
@@ -0,0 +1,8 @@
% A group around one node is decoration and must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\sfsetrole{x}{sfTeal}
\begin{document}\begin{tikzpicture}
\sfnode[role=x, at={(0,0)}]{A}{A}{12mm}{8mm}
\sfgroup[role=x]{G}{(A)}{}
\end{tikzpicture}\end{document}
+9
View File
@@ -0,0 +1,9 @@
% A node taller than its band by more than 4mm must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\sfsetrole{x}{sfTeal}
\begin{document}\begin{tikzpicture}
\sfrow{R1}{8mm}
\sfnode[role=x]{A}{tall}{16mm}{16mm}
\sfrowend
\end{tikzpicture}\end{document}
+8
View File
@@ -0,0 +1,8 @@
% Remapping a role to a different color must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\sfsetrole{x}{sfTeal}
\sfsetrole{x}{sfOrange}
\begin{document}\begin{tikzpicture}
\sfnode[role=x, at={(0,0)}]{A}{A}{12mm}{8mm}
\end{tikzpicture}\end{document}
+6
View File
@@ -0,0 +1,6 @@
% An undeclared role falls back to gray and must dirty the build.
\documentclass[border=2pt]{standalone}
\usepackage[en]{superfig}
\begin{document}\begin{tikzpicture}
\sfnode[role=ghost, at={(0,0)}]{A}{A}{12mm}{8mm}
\end{tikzpicture}\end{document}