| name | quon-latex-graphs |
| description | Use when plotting Quon-language diagrams in LaTeX/TikZ, building reusable Quon graph figures, checking TeX Live/BasicTeX setup, compiling pdflatex demos, or extracting visual patterns from Quons LaTeX sources such as arXiv:1612.02630. |
Quon LaTeX Graphs
Overview
Use this skill to draw general Quon-language diagrams in LaTeX/TikZ. It provides assets/quon.sty for reusable plotting macros, plus lib.typ as a Typst mirror harness for screening the LaTeX visual grammar. It also covers TeX environment checks, arXiv source builds, PDF rendering, and extraction of TikZ idioms that downstream renderers such as Typst should match.
Quick Start
- Use
/Library/TeX/texbin explicitly in Codex shells:
PATH=/Library/TeX/texbin:$PATH pdflatex --version
- Use the plotting asset from a LaTeX document:
\input{skills/quon-latex-graphs/assets/quon.sty}
\quonChargedPair{$k$}{$-k$}
\quonStateThree{$v_1$}{$v_2$}{$v_3$}
\quonCNOT
- Use the Typst mirror library when an agent needs to preview or screen LaTeX-derived plot grammar inside a Typst report:
#import "skills/quon-latex-graphs/lib.typ": *
#latex-quon-state(n: 3, labels: ($v_1$, $v_2$, $v_3$))
#latex-cnot()
-
Follow the general demo in reports/quon-latex-demo.tex.
-
Check the local TeX environment before compiling paper sources:
python3 skills/quon-latex-graphs/scripts/check-latex-environment.py
- Build the primary Quons source when you need a paper-faithful reference:
mkdir -p /private/tmp/quon-latex-build
PATH=/Library/TeX/texbin:$PATH pdflatex -interaction=nonstopmode -halt-on-error -output-directory /private/tmp/quon-latex-build /private/tmp/quon-sources/1612.02630/Quons-Arxiv-v3.tex
- Consult
references/latex-plotting-patterns.md when extracting paper-style graph grammar for another renderer.
Plotting Families
The LaTeX asset is intended for general usage, not only figures from one paper. Use the semantic macros as building blocks:
- charged strings and crossings:
\quonChargedPair, \quonCrossing
- shells, states, transformations, and joint relations:
\quonShellAt, \quonStateThree, \quonTransformation, \quonJointRelation
- bases and gates:
\quonBasisZ, \quonBasisX, \quonBasisY, \quonPauliLine, \quonCliffordF, \quonCliffordG, \quonCNOT
- protocols and algebra:
\quonBells, \quonTeleportation, \quonSpider, \quonSurfaceTangle
Source Set
Prioritize arXiv:1612.02630 and Quons-Arxiv-v3.tex. Use related Quons-language sources when extending coverage:
1602.02671
1611.06447
1703.01302
1707.03995
1910.12065
2505.07804
Build Notes
- The machine may have BasicTeX installed but not on
PATH; prefer PATH=/Library/TeX/texbin:$PATH.
- If
pdflatex finds missing packages, initialize user mode once with tlmgr init-usertree, then install packages with tlmgr --usermode install <package>.
- Known packages used by the Quons source include
xypic, braket, doi, and breakurl.
- Warnings about duplicate equation destinations and PDF string tokens occur in the original source and do not block graph extraction when
pdflatex exits 0.
Extraction Rules
- Treat LaTeX/TikZ as the reference implementation for visual grammar.
- Extract semantic patterns before coordinates: world-line style, hidden/back arcs, endpoint ticks, crossing order, labels, and color roles.
- Record reusable observations in
references/latex-plotting-patterns.md.
- Hand off renderer-neutral findings to
quon-typst-graphs rather than putting Typst implementation details in this skill.
Validation
Use these commands before claiming the LaTeX reference build is usable:
python3 skills/quon-latex-graphs/scripts/check-latex-environment.py
python3 skills/quon-latex-graphs/scripts/check-latex-plotting.py
python3 skills/quon-latex-graphs/scripts/build-harness.py
PATH=/Library/TeX/texbin:$PATH pdflatex -interaction=nonstopmode -halt-on-error -output-directory reports reports/quon-latex-demo.tex
PATH=/Library/TeX/texbin:$PATH pdflatex -interaction=nonstopmode -halt-on-error -output-directory /private/tmp/quon-latex-build /private/tmp/quon-sources/1612.02630/Quons-Arxiv-v3.tex