Beamer Slide Workflow
Universal skill for academic Beamer presentations. Full lifecycle:
create → compile → review → polish → verify.
0. REFERENCE PREAMBLE
When creating new slides, use this as the default preamble unless the user has a custom template.
\documentclass[aspectratio=169,10pt]{beamer}
\usetheme{Madrid}
\usecolortheme{default}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[frame number]
\usepackage{amsmath,amssymb,amsthm,booktabs,mathtools}
\usepackage{stmaryrd} % for \llbracket, \rrbracket
\usepackage{graphicx} % for \includegraphics (extracted figures)
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning,decorations.pathreplacing}
% Semantic colors — use in BOTH text and TikZ for global consistency
\definecolor{positive}{HTML}{0173B2} % blue (correct, advantage)
\definecolor{negative}{HTML}{DE8F05} % orange (limitation, drawback)
\definecolor{emphasis}{HTML}{029E73} % green (highlight, key finding)
\definecolor{neutral}{gray}{0.55} % muted context
\definecolor{cbPurple}{HTML}{CC78BC} % additional accent
\newcommand{\pos}[1]{\textcolor{positive}{#1}}
\newcommand{\con}[1]{\textcolor{negative}{#1}}
\newcommand{\HL}[1]{\textcolor{emphasis}{#1}}
Rules:
- Always
10pt — 11pt or 12pt produces oversized, sparse slides.
- Always
aspectratio=169 — modern projectors are 16:9.
- Default presenter:
\author{Presenter: [name]} and \institute{Shanghai Jiao Tong University}. Override only if user specifies otherwise.
- If user provides a custom preamble, header file, or theme: use theirs.
- Add domain-specific macros (e.g.
\newcommand{\F}{\mathbb{F}}) as needed.
- Algorithm/code packages (add only when needed):
- Algorithms:
\usepackage[ruled,lined]{algorithm2e} — set \SetAlgoLined, \DontPrintSemicolon
- Code listings:
\usepackage{listings} — set basicstyle=\ttfamily\small, keywordstyle=\bfseries\color{positive}, commentstyle=\color{neutral}. Max 10 lines of code per slide; highlight key lines with escapeinside={(*@}{@*)} and \colorbox.
- Pseudocode:
\usepackage{algorithmic} — simpler than algorithm2e, suitable for short procedures.
- Data plotting (add only when needed):
\usepackage{pgfplots} + \pgfplotsset{compat=1.18} — data-driven plots (bar, scatter, error bars, histograms). Far more efficient than manual TikZ coordinate plots for data visualization.
\usepackage{subcaption} — multiple subfigures in one frame via \begin{subfigure}{0.48\textwidth}.
- Theorem environments: Beamer provides
theorem, lemma, corollary, definition, example, proof out of the box (styled by the theme). Use them for formal statements — they get automatic numbering and consistent styling. Customize with \setbeamertemplate{theorems}[numbered] or [ams style].
1. HARD RULES (Non-Negotiable)
- No overlays — never use
\pause, \onslide, \only, \uncover. Use multiple slides for progressive builds, color emphasis for attention. Common replacement patterns:
- Progressive formula build-up: slide A shows the base equation, slide B copies it and adds the next term (grayed-out terms from slide A stay as context). Copy-paste the full frame and extend.
- Step-by-step list reveal: slide A shows items 1-2, slide B shows 1-4 (items 1-2 repeated). Use
\textcolor{neutral}{} on previously-shown items to mute them.
- Diagram incremental build: slide A shows the base structure, slide B adds annotations/edges. Duplicate the
tikzpicture and append new elements — never delete prior elements.
- Max 2 colored boxes per slide — more dilutes emphasis. Demote transitional remarks to plain italic.
- Motivation before formalism — every concept starts with "Why?" before "What?".
- Worked example within 2 slides of every definition.
- XeLaTeX only — never pdflatex.
- Beamer .tex is the single source of truth — TikZ diagrams, content, notation all originate here.
- Verify after every task — compile, check warnings, open PDF.
- Telegraphic style — keyword phrases, not full sentences. Slides are speaker prompts, not manuscripts. Exception: framing sentences that set up a definition or transition. Each bullet item should be ≤2 lines (~15 words) — if longer, split into sub-items or rewrite more concisely.
- Every slide earns its place — each slide must contain at least one substantive element (formula, diagram, table, theorem, or algorithm). A slide with only 3 short bullets and nothing else must be merged or enriched.
- Box-interior overflow guard —
alertblock, exampleblock, and block environments add internal padding (~15% less width, ~12-16pt extra height for title bar + vertical padding). Content that fits on a bare slide can overflow inside a box in both directions. Rules:
- Vertical overflow (most common, hardest to detect): display math (
\[ \]) + text below it inside a single box easily exceeds vertical capacity. Limit box content to one display equation OR 2-3 short bullet items — not both. Never use aggressive \vspace{-Xpt} inside a box; it pulls bottom content past the border.
- Horizontal overflow: never use
\qquad inside a box; use \quad or ,. If a display equation is wider than ~70% of \textwidth on a bare slide, reformat before placing inside a box.
- Beamer suppresses overfull warnings inside blocks — zero compile warnings does NOT guarantee no visual overflow. Always visually verify every box in the PDF.
- Reference slide — the second-to-last slide (before Thank You) must be a References slide listing key cited works. Use
\begin{thebibliography}{9} with \small. Include the primary paper and 3-5 most relevant references.
- Color and contrast standards — text-background contrast ratio ≥ 4.5:1 (WCAG AA). Never use red+green for binary contrasts (color blindness affects ~8% of men). Prefer blue+orange. Semantic color commands defined in preamble:
\pos{} = positive/correct (blue), \con{} = negative/limitation (orange), \HL{} = emphasis/key finding (green), \textcolor{neutral}{} = de-emphasized. These are color-blind safe. Limit total palette to 3-5 colors.
- Visual hierarchy in font sizes — slide title: 20-24pt (beamer default), key findings/theorems: normal size with
\textbf, supporting text: normal, labels/captions: \small minimum. Never use \tiny for any user-facing content.
- Backup slides — after the Thank You slide, include 3-5 backup slides for anticipated questions. Use
\appendix before backup section. Separate from main deck with a \begin{frame}{Backup Slides}\end{frame} divider. Backup slides should NOT count toward the timing allocation. Content to include (derive from Phase 0 material analysis):
- Full proof of the main theorem (if only a sketch was shown in the main deck)
- Parameter choices / security analysis details (for crypto/protocol papers)
- Extended comparison table with additional baselines
- Experimental setup details (hardware, hyperparameters, datasets)
- Definitions of prerequisites that were assumed known (in case someone asks)
- Columns layout — use
\begin{columns}[T] + \column{W\textwidth} for side-by-side content. Rules:
- Comparison / parallel content: two columns at
0.48\textwidth each (leave 0.04 gap).
- Figure + text: figure column
0.45-0.55, text column 0.40-0.50, gap 0.05.
- Three columns maximum: each
≤ 0.30\textwidth, only for short items (icons, stats, one-liners).
- Never nest columns inside columns.
- Always use
[T] (top-align) unless deliberately centering.
- Columns content follows the same density constraints as regular slides.
2. ACTIONS
Parse $ARGUMENTS to determine which action to run. If no action specified, ask.
2.1 compile [file]
3-pass XeLaTeX + bibtex for full citation resolution.
# Adapt TEXINPUTS/BIBINPUTS to your project's preamble/bib locations
xelatex -interaction=nonstopmode FILE.tex
bibtex FILE
xelatex -interaction=nonstopmode FILE.tex
xelatex -interaction=nonstopmode FILE.tex
Post-compile checks:
- Grep log for
Overfull \\hbox warnings (count and locations)
- Grep for
Undefined control sequence or undefined citations
- Grep for
Label(s) may have changed
- Open PDF for visual verification
- Report: success/failure, overfull count, undefined items, page count
2.2 create [topic]
Collaborative, iterative lecture creation. Strict phase gates — never skip ahead.
Phase 0: Material Analysis (if papers/materials provided)
Read first, ask later. Must understand the content before asking meaningful questions.
- Accept
.pdf, .md, or mixed paper/material inputs.
- If Markdown is provided, use it as the primary semantic source for section hierarchy, equations, theorem statements, captions, references, and notation.
- If both Markdown and PDF are provided, use Markdown for structure/text understanding and use the PDF for figures, page context, visual reference, and extraction.
- If only a PDF is provided and parsing loses structure, ask whether the user can provide a Markdown conversion. Do not require or run a specific PDF-to-Markdown converter.
- Read the full paper/materials thoroughly
- Extract: core contribution, key techniques, main theorems, comparison with prior work
- Map notation conventions
- Identify the paper's logical structure and which parts are slide-worthy
- Internally note: prerequisite knowledge, natural section boundaries, what could be skipped or expanded
Do NOT present results or ask questions yet — proceed directly to Phase 1.
Phase 1: Needs Interview (MANDATORY — informed by Phase 0)
Conduct a content-driven interview via AskUserQuestion. The questions below are the minimum required set — you MUST also add paper-specific questions derived from Phase 0.
Minimum required questions (always ask):
- Duration: How long is the presentation?
- Audience level: Who are the listeners?
Optional question (ask when the talk is a journal club, defense, or user seems to want rehearsal support):
3. Speaker notes: Would you like speaker notes in the Presenter View? If yes, \note{} blocks will be added per frame with telegraphic talking points (key message, transition cue, anticipated questions). Requires adding \setbeameroption{show notes on second screen=right} to the preamble for dual-screen display.
Content-driven questions (derive from Phase 0, ask as many as needed):
- Prerequisite knowledge: List concrete technical dependencies identified in Phase 0. Ask which ones the audience knows. E.g., "The paper builds on sumcheck and polynomial commitments. Should I review these?" — not "familiar with basic algebra?".
- Content scope: Offer the paper's actual components as options. Ask which to emphasize, skip, or briefly mention.
- Depth vs. breadth: If the paper has both intuitive overview and detailed constructions, ask which the user prefers.
- Paper-specific decisions: E.g., if the paper compares two constructions, ask whether to present both equally or focus on one.
Guidelines:
- Options should come from the paper's actual content, not generic templates.
- 3-6 questions total; don't over-ask, don't under-ask.
- If something is obvious from context (e.g., user said "讨论班"), infer rather than ask.
Slide count heuristic: ~1 slide per 1.5-2 minutes.
Timing allocation table:
| Duration |
Total slides |
Intro/Motivation |
Methods/Background |
Core content |
Summary/Conclusion |
| 5min (lightning) |
5-7 |
1-2 |
0-1 |
2-3 |
1 |
| 10min (short) |
8-12 |
2 |
1-2 |
4-5 |
1 |
| 15min (conference) |
10-15 |
2-3 |
2-3 |
5-7 |
1-2 |
| 20min (seminar) |
13-18 |
3 |
2-3 |
6-9 |
2 |
| 45min (keynote) |
22-30 |
4-5 |
5-7 |
10-14 |
2-3 |
| 90min (lecture) |
45-60 |
5-6 |
8-12 |
25-35 |
3-4 |
Talk-type specific tips:
| Talk type |
Key emphasis |
Common mistake |
| Lightning (5min) |
One core message, no background review |
Cramming a full talk into 5 minutes |
| Conference (10-20min) |
1-2 key results, fast methods overview |
Too much technical detail, no big picture |
| Seminar (45min) |
Deep dive OK, but need visual rhythm |
Wall-to-wall formulas without examples |
| Defense/Thesis |
Demonstrate mastery, systematic coverage |
Skipping motivation, rushing results |
| Journal club |
Critical analysis, facilitate discussion |
Summarizing without evaluating |
| Grant pitch |
Significance → feasibility → impact |
Too technical, not enough "why it matters" |
Time distribution principle: Spend 40-50% of time on core content (results/techniques). Max 3-4 consecutive theory-heavy slides before a worked example or visual break.
Phase 2: Structure Plan (GATE — user must approve before drafting)
Produce a detailed outline. For each section:
- Section title
- Number of slides allocated
- Key content points per slide (1-2 lines each)
- TikZ diagrams or figures planned (brief description)
- Notation to introduce
Present the plan to the user. Ask: structure OK? Expand/shrink/cut anything?
Do NOT proceed to drafting until user approves.
Phase 3: Draft (iterative, batched)
This phase is the most critical. Follow all sub-rules strictly.
3a. Writing Style
- Telegraphic keywords, not full sentences. Exception: one framing sentence per slide to set context.
- Formulas and analysis interleave tightly — define a quantity, then immediately state its cost/property/implication on the same slide. Never isolate a formula on one slide and its analysis on the next.
- No conversational hedging — never write "wait, not exactly", "actually, let me clarify", or similar. If a point needs qualification, state it precisely from the start.
- Use
\textbf{} for key terms on first introduction; use \pos{...} for positive properties, \con{...} for drawbacks/limitations, \HL{...} for key findings (defined in preamble).
3a-2. Opening and Closing Strategies
Opening slide (pick one strategy):
- Surprising statistic — a counter-intuitive number that challenges assumptions
- Provocative question — something the audience cannot immediately answer
- Real-world failure/problem — "System X failed because..." → "How do we prevent this?"
- Visual demonstration — show the phenomenon before explaining it
The opening should create tension or curiosity that the rest of the talk resolves.
Closing strategies:
- Call-back to opening — revisit the opening question/problem, now answered (circular narrative)
- 3 key takeaways — numbered, telegraphic, one slide. The audience remembers the last thing they see.
- Open question / future direction — leave the audience thinking, naturally invites Q&A
- Never end on a bare "Thank You" — the second-to-last content slide should deliver the lasting impression. The Thank You slide is a courtesy, not the conclusion.
3b. Mathematical Slide Patterns
Each math-heavy slide should follow one of these patterns:
Definition slide:
[Framing sentence: why this definition matters]
[Formal definition in display math]
[Key properties / immediate consequences as 2-3 bullet items]
Construction/Algorithm slide:
[One-line goal statement]
[Core equation / algorithm steps]
[Complexity analysis: prover cost, verifier cost, soundness]
Comparison slide:
[Side-by-side table: prior work vs this work]
[1-2 lines highlighting the key difference]
Insight/Remark slide (adds value beyond the paper):
[Observation the paper doesn't emphasize, or a comparison with related work]
[Why this matters / what it implies]
Every slide must have a clear takeaway — the one thing the audience should remember.
Theorem/Proof slide (for formal mathematical statements):
[Framing sentence: informal statement of the result]
\begin{theorem}[Optional name]
[Formal statement in display math]
\end{theorem}
[Key implication or "why this matters" as 1-2 bullets]
- Proof on the next slide (never cramming theorem + proof on one slide).
- For long proofs: show proof sketch (key steps only), put full proof in backup slides.
- Use
\begin{proof}[Proof sketch] to signal abbreviated proofs.
Cross-referencing between slides:
- Label key slides with
\label{slide:construction} inside the frame.
- Reference from other slides:
see Slide~\ref{slide:construction} or clickable \hyperlink{slide:construction}{\beamerbutton{Back to Construction}}.
- Especially useful for Q&A — quickly jump back to a referenced result.
- In backup slides, always hyperlink back to the main slide that motivates them.
3c. Content Density Constraints
Upper bounds (per slide):
- ≤ 7 bullet points or items
- ≤ 2 displayed equations (more → split)
- ≤ 5 new symbols introduced
- ≤ 2 colored boxes (alertblock/exampleblock)
Lower bounds (per slide):
- Each slide MUST contain at least one substantive element: a formula, diagram, table, theorem statement, or algorithm
- A slide with only ≤ 3 short text-only bullets is too sparse — merge with an adjacent slide or add a formula/diagram
- Pure text-only bullet slides should be ≤ 30% of the total deck
Density self-check after each batch:
- Count slides that have zero formulas/diagrams/tables → flag if > 30% of batch
- Count slides with ≤ 3 short items and no math → candidates for merging
3d. Batch Workflow
- Work in batches of 5-10 slides, following the approved structure
- After each batch, compile (
xelatex -interaction=nonstopmode) to catch errors early — fixing 2 issues in a 10-slide batch is far cheaper than fixing 12 issues in a 40-slide deck at Phase 5
- After each batch, self-check: notation consistency, density constraints, motivation-before-formalism
- Continue to next batch only after current batch compiles cleanly and passes self-check
3e. Table Best Practices
- Always center tables — wrap every standalone table in
\begin{center}...\end{center}. Left-aligned tables look misaligned on slides.
- Never place a table immediately after the frame title — themes like Madrid have a colored title bar whose bottom edge visually merges with
\toprule, making the table appear embedded in the title. Always insert \vspace{4pt} (or introductory text) between the title and the first \toprule. The compiler emits zero warnings for this — it can only be caught by visual inspection.
- Always use
booktabs (\toprule, \midrule, \bottomrule) — never vertical lines (|).
- Column alignment: numbers right-aligned (
r), text left-aligned (l), short labels centered (c).
- Max 6-7 columns, 8-10 rows per slide. More → split across slides following these pagination rules:
- Each continuation slide repeats the full header row (
\toprule + header + \midrule).
- Append " (cont'd)" to the frame title:
\frametitle{Results (cont'd)}.
- Split at logical row group boundaries (e.g., between algorithm families, dataset groups) — never mid-group.
- Last page must have ≥3 data rows; if fewer, merge with the previous page.
- Each page gets its own takeaway line below the table if the subset tells a different story.
- Use
\resizebox{\textwidth}{!}{...} only as last resort — prefer reducing columns/rows first.
- Highlight key cells with
\cellcolor{positive!15} or \textbf{} — draw the eye to the result.
- For comparison tables: bold the best result in each row/column.
- Caption below table in
\small, or use the frame title as the implicit caption.
3f. Algorithm and Code Display
- Pseudocode ≤ 10 lines per slide. If longer, split into "high-level overview" and "key subroutine" slides.
- Highlight the critical line(s): use
escapeinside in listings or \colorbox in algorithm2e.
- Input/output clearly stated at the top of the algorithm.
- Use consistent naming: variables in math italic (
$x$), functions in sans-serif or typewriter.
- For code (not pseudocode):
\ttfamily\small, syntax highlighting via listings. Show only the relevant fragment — never dump an entire source file.
Phase 4: Figures
- TikZ diagrams in Beamer source (single source of truth)
- Apply TikZ quality standards (see Section 2.6)
- R/Python scripts if needed
Data visualization guidelines (journal figures ≠ slide figures):
pgfplots for data-driven figures (preferred over manual TikZ for data):
Use pgfplots whenever plotting numerical data. It handles axes, legends, scaling, and data loading automatically.
% Bar chart from inline data
\begin{tikzpicture}
\begin{axis}[
ybar, bar width=12pt,
xlabel={Method}, ylabel={Accuracy (\%)},
symbolic x coords={Baseline, Ours, Oracle},
xtick=data, ymin=0, ymax=100,
nodes near coords, every node near coord/.append style={font=\small},
width=0.85\textwidth, height=5cm
]
\addplot coordinates {(Baseline,72) (Ours,89) (Oracle,95)};
\end{axis}
\end{tikzpicture}
% Line plot from CSV file
\begin{tikzpicture}
\begin{axis}[
xlabel={Epoch}, ylabel={Loss},
legend pos=north east, grid=major,
width=0.85\textwidth, height=5cm
]
\addplot table[x=epoch, y=train_loss, col sep=comma] {data/results.csv};
\addplot table[x=epoch, y=val_loss, col sep=comma] {data/results.csv};
\legend{Train, Validation}
\end{axis}
\end{tikzpicture}
% Scatter plot with error bars
\begin{axis}[xlabel={$x$}, ylabel={$y$}]
\addplot+[only marks, error bars/.cd, y dir=both, y explicit]
coordinates {(1,2)+-(0,0.3) (2,3.5)+-(0,0.5) (3,5.1)+-(0,0.4)};
\end{axis}
- Always set explicit
width and height to prevent overflow.
- Use
\addplot table[col sep=comma]{file.csv} to load data from file — keeps .tex clean.
- For presentation: enlarge tick labels (
tick label style={font=\small}), thicken lines (thick), use semantic colors (color=positive).
Phase 5: Quality Loop (MANDATORY — iterative)
After completing the full draft, enter the quality loop:
┌─→ 5a. Compile (2-pass XeLaTeX)
│ 5b. Self-Review (structure + content + visual)
│ 5c. Score (apply rubric)
│ 5d. Fix all issues found
└── If score < 90 and round < 3: loop back to 5a
If score ≥ 90 or round = 3: report to user
5a. Compilation
- 2-pass XeLaTeX compilation (bibtex not needed here — already resolved in Phase 3 batch compiles)
- Check: errors, overfull hbox, undefined references
- Open PDF for visual inspection
5b. Self-Review — re-read the .tex and verify:
Structure:
Content density:
TikZ and visuals:
Notation:
5c. Quality Score
Start at 100. Deduct:
| Severity |
Issue |
Deduction |
| Critical |
Compilation failure |
-100 |
| Critical |
Equation overflow (slide or box-interior) |
-20 |
| Critical |
TikZ diagram overflows slide boundary (clipped at bottom/right) |
-15 per diagram |
| Critical |
Undefined control sequence / citation |
-15 |
| Critical |
Overfull hbox > 10pt |
-10 |
| Major |
Content overflow inside colored box (vertical or horizontal, visual-only) |
-10 per box |
| Major |
TikZ marked points not on curve (hardcoded y-values instead of computed) |
-8 per diagram |
| Major |
Sparse slide (≤3 items, no math/diagram) |
-5 per slide |
| Major |
TikZ label overlap |
-5 |
| Major |
Missing references slide |
-5 |
| Major |
Table not centered (standalone table without \begin{center}) |
-3 per table |
| Major |
Table \toprule visually merged with title bar (no spacing after frame title) |
-5 per slide |
| Major |
Notation inconsistency |
-3 |
| Minor |
\vspace overuse (>3 per slide) |
-1 |
| Minor |
Font size reduction (\footnotesize etc.) |
-1 per slide |
Thresholds:
- ≥ 90: Ready to deliver. Report to user.
- 80-89: Acceptable. Fix remaining majors if possible, report with caveats.
- < 80: Must fix. Loop back and resolve critical/major issues.
5d. Fix — fix all critical and major issues. Re-compile. If score improves to ≥ 90, exit loop. Max 3 rounds to avoid infinite loops.
Post-Creation Checklist (final gate)
[ ] Compiles without errors
[ ] No overfull hbox > 10pt
[ ] All citations resolve
[ ] Score ≥ 90
[ ] Every definition has motivation + worked example
[ ] Max 2 colored boxes per slide
[ ] No sparse slides (all slides have substantive content)
[ ] TikZ diagrams visually verified — no overlaps, no overflow, all marked points on curves
[ ] Tables fit within slide boundaries, are centered, and separated from title bar
[ ] No content overflow inside colored boxes (visual PDF check)
[ ] References slide present (second-to-last, before Thank You)
2.3 review [file] or proofread [file]
Read-only report, no file edits.
5 check categories:
| Category |
What to check |
| Grammar |
Subject-verb, articles, prepositions, tense consistency |
| Typos |
Misspellings, search-replace artifacts, duplicated words, unreplaced placeholders ([name], [TODO], [XXX], template remnants) |
| Overflow |
Long equations without \resizebox, too many items per slide |
| Consistency |
Citation format (\citet/\citep), notation, terminology, box usage, denominator consistency across slides |
| Academic quality |
Informal abbreviations, missing words, claims without citations, ambiguous abbreviations (same abbreviation for different terms) |
Report format per issue:
### Issue N: [Brief description]
- **Location:** [slide title or line number]
- **Current:** "[exact text]"
- **Proposed:** "[fix]"
- **Category / Severity:** [Category] / [High|Medium|Low]
2.4 audit [file]
Visual layout audit. Read-only report.
Check dimensions:
- Overflow: Content exceeding boundaries, wide tables/equations
- Font consistency: Inline size overrides, inconsistent sizes
- Box fatigue: 2+ boxes per slide, wrong box types
- Spacing:
\vspace overuse, structural issues
- Layout: Missing transitions, missing framing sentences
Spacing-first fix principle (priority order):
- Reduce vertical spacing (structural changes)
- Consolidate lists
- Move displayed equations inline
- Reduce image/table size with
\resizebox
- Last resort:
\footnotesize (never \tiny)
2.5 pedagogy [file]
Holistic pedagogical review. Read-only report.
13 patterns to validate:
| # |
Pattern |
Red flag |
| 1 |
Motivation before formalism |
Definition without context |
| 2 |
Incremental notation |
5+ new symbols on one slide |
| 3 |
Worked example after definition |
2 consecutive definitions, no example |
| 4 |
Progressive complexity |
Advanced concept before prerequisite |
| 5 |
Fragment reveals (problem→solution) |
Dense theorem revealed all at once |
| 6 |
Standout slides at pivots |
Abrupt topic jump, no transition |
| 7 |
Two-slide strategy for dense theorems |
Complex theorem crammed in 1 slide |
| 8 |
Semantic color usage |
Binary contrasts in same color |
| 9 |
Box hierarchy |
Wrong box type for content |
| 10 |
Box fatigue |
3+ boxes on one slide |
| 11 |
Socratic embedding |
Zero questions in entire deck |
| 12 |
Visual-first for complex concepts |
Notation before visualization |
| 13 |
Side-by-side for comparisons |
Sequential slides for related definitions |
Deck-level checks: Narrative arc, pacing (max 3-4 theory slides before example), visual rhythm (section dividers every 5-8 slides), notation consistency, student prerequisite assumptions.
2.6 tikz [file]
TikZ diagram review and extraction.
Quality standards:
Labels NEVER overlap with curves, lines, dots, or other labels
When two labels are near the same vertical position, stagger them
Visual semantics: solid=observed, dashed=counterfactual, filled=observed, hollow=counterfactual
Line weights: axes=thick, data=thick, annotations=thick (not very thick)
Standard scale: [scale=1.1] for full-width diagrams
Dot radius: 4pt for data points
Minimum 0.2 units between any label and nearest graphical element
Mathematical accuracy of plotted points: NEVER hardcode y-coordinates for points, markers, or dashed-line endpoints that should lie on a plotted curve. ALL such coordinates must be computed from the SAME function used to draw the curve via \pgfmathsetmacro. This applies to:
- Points marked on a single curve (e.g., labeled special values like "BiPerm at ℓ=2")
- Dashed vertical/horizontal lines that terminate at a curve
- Intersections of two curves
- Any annotation anchored to a curve position
Common mistake (WRONG — hardcoded y that doesn't match the curve):
\draw[thick] plot[domain=0.8:10] (\x, {0.3*\x + 2.7/\x});
\draw[dashed] (2, 0) -- (2, 3.2); % BAD: 3.2 is not 0.3*2+2.7/2=1.95
\node at (2, 3.2) {BiPerm}; % BAD: label floats above the curve
Correct pattern (ALWAYS compute from the function):
\draw[thick] plot[domain=0.8:10] (\x, {0.3*\x + 2.7/\x});
\pgfmathsetmacro{\yTwo}{0.3*2 + 2.7/2} % = 1.95, exactly on curve
\draw[dashed] (2, 0) -- (2, \yTwo);
\fill (2, \yTwo) circle (2pt);
\node[above left] at (2, \yTwo) {BiPerm};
For curve intersections, solve the system algebraically first, then encode the exact formula:
% Intersection of y=0.5x and y=2.5/x+0.3:
% 0.5x = 2.5/x + 0.3 => x^2 - 0.6x - 5 = 0 => x = (0.6+sqrt(20.36))/2
\pgfmathsetmacro{\xint}{(0.6 + sqrt(20.36))/2}
\pgfmathsetmacro{\yint}{0.5*\xint}
\fill (\xint, \yint) circle (3pt);
TikZ diagram sizing on mixed-content slides: a TikZ diagram sharing a slide with text/equations MUST fit in the remaining vertical space. Beamer 16:9 at 10pt has ~70mm usable height below the title bar. Before writing the TikZ code, estimate:
- Text + equations above the diagram: count displayed equations (each
12-15mm) + text lines (5mm each) + spacing
- Remaining height = 70mm − text height
- TikZ bounding box height = (max y-coordinate − min y-coordinate) × yscale × 0.3528mm/pt
- If the diagram won't fit: reduce
yscale, shrink coordinate ranges, or move content to a separate slide
Safe defaults for mixed slides: xscale=0.5-0.7, yscale=0.4-0.6. For full-slide diagrams: scale=0.9-1.1.
Edge labels on short arrows: when placing node[midway, above] labels on arrows between boxes, the label text can extend past the arrow endpoints into adjacent box borders. Prevention rules:
- Estimate label text width vs. arrow length (
right= gap). If the label is wider than ~80% of the gap, increase the gap or shrink the label font (\scriptsize / \tiny).
- Use
above=4pt (or more) instead of bare above to add vertical clearance between label and box border.
- For flow diagrams with 3+ boxes: total width = (N × box width) + ((N-1) × gap). Must stay ≤ 14cm for 16:9 beamer. Adjust box
text width and gap together.
- When in doubt, compile and visually verify that no label overlaps any box border.
Extraction to SVG (for web/Quarto use):
xelatex -interaction=nonstopmode extract_tikz.tex
PAGES=$(pdfinfo extract_tikz.pdf | grep "Pages:" | awk '{print $2}')
for i in $(seq 1 $PAGES); do
idx=$(printf "%02d" $((i-1)))
pdf2svg extract_tikz.pdf tikz_exact_$idx.svg $i
done
TikZ checklist:
[ ] No label-label overlaps
[ ] No label-curve overlaps
[ ] No edge labels overlapping adjacent nodes (check label width vs. arrow length)
[ ] Diagram bounding box fits within remaining slide space (especially mixed text+diagram slides)
[ ] ALL marked points/dots/line-endpoints on curves computed via \pgfmathsetmacro from the SAME function — no hardcoded y-values
[ ] Dashed reference lines terminate exactly at the curve, not at arbitrary coordinates
[ ] Consistent dot style (solid=observed, hollow=counterfactual)
[ ] Consistent line style (solid=observed, dashed=counterfactual)
[ ] Arrow annotations: FROM label TO feature
[ ] Axes extend beyond all data points
[ ] Labels legible at presentation size
[ ] Minimum spacing between labels and graphical elements
Common TikZ diagram patterns:
Use these as starting points, then customize. All patterns assume arrows.meta, positioning, decorations.pathreplacing libraries are loaded (included in default preamble).
Flowchart (horizontal):
\begin{tikzpicture}[
box/.style={draw, rounded corners, minimum width=2.2cm, minimum height=0.8cm,
font=\small, fill=positive!10},
arr/.style={-{Stealth}, thick}
]
\node[box] (A) {Step 1};
\node[box, right=1.5cm of A] (B) {Step 2};
\node[box, right=1.5cm of B] (C) {Step 3};
\draw[arr] (A) -- node[above, font=\scriptsize] {label} (B);
\draw[arr] (B) -- (C);
\end{tikzpicture}
- Total width ≤ 14cm for 16:9. Formula: N × box_width + (N-1) × gap.
- For vertical flows: use
below= instead of right=.
Timeline:
\begin{tikzpicture}
\draw[-{Stealth}, thick] (0,0) -- (12,0) node[right] {Time};
\foreach \x/\lab in {1.5/Event A, 5/Event B, 9/Event C} {
\draw[thick] (\x, 0.15) -- (\x, -0.15);
\node[above=3pt, font=\small] at (\x, 0.15) {\lab};
}
\end{tikzpicture}
Tree diagram:
\begin{tikzpicture}[
level distance=1.2cm, sibling distance=2.5cm,
every node/.style={draw, rounded corners, font=\small, minimum width=1.5cm}
]
\node {Root}
child { node {A} child { node {A1} } child { node {A2} } }
child { node {B} child { node {B1} } };
\end{tikzpicture}
Annotated brace:
\draw[decorate, decoration={brace, amplitude=6pt, raise=2pt}]
(start) -- (end) node[midway, above=10pt, font=\small] {annotation};
Coordinate plot with computed intersection:
\begin{tikzpicture}[scale=1.1]
\draw[-{Stealth}, thick] (0,0) -- (6,0) node[right] {$x$};
\draw[-{Stealth}, thick] (0,0) -- (0,4) node[above] {$y$};
\draw[thick, positive] plot[smooth, domain=0.5:5.5] (\x, {0.5*\x});
\draw[thick, negative, dashed] plot[smooth, domain=0.5:5.5] (\x, {2.5/\x + 0.3});
% Exact intersection via \pgfmathsetmacro (see quality standards above)
\end{tikzpicture}
Decision diamond (for algorithm flowcharts):
\node[diamond, draw, aspect=2, inner sep=1pt, font=\small] (D) {condition?};
\draw[arr] (D) -- node[right, font=\scriptsize] {yes} ++(0,-1.2);
\draw[arr] (D) -- node[above, font=\scriptsize] {no} ++(2.5,0);
Iterative TikZ review loop (for complex diagrams):
When a TikZ diagram has ≥ 5 nodes or involves plotted curves, run an iterative review:
┌─→ Step 1: Mentally render — trace every coordinate, compute where each element appears
│ Step 2: Check for issues — overlaps, misalignments, inconsistent semantics
│ Step 3: Classify — CRITICAL (overlap, wrong semantics, geometric error),
│ MAJOR (poor spacing, readability), MINOR (aesthetic)
│ Step 4: Fix all CRITICAL and MAJOR issues
│ Step 5: Re-compile and visually verify in PDF
└── If CRITICAL or MAJOR remain and round < 3: loop back to Step 1
If all clear or round = 3: declare APPROVED or report remaining issues
Verdict criteria:
- APPROVED: Zero CRITICAL, zero MAJOR → diagram is complete
- NEEDS REVISION: CRITICAL or MAJOR issues remain → list exact fixes needed
- REJECTED: Fundamental structural problems → consider redesigning the diagram
2.7 excellence [file]
Comprehensive multi-dimensional review. Use the Agent tool to dispatch review agents in parallel for maximum efficiency.
Parallel agent dispatch — launch these as concurrent Agent calls:
- Visual audit agent — "Read [file]. Check every slide for: overflow, font consistency, box fatigue (2+ boxes), spacing issues, missing transitions. Report per slide with severity. Follow spacing-first fix principle."
- Pedagogical review agent — "Read [file]. Validate 13 pedagogical patterns (motivation before formalism, incremental notation, worked examples, etc.) and deck-level checks (narrative arc, pacing, visual rhythm, notation consistency). Report pattern-by-pattern with status."
- Proofreading agent — "Read [file]. Check grammar, typos, citation consistency (
\citet/\citep), notation consistency, academic quality. Report per issue with location and fix."
- TikZ review agent (if file contains
\begin{tikzpicture}) — "Read [file
…(truncated)
1---2name: beamer3description: |4 Beamer LaTeX slide workflow: create, compile, review, and polish academic presentations.5 Use this skill whenever the user works on Beamer .tex slide decks, or asks to create slides,6 make a presentation, prepare a lecture, build a talk, or generate Beamer slides from a paper PDF or Markdown.7 Covers: creation, editing, compilation, proofreading, visual audit, pedagogical review,8 TikZ diagrams, figure extraction, and comprehensive quality checks.9 Trigger on: beamer, slides, lecture, presentation, seminar talk, conference talk, defense slides,10 tikz, compile latex, proofread slides, slide review, 讨论班, 论文讲解.11 Do NOT trigger on: powerpoint, pptx, PPT, 做PPT — use the powerpoint-slides skill instead.12argument-hint: "[action] [file] — actions: create, compile, review, audit, pedagogy, tikz, excellence, devils-advocate, visual-check, validate, extract-figures"13allowed-tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob", "Agent", "AskUserQuestion", "TaskCreate", "TaskUpdate", "TaskList", "TaskGet"]14metadata:15 source: https://skillmd.com/skills/noi1r/beamer16---1718# Beamer Slide Workflow1920Universal skill for academic Beamer presentations. Full lifecycle:21create → compile → review → polish → verify.2223---2425## 0. REFERENCE PREAMBLE2627When creating new slides, use this as the default preamble unless the user has a custom template.2829```latex30\documentclass[aspectratio=169,10pt]{beamer}3132\usetheme{Madrid}33\usecolortheme{default}34\setbeamertemplate{navigation symbols}{}35\setbeamertemplate{footline}[frame number]3637\usepackage{amsmath,amssymb,amsthm,booktabs,mathtools}38\usepackage{stmaryrd} % for \llbracket, \rrbracket39\usepackage{graphicx} % for \includegraphics (extracted figures)40\usepackage{hyperref}41\usepackage{tikz}42\usetikzlibrary{arrows.meta,positioning,decorations.pathreplacing}4344% Semantic colors — use in BOTH text and TikZ for global consistency45\definecolor{positive}{HTML}{0173B2} % blue (correct, advantage)46\definecolor{negative}{HTML}{DE8F05} % orange (limitation, drawback)47\definecolor{emphasis}{HTML}{029E73} % green (highlight, key finding)48\definecolor{neutral}{gray}{0.55} % muted context49\definecolor{cbPurple}{HTML}{CC78BC} % additional accent50\newcommand{\pos}[1]{\textcolor{positive}{#1}}51\newcommand{\con}[1]{\textcolor{negative}{#1}}52\newcommand{\HL}[1]{\textcolor{emphasis}{#1}}53```5455**Rules:**56- **Always `10pt`** — `11pt` or `12pt` produces oversized, sparse slides.57- **Always `aspectratio=169`** — modern projectors are 16:9.58- **Default presenter**: `\author{Presenter: [name]}` and `\institute{Shanghai Jiao Tong University}`. Override only if user specifies otherwise.59- If user provides a custom preamble, header file, or theme: use theirs.60- Add domain-specific macros (e.g. `\newcommand{\F}{\mathbb{F}}`) as needed.61- **Algorithm/code packages** (add only when needed):62 - Algorithms: `\usepackage[ruled,lined]{algorithm2e}` — set `\SetAlgoLined`, `\DontPrintSemicolon`63 - Code listings: `\usepackage{listings}` — set `basicstyle=\ttfamily\small`, `keywordstyle=\bfseries\color{positive}`, `commentstyle=\color{neutral}`. Max 10 lines of code per slide; highlight key lines with `escapeinside={(*@}{@*)}` and `\colorbox`.64 - Pseudocode: `\usepackage{algorithmic}` — simpler than algorithm2e, suitable for short procedures.65- **Data plotting** (add only when needed):66 - `\usepackage{pgfplots}` + `\pgfplotsset{compat=1.18}` — data-driven plots (bar, scatter, error bars, histograms). Far more efficient than manual TikZ coordinate plots for data visualization.67 - `\usepackage{subcaption}` — multiple subfigures in one frame via `\begin{subfigure}{0.48\textwidth}`.68- **Theorem environments**: Beamer provides `theorem`, `lemma`, `corollary`, `definition`, `example`, `proof` out of the box (styled by the theme). Use them for formal statements — they get automatic numbering and consistent styling. Customize with `\setbeamertemplate{theorems}[numbered]` or `[ams style]`.6970---7172## 1. HARD RULES (Non-Negotiable)73741. **No overlays** — never use `\pause`, `\onslide`, `\only`, `\uncover`. Use multiple slides for progressive builds, color emphasis for attention. **Common replacement patterns:**75 - *Progressive formula build-up*: slide A shows the base equation, slide B copies it and adds the next term (grayed-out terms from slide A stay as context). Copy-paste the full frame and extend.76 - *Step-by-step list reveal*: slide A shows items 1-2, slide B shows 1-4 (items 1-2 repeated). Use `\textcolor{neutral}{}` on previously-shown items to mute them.77 - *Diagram incremental build*: slide A shows the base structure, slide B adds annotations/edges. Duplicate the `tikzpicture` and append new elements — never delete prior elements.782. **Max 2 colored boxes per slide** — more dilutes emphasis. Demote transitional remarks to plain italic.793. **Motivation before formalism** — every concept starts with "Why?" before "What?".804. **Worked example within 2 slides** of every definition.815. **XeLaTeX only** — never pdflatex.826. **Beamer .tex is the single source of truth** — TikZ diagrams, content, notation all originate here.837. **Verify after every task** — compile, check warnings, open PDF.848. **Telegraphic style** — keyword phrases, not full sentences. Slides are speaker prompts, not manuscripts. Exception: framing sentences that set up a definition or transition. Each bullet item should be ≤2 lines (~15 words) — if longer, split into sub-items or rewrite more concisely.859. **Every slide earns its place** — each slide must contain at least one substantive element (formula, diagram, table, theorem, or algorithm). A slide with only 3 short bullets and nothing else must be merged or enriched.8610. **Box-interior overflow guard** — `alertblock`, `exampleblock`, and `block` environments add internal padding (~15% less width, ~12-16pt extra height for title bar + vertical padding). Content that fits on a bare slide can overflow inside a box in **both directions**. Rules:87 - **Vertical overflow** (most common, hardest to detect): display math (`\[ \]`) + text below it inside a single box easily exceeds vertical capacity. Limit box content to **one display equation OR 2-3 short bullet items** — not both. Never use aggressive `\vspace{-Xpt}` inside a box; it pulls bottom content past the border.88 - **Horizontal overflow**: never use `\qquad` inside a box; use `\quad` or `,`. If a display equation is wider than ~70% of `\textwidth` on a bare slide, reformat before placing inside a box.89 - **Beamer suppresses overfull warnings inside blocks** — zero compile warnings does NOT guarantee no visual overflow. Always visually verify every box in the PDF.9011. **Reference slide** — the second-to-last slide (before Thank You) must be a **References** slide listing key cited works. Use `\begin{thebibliography}{9}` with `\small`. Include the primary paper and 3-5 most relevant references.9112. **Color and contrast standards** — text-background contrast ratio ≥ 4.5:1 (WCAG AA). Never use red+green for binary contrasts (color blindness affects ~8% of men). Prefer blue+orange. Semantic color commands defined in preamble: `\pos{}` = positive/correct (blue), `\con{}` = negative/limitation (orange), `\HL{}` = emphasis/key finding (green), `\textcolor{neutral}{}` = de-emphasized. These are color-blind safe. Limit total palette to 3-5 colors.9213. **Visual hierarchy in font sizes** — slide title: 20-24pt (beamer default), key findings/theorems: normal size with `\textbf`, supporting text: normal, labels/captions: `\small` minimum. Never use `\tiny` for any user-facing content.9314. **Backup slides** — after the Thank You slide, include 3-5 backup slides for anticipated questions. Use `\appendix` before backup section. Separate from main deck with a `\begin{frame}{Backup Slides}\end{frame}` divider. Backup slides should NOT count toward the timing allocation. **Content to include** (derive from Phase 0 material analysis):94 - Full proof of the main theorem (if only a sketch was shown in the main deck)95 - Parameter choices / security analysis details (for crypto/protocol papers)96 - Extended comparison table with additional baselines97 - Experimental setup details (hardware, hyperparameters, datasets)98 - Definitions of prerequisites that were assumed known (in case someone asks)9915. **Columns layout** — use `\begin{columns}[T]` + `\column{W\textwidth}` for side-by-side content. Rules:100 - Comparison / parallel content: two columns at `0.48\textwidth` each (leave 0.04 gap).101 - Figure + text: figure column `0.45-0.55`, text column `0.40-0.50`, gap `0.05`.102 - Three columns maximum: each `≤ 0.30\textwidth`, only for short items (icons, stats, one-liners).103 - Never nest columns inside columns.104 - Always use `[T]` (top-align) unless deliberately centering.105 - Columns content follows the same density constraints as regular slides.106107---108109## 2. ACTIONS110111Parse `$ARGUMENTS` to determine which action to run. If no action specified, ask.112113### 2.1 `compile [file]`1141153-pass XeLaTeX + bibtex for full citation resolution.116117```bash118# Adapt TEXINPUTS/BIBINPUTS to your project's preamble/bib locations119xelatex -interaction=nonstopmode FILE.tex120bibtex FILE121xelatex -interaction=nonstopmode FILE.tex122xelatex -interaction=nonstopmode FILE.tex123```124125Post-compile checks:126- Grep log for `Overfull \\hbox` warnings (count and locations)127- Grep for `Undefined control sequence` or `undefined citations`128- Grep for `Label(s) may have changed`129- Open PDF for visual verification130- Report: success/failure, overfull count, undefined items, page count131132### 2.2 `create [topic]`133134**Collaborative, iterative lecture creation. Strict phase gates — never skip ahead.**135136#### Phase 0: Material Analysis (if papers/materials provided)137138**Read first, ask later.** Must understand the content before asking meaningful questions.139140- Accept `.pdf`, `.md`, or mixed paper/material inputs.141- If Markdown is provided, use it as the primary semantic source for section hierarchy, equations, theorem statements, captions, references, and notation.142- If both Markdown and PDF are provided, use Markdown for structure/text understanding and use the PDF for figures, page context, visual reference, and extraction.143- If only a PDF is provided and parsing loses structure, ask whether the user can provide a Markdown conversion. Do not require or run a specific PDF-to-Markdown converter.144- Read the full paper/materials thoroughly145- Extract: core contribution, key techniques, main theorems, comparison with prior work146- Map notation conventions147- Identify the paper's logical structure and which parts are slide-worthy148- Internally note: prerequisite knowledge, natural section boundaries, what could be skipped or expanded149150**Do NOT present results or ask questions yet — proceed directly to Phase 1.**151152#### Phase 1: Needs Interview (MANDATORY — informed by Phase 0)153154Conduct a **content-driven interview** via AskUserQuestion. The questions below are the **minimum required set** — you MUST also add paper-specific questions derived from Phase 0.155156**Minimum required questions** (always ask):1571. **Duration**: How long is the presentation?1582. **Audience level**: Who are the listeners?159160**Optional question** (ask when the talk is a journal club, defense, or user seems to want rehearsal support):1613. **Speaker notes**: Would you like speaker notes in the Presenter View? If yes, `\note{}` blocks will be added per frame with telegraphic talking points (key message, transition cue, anticipated questions). Requires adding `\setbeameroption{show notes on second screen=right}` to the preamble for dual-screen display.162163**Content-driven questions** (derive from Phase 0, ask as many as needed):164- **Prerequisite knowledge**: List concrete technical dependencies identified in Phase 0. Ask which ones the audience knows. E.g., "The paper builds on sumcheck and polynomial commitments. Should I review these?" — not "familiar with basic algebra?".165- **Content scope**: Offer the paper's actual components as options. Ask which to emphasize, skip, or briefly mention.166- **Depth vs. breadth**: If the paper has both intuitive overview and detailed constructions, ask which the user prefers.167- **Paper-specific decisions**: E.g., if the paper compares two constructions, ask whether to present both equally or focus on one.168169**Guidelines:**170- Options should come from the paper's actual content, not generic templates.171- 3-6 questions total; don't over-ask, don't under-ask.172- If something is obvious from context (e.g., user said "讨论班"), infer rather than ask.173174**Slide count heuristic**: ~1 slide per 1.5-2 minutes.175176**Timing allocation table:**177178| Duration | Total slides | Intro/Motivation | Methods/Background | Core content | Summary/Conclusion |179|----------|-------------|------------------|-------------------|-------------|-------------------|180| 5min (lightning) | 5-7 | 1-2 | 0-1 | 2-3 | 1 |181| 10min (short) | 8-12 | 2 | 1-2 | 4-5 | 1 |182| 15min (conference) | 10-15 | 2-3 | 2-3 | 5-7 | 1-2 |183| 20min (seminar) | 13-18 | 3 | 2-3 | 6-9 | 2 |184| 45min (keynote) | 22-30 | 4-5 | 5-7 | 10-14 | 2-3 |185| 90min (lecture) | 45-60 | 5-6 | 8-12 | 25-35 | 3-4 |186187**Talk-type specific tips:**188189| Talk type | Key emphasis | Common mistake |190|-----------|-------------|----------------|191| Lightning (5min) | One core message, no background review | Cramming a full talk into 5 minutes |192| Conference (10-20min) | 1-2 key results, fast methods overview | Too much technical detail, no big picture |193| Seminar (45min) | Deep dive OK, but need visual rhythm | Wall-to-wall formulas without examples |194| Defense/Thesis | Demonstrate mastery, systematic coverage | Skipping motivation, rushing results |195| Journal club | Critical analysis, facilitate discussion | Summarizing without evaluating |196| Grant pitch | Significance → feasibility → impact | Too technical, not enough "why it matters" |197198**Time distribution principle**: Spend 40-50% of time on core content (results/techniques). Max 3-4 consecutive theory-heavy slides before a worked example or visual break.199200#### Phase 2: Structure Plan (GATE — user must approve before drafting)201202Produce a **detailed outline**. For each section:203- Section title204- Number of slides allocated205- Key content points per slide (1-2 lines each)206- TikZ diagrams or figures planned (brief description)207- Notation to introduce208209**Present the plan to the user.** Ask: structure OK? Expand/shrink/cut anything?210211**Do NOT proceed to drafting until user approves.**212213#### Phase 3: Draft (iterative, batched)214215**This phase is the most critical. Follow all sub-rules strictly.**216217##### 3a. Writing Style218219- **Telegraphic keywords**, not full sentences. Exception: one framing sentence per slide to set context.220- **Formulas and analysis interleave tightly** — define a quantity, then immediately state its cost/property/implication on the same slide. Never isolate a formula on one slide and its analysis on the next.221- **No conversational hedging** — never write "wait, not exactly", "actually, let me clarify", or similar. If a point needs qualification, state it precisely from the start.222- **Use `\textbf{}` for key terms** on first introduction; use `\pos{...}` for positive properties, `\con{...}` for drawbacks/limitations, `\HL{...}` for key findings (defined in preamble).223224##### 3a-2. Opening and Closing Strategies225226**Opening slide (pick one strategy):**227- **Surprising statistic** — a counter-intuitive number that challenges assumptions228- **Provocative question** — something the audience cannot immediately answer229- **Real-world failure/problem** — "System X failed because..." → "How do we prevent this?"230- **Visual demonstration** — show the phenomenon before explaining it231232The opening should create tension or curiosity that the rest of the talk resolves.233234**Closing strategies:**235- **Call-back to opening** — revisit the opening question/problem, now answered (circular narrative)236- **3 key takeaways** — numbered, telegraphic, one slide. The audience remembers the last thing they see.237- **Open question / future direction** — leave the audience thinking, naturally invites Q&A238- **Never end on a bare "Thank You"** — the second-to-last content slide should deliver the lasting impression. The Thank You slide is a courtesy, not the conclusion.239240##### 3b. Mathematical Slide Patterns241242Each math-heavy slide should follow one of these patterns:243244**Definition slide:**245```246[Framing sentence: why this definition matters]247[Formal definition in display math]248[Key properties / immediate consequences as 2-3 bullet items]249```250251**Construction/Algorithm slide:**252```253[One-line goal statement]254[Core equation / algorithm steps]255[Complexity analysis: prover cost, verifier cost, soundness]256```257258**Comparison slide:**259```260[Side-by-side table: prior work vs this work]261[1-2 lines highlighting the key difference]262```263264**Insight/Remark slide (adds value beyond the paper):**265```266[Observation the paper doesn't emphasize, or a comparison with related work]267[Why this matters / what it implies]268```269270Every slide must have a clear **takeaway** — the one thing the audience should remember.271272**Theorem/Proof slide (for formal mathematical statements):**273```274[Framing sentence: informal statement of the result]275\begin{theorem}[Optional name]276 [Formal statement in display math]277\end{theorem}278[Key implication or "why this matters" as 1-2 bullets]279```280- Proof on the **next** slide (never cramming theorem + proof on one slide).281- For long proofs: show proof sketch (key steps only), put full proof in backup slides.282- Use `\begin{proof}[Proof sketch]` to signal abbreviated proofs.283284**Cross-referencing between slides:**285- Label key slides with `\label{slide:construction}` inside the frame.286- Reference from other slides: `see Slide~\ref{slide:construction}` or clickable `\hyperlink{slide:construction}{\beamerbutton{Back to Construction}}`.287- Especially useful for Q&A — quickly jump back to a referenced result.288- In backup slides, always hyperlink back to the main slide that motivates them.289290##### 3c. Content Density Constraints291292**Upper bounds (per slide):**293- ≤ 7 bullet points or items294- ≤ 2 displayed equations (more → split)295- ≤ 5 new symbols introduced296- ≤ 2 colored boxes (alertblock/exampleblock)297298**Lower bounds (per slide):**299- Each slide MUST contain at least one substantive element: a formula, diagram, table, theorem statement, or algorithm300- A slide with only ≤ 3 short text-only bullets is **too sparse** — merge with an adjacent slide or add a formula/diagram301- Pure text-only bullet slides should be ≤ 30% of the total deck302303**Density self-check after each batch:**304- Count slides that have zero formulas/diagrams/tables → flag if > 30% of batch305- Count slides with ≤ 3 short items and no math → candidates for merging306307##### 3d. Batch Workflow308309- Work in batches of 5-10 slides, following the approved structure310- After each batch, **compile** (`xelatex -interaction=nonstopmode`) to catch errors early — fixing 2 issues in a 10-slide batch is far cheaper than fixing 12 issues in a 40-slide deck at Phase 5311- After each batch, self-check: notation consistency, density constraints, motivation-before-formalism312- Continue to next batch only after current batch compiles cleanly and passes self-check313314##### 3e. Table Best Practices315316- **Always center tables** — wrap every standalone table in `\begin{center}...\end{center}`. Left-aligned tables look misaligned on slides.317- **Never place a table immediately after the frame title** — themes like Madrid have a colored title bar whose bottom edge visually merges with `\toprule`, making the table appear embedded in the title. Always insert `\vspace{4pt}` (or introductory text) between the title and the first `\toprule`. The compiler emits **zero warnings** for this — it can only be caught by visual inspection.318- Always use `booktabs` (`\toprule`, `\midrule`, `\bottomrule`) — never vertical lines (`|`).319- Column alignment: numbers right-aligned (`r`), text left-aligned (`l`), short labels centered (`c`).320- Max 6-7 columns, 8-10 rows per slide. More → split across slides following these pagination rules:321 - Each continuation slide repeats the full header row (`\toprule` + header + `\midrule`).322 - Append " (cont'd)" to the frame title: `\frametitle{Results (cont'd)}`.323 - Split at logical row group boundaries (e.g., between algorithm families, dataset groups) — never mid-group.324 - Last page must have ≥3 data rows; if fewer, merge with the previous page.325 - Each page gets its own takeaway line below the table if the subset tells a different story.326- Use `\resizebox{\textwidth}{!}{...}` only as last resort — prefer reducing columns/rows first.327- Highlight key cells with `\cellcolor{positive!15}` or `\textbf{}` — draw the eye to the result.328- For comparison tables: bold the best result in each row/column.329- Caption below table in `\small`, or use the frame title as the implicit caption.330331##### 3f. Algorithm and Code Display332333- Pseudocode ≤ 10 lines per slide. If longer, split into "high-level overview" and "key subroutine" slides.334- Highlight the critical line(s): use `escapeinside` in listings or `\colorbox` in algorithm2e.335- Input/output clearly stated at the top of the algorithm.336- Use consistent naming: variables in math italic (`$x$`), functions in sans-serif or typewriter.337- For code (not pseudocode): `\ttfamily\small`, syntax highlighting via listings. Show only the relevant fragment — never dump an entire source file.338339#### Phase 4: Figures340341- TikZ diagrams in Beamer source (single source of truth)342- Apply TikZ quality standards (see Section 2.6)343- R/Python scripts if needed344345**Data visualization guidelines (journal figures ≠ slide figures):**346- **Simplify ruthlessly** — remove minor gridlines, detailed legends (label directly on plot), secondary axes. Show only data supporting the current slide's point.347- **Enlarge everything** — axis labels ≥ 18pt, line width 2-4pt, marker size 8-12pt. If unreadable at 2-3 feet from laptop, it fails on a projector.348- **Direct labeling** — label lines/bars directly instead of using a separate legend. Reduces cognitive load.349- **One message per figure** — split multi-panel journal figures across multiple slides. Each slide shows one comparison.350- **Highlight the result** — key data in bold saturated color, comparison data in muted gray. Use `\textcolor{blue!70!black}{...}` for the key finding, gray for reference.351- **Color-blind safe palette** — prefer blue (`#0173B2`) + orange (`#DE8F05`) over red + green. Add line style differences (solid/dashed/dotted) as redundant encoding. In TikZ:352 ```latex353 \definecolor{cbBlue}{HTML}{0173B2}354 \definecolor{cbOrange}{HTML}{DE8F05}355 \definecolor{cbGreen}{HTML}{029E73}356 \definecolor{cbPurple}{HTML}{CC78BC}357 ```358- **Progressive disclosure** — for complex figures, build incrementally: axes → first dataset → comparison → annotation with finding. Use separate slides (not `\pause`).359- **Subfigures** — use `\begin{subfigure}{0.48\textwidth}` (requires `subcaption` package) for side-by-side panels in one frame. Each subfigure gets its own `\caption{(a) ...}`. Preferred over raw `\includegraphics` side-by-side when panels need individual captions. Max 2 subfigures per slide (4 panels = split across 2 slides).360361**pgfplots for data-driven figures (preferred over manual TikZ for data):**362363Use `pgfplots` whenever plotting numerical data. It handles axes, legends, scaling, and data loading automatically.364365```latex366% Bar chart from inline data367\begin{tikzpicture}368\begin{axis}[369 ybar, bar width=12pt,370 xlabel={Method}, ylabel={Accuracy (\%)},371 symbolic x coords={Baseline, Ours, Oracle},372 xtick=data, ymin=0, ymax=100,373 nodes near coords, every node near coord/.append style={font=\small},374 width=0.85\textwidth, height=5cm375]376 \addplot coordinates {(Baseline,72) (Ours,89) (Oracle,95)};377\end{axis}378\end{tikzpicture}379```380381```latex382% Line plot from CSV file383\begin{tikzpicture}384\begin{axis}[385 xlabel={Epoch}, ylabel={Loss},386 legend pos=north east, grid=major,387 width=0.85\textwidth, height=5cm388]389 \addplot table[x=epoch, y=train_loss, col sep=comma] {data/results.csv};390 \addplot table[x=epoch, y=val_loss, col sep=comma] {data/results.csv};391 \legend{Train, Validation}392\end{axis}393\end{tikzpicture}394```395396```latex397% Scatter plot with error bars398\begin{axis}[xlabel={$x$}, ylabel={$y$}]399 \addplot+[only marks, error bars/.cd, y dir=both, y explicit]400 coordinates {(1,2)+-(0,0.3) (2,3.5)+-(0,0.5) (3,5.1)+-(0,0.4)};401\end{axis}402```403404- Always set explicit `width` and `height` to prevent overflow.405- Use `\addplot table[col sep=comma]{file.csv}` to load data from file — keeps .tex clean.406- For presentation: enlarge tick labels (`tick label style={font=\small}`), thicken lines (`thick`), use semantic colors (`color=positive`).407408#### Phase 5: Quality Loop (MANDATORY — iterative)409410After completing the full draft, enter the quality loop:411412```413┌─→ 5a. Compile (2-pass XeLaTeX)414│ 5b. Self-Review (structure + content + visual)415│ 5c. Score (apply rubric)416│ 5d. Fix all issues found417└── If score < 90 and round < 3: loop back to 5a418 If score ≥ 90 or round = 3: report to user419```420421**5a. Compilation**422- 2-pass XeLaTeX compilation (bibtex not needed here — already resolved in Phase 3 batch compiles)423- Check: errors, overfull hbox, undefined references424- Open PDF for visual inspection425426**5b. Self-Review** — re-read the .tex and verify:427428*Structure:*429- [ ] Slide count matches plan (±2 tolerance)430- [ ] Logical flow: motivation → background → technique → results → summary431- [ ] No section has >4 consecutive formal slides without a worked example or visual break432- [ ] Transition sentences between major sections433434*Content density:*435- [ ] No slide has only ≤3 short bullets with no math/diagram436- [ ] Pure text-only slides ≤ 30% of deck437- [ ] No slide exceeds upper bounds (7 bullets, 2 equations, 5 symbols, 2 boxes)438439*TikZ and visuals:*440- [ ] No label-label or label-curve overlaps441- [ ] No content overflowing slide boundary442- [ ] **No content overflowing inside colored boxes** (alertblock/exampleblock/block have ~85% effective width; visually verify every box in PDF)443- [ ] **TikZ diagram fits within remaining slide space** — for mixed slides (text + diagram), verify the diagram's bounding box height + text height ≤ ~70mm. Common failure: large TikZ `scale` + multiple equations above = diagram clipped at bottom444- [ ] **All marked points lie on their curves** — for every `\fill`, `\node`, or `\draw` endpoint that should be on a plotted curve, verify the y-coordinate is computed via `\pgfmathsetmacro` from the same function, NOT hardcoded. Visually check in PDF that dots/markers visually sit on the curve line445- [ ] **Dashed reference lines terminate at the curve** — vertical/horizontal guide lines should end exactly where they meet the curve, not at arbitrary y-values446- [ ] Tables fit within slide width447- [ ] All standalone tables are centered (`\begin{center}...\end{center}`)448- [ ] No table's `\toprule` visually merges with the title bar (add `\vspace{4pt}` or text before first table)449- [ ] Font sizes in TikZ ≥ `\footnotesize`450- [ ] Consistent styling across all diagrams451452*Notation:*453- [ ] Same symbol used consistently throughout454- [ ] Every symbol defined before use455456**5c. Quality Score**457458Start at 100. Deduct:459460| Severity | Issue | Deduction |461|----------|-------|-----------|462| Critical | Compilation failure | -100 |463| Critical | Equation overflow (slide or box-interior) | -20 |464| Critical | TikZ diagram overflows slide boundary (clipped at bottom/right) | -15 per diagram |465| Critical | Undefined control sequence / citation | -15 |466| Critical | Overfull hbox > 10pt | -10 |467| Major | Content overflow inside colored box (vertical or horizontal, visual-only) | -10 per box |468| Major | TikZ marked points not on curve (hardcoded y-values instead of computed) | -8 per diagram |469| Major | Sparse slide (≤3 items, no math/diagram) | -5 per slide |470| Major | TikZ label overlap | -5 |471| Major | Missing references slide | -5 |472| Major | Table not centered (standalone table without `\begin{center}`) | -3 per table |473| Major | Table `\toprule` visually merged with title bar (no spacing after frame title) | -5 per slide |474| Major | Notation inconsistency | -3 |475| Minor | `\vspace` overuse (>3 per slide) | -1 |476| Minor | Font size reduction (`\footnotesize` etc.) | -1 per slide |477478**Thresholds:**479- **≥ 90**: Ready to deliver. Report to user.480- **80-89**: Acceptable. Fix remaining majors if possible, report with caveats.481- **< 80**: Must fix. Loop back and resolve critical/major issues.482483**5d. Fix** — fix all critical and major issues. Re-compile. If score improves to ≥ 90, exit loop. Max 3 rounds to avoid infinite loops.484485#### Post-Creation Checklist (final gate)486```487[ ] Compiles without errors488[ ] No overfull hbox > 10pt489[ ] All citations resolve490[ ] Score ≥ 90491[ ] Every definition has motivation + worked example492[ ] Max 2 colored boxes per slide493[ ] No sparse slides (all slides have substantive content)494[ ] TikZ diagrams visually verified — no overlaps, no overflow, all marked points on curves495[ ] Tables fit within slide boundaries, are centered, and separated from title bar496[ ] No content overflow inside colored boxes (visual PDF check)497[ ] References slide present (second-to-last, before Thank You)498```499500### 2.3 `review [file]` or `proofread [file]`501502Read-only report, no file edits.503504**5 check categories:**505506| Category | What to check |507|----------|---------------|508| Grammar | Subject-verb, articles, prepositions, tense consistency |509| Typos | Misspellings, search-replace artifacts, duplicated words, **unreplaced placeholders** (`[name]`, `[TODO]`, `[XXX]`, template remnants) |510| Overflow | Long equations without `\resizebox`, too many items per slide |511| Consistency | Citation format (`\citet`/`\citep`), notation, terminology, box usage, **denominator consistency** across slides |512| Academic quality | Informal abbreviations, missing words, claims without citations, **ambiguous abbreviations** (same abbreviation for different terms) |513514**Report format per issue:**515```516### Issue N: [Brief description]517- **Location:** [slide title or line number]518- **Current:** "[exact text]"519- **Proposed:** "[fix]"520- **Category / Severity:** [Category] / [High|Medium|Low]521```522523### 2.4 `audit [file]`524525Visual layout audit. Read-only report.526527**Check dimensions:**528- **Overflow:** Content exceeding boundaries, wide tables/equations529- **Font consistency:** Inline size overrides, inconsistent sizes530- **Box fatigue:** 2+ boxes per slide, wrong box types531- **Spacing:** `\vspace` overuse, structural issues532- **Layout:** Missing transitions, missing framing sentences533534**Spacing-first fix principle (priority order):**5351. Reduce vertical spacing (structural changes)5362. Consolidate lists5373. Move displayed equations inline5384. Reduce image/table size with `\resizebox`5395. **Last resort:** `\footnotesize` (never `\tiny`)540541### 2.5 `pedagogy [file]`542543Holistic pedagogical review. Read-only report.544545**13 patterns to validate:**546547| # | Pattern | Red flag |548|---|---------|----------|549| 1 | Motivation before formalism | Definition without context |550| 2 | Incremental notation | 5+ new symbols on one slide |551| 3 | Worked example after definition | 2 consecutive definitions, no example |552| 4 | Progressive complexity | Advanced concept before prerequisite |553| 5 | Fragment reveals (problem→solution) | Dense theorem revealed all at once |554| 6 | Standout slides at pivots | Abrupt topic jump, no transition |555| 7 | Two-slide strategy for dense theorems | Complex theorem crammed in 1 slide |556| 8 | Semantic color usage | Binary contrasts in same color |557| 9 | Box hierarchy | Wrong box type for content |558| 10 | Box fatigue | 3+ boxes on one slide |559| 11 | Socratic embedding | Zero questions in entire deck |560| 12 | Visual-first for complex concepts | Notation before visualization |561| 13 | Side-by-side for comparisons | Sequential slides for related definitions |562563**Deck-level checks:** Narrative arc, pacing (max 3-4 theory slides before example), visual rhythm (section dividers every 5-8 slides), notation consistency, student prerequisite assumptions.564565### 2.6 `tikz [file]`566567TikZ diagram review and extraction.568569**Quality standards:**570- Labels NEVER overlap with curves, lines, dots, or other labels571- When two labels are near the same vertical position, stagger them572- Visual semantics: solid=observed, dashed=counterfactual, filled=observed, hollow=counterfactual573- Line weights: axes=`thick`, data=`thick`, annotations=`thick` (not `very thick`)574- Standard scale: `[scale=1.1]` for full-width diagrams575- Dot radius: `4pt` for data points576- Minimum 0.2 units between any label and nearest graphical element577- **Mathematical accuracy of plotted points**: NEVER hardcode y-coordinates for points, markers, or dashed-line endpoints that should lie on a plotted curve. ALL such coordinates must be computed from the SAME function used to draw the curve via `\pgfmathsetmacro`. This applies to:578 - Points marked on a **single curve** (e.g., labeled special values like "BiPerm at ℓ=2")579 - Dashed vertical/horizontal lines that terminate at a curve580 - Intersections of **two curves**581 - Any annotation anchored to a curve position582583 **Common mistake** (WRONG — hardcoded y that doesn't match the curve):584 ```latex585 \draw[thick] plot[domain=0.8:10] (\x, {0.3*\x + 2.7/\x});586 \draw[dashed] (2, 0) -- (2, 3.2); % BAD: 3.2 is not 0.3*2+2.7/2=1.95587 \node at (2, 3.2) {BiPerm}; % BAD: label floats above the curve588 ```589590 **Correct pattern** (ALWAYS compute from the function):591 ```latex592 \draw[thick] plot[domain=0.8:10] (\x, {0.3*\x + 2.7/\x});593 \pgfmathsetmacro{\yTwo}{0.3*2 + 2.7/2} % = 1.95, exactly on curve594 \draw[dashed] (2, 0) -- (2, \yTwo);595 \fill (2, \yTwo) circle (2pt);596 \node[above left] at (2, \yTwo) {BiPerm};597 ```598599 For curve intersections, solve the system algebraically first, then encode the exact formula:600 ```latex601 % Intersection of y=0.5x and y=2.5/x+0.3:602 % 0.5x = 2.5/x + 0.3 => x^2 - 0.6x - 5 = 0 => x = (0.6+sqrt(20.36))/2603 \pgfmathsetmacro{\xint}{(0.6 + sqrt(20.36))/2}604 \pgfmathsetmacro{\yint}{0.5*\xint}605 \fill (\xint, \yint) circle (3pt);606 ```607- **TikZ diagram sizing on mixed-content slides**: a TikZ diagram sharing a slide with text/equations MUST fit in the remaining vertical space. Beamer 16:9 at 10pt has ~70mm usable height below the title bar. **Before writing the TikZ code**, estimate:608 1. Text + equations above the diagram: count displayed equations (each ~12-15mm) + text lines (~5mm each) + spacing609 2. Remaining height = 70mm − text height610 3. TikZ bounding box height = (max y-coordinate − min y-coordinate) × yscale × 0.3528mm/pt611 4. If the diagram won't fit: reduce `yscale`, shrink coordinate ranges, or move content to a separate slide612613 **Safe defaults for mixed slides**: `xscale=0.5-0.7`, `yscale=0.4-0.6`. For full-slide diagrams: `scale=0.9-1.1`.614- **Edge labels on short arrows**: when placing `node[midway, above]` labels on arrows between boxes, the label text can extend past the arrow endpoints into adjacent box borders. Prevention rules:615 1. Estimate label text width vs. arrow length (`right=` gap). If the label is wider than ~80% of the gap, **increase the gap** or **shrink the label font** (`\scriptsize` / `\tiny`).616 2. Use `above=4pt` (or more) instead of bare `above` to add vertical clearance between label and box border.617 3. For flow diagrams with 3+ boxes: total width = (N × box width) + ((N-1) × gap). Must stay ≤ 14cm for 16:9 beamer. Adjust box `text width` and gap together.618 4. When in doubt, compile and visually verify that no label overlaps any box border.619620**Extraction to SVG (for web/Quarto use):**621```bash622xelatex -interaction=nonstopmode extract_tikz.tex623PAGES=$(pdfinfo extract_tikz.pdf | grep "Pages:" | awk '{print $2}')624for i in $(seq 1 $PAGES); do625 idx=$(printf "%02d" $((i-1)))626 pdf2svg extract_tikz.pdf tikz_exact_$idx.svg $i627done628```629630**TikZ checklist:**631```632[ ] No label-label overlaps633[ ] No label-curve overlaps634[ ] No edge labels overlapping adjacent nodes (check label width vs. arrow length)635[ ] Diagram bounding box fits within remaining slide space (especially mixed text+diagram slides)636[ ] ALL marked points/dots/line-endpoints on curves computed via \pgfmathsetmacro from the SAME function — no hardcoded y-values637[ ] Dashed reference lines terminate exactly at the curve, not at arbitrary coordinates638[ ] Consistent dot style (solid=observed, hollow=counterfactual)639[ ] Consistent line style (solid=observed, dashed=counterfactual)640[ ] Arrow annotations: FROM label TO feature641[ ] Axes extend beyond all data points642[ ] Labels legible at presentation size643[ ] Minimum spacing between labels and graphical elements644```645646**Common TikZ diagram patterns:**647648Use these as starting points, then customize. All patterns assume `arrows.meta`, `positioning`, `decorations.pathreplacing` libraries are loaded (included in default preamble).649650*Flowchart (horizontal):*651```latex652\begin{tikzpicture}[653 box/.style={draw, rounded corners, minimum width=2.2cm, minimum height=0.8cm,654 font=\small, fill=positive!10},655 arr/.style={-{Stealth}, thick}656]657 \node[box] (A) {Step 1};658 \node[box, right=1.5cm of A] (B) {Step 2};659 \node[box, right=1.5cm of B] (C) {Step 3};660 \draw[arr] (A) -- node[above, font=\scriptsize] {label} (B);661 \draw[arr] (B) -- (C);662\end{tikzpicture}663```664- Total width ≤ 14cm for 16:9. Formula: N × box\_width + (N-1) × gap.665- For vertical flows: use `below=` instead of `right=`.666667*Timeline:*668```latex669\begin{tikzpicture}670 \draw[-{Stealth}, thick] (0,0) -- (12,0) node[right] {Time};671 \foreach \x/\lab in {1.5/Event A, 5/Event B, 9/Event C} {672 \draw[thick] (\x, 0.15) -- (\x, -0.15);673 \node[above=3pt, font=\small] at (\x, 0.15) {\lab};674 }675\end{tikzpicture}676```677678*Tree diagram:*679```latex680\begin{tikzpicture}[681 level distance=1.2cm, sibling distance=2.5cm,682 every node/.style={draw, rounded corners, font=\small, minimum width=1.5cm}683]684 \node {Root}685 child { node {A} child { node {A1} } child { node {A2} } }686 child { node {B} child { node {B1} } };687\end{tikzpicture}688```689690*Annotated brace:*691```latex692\draw[decorate, decoration={brace, amplitude=6pt, raise=2pt}]693 (start) -- (end) node[midway, above=10pt, font=\small] {annotation};694```695696*Coordinate plot with computed intersection:*697```latex698\begin{tikzpicture}[scale=1.1]699 \draw[-{Stealth}, thick] (0,0) -- (6,0) node[right] {$x$};700 \draw[-{Stealth}, thick] (0,0) -- (0,4) node[above] {$y$};701 \draw[thick, positive] plot[smooth, domain=0.5:5.5] (\x, {0.5*\x});702 \draw[thick, negative, dashed] plot[smooth, domain=0.5:5.5] (\x, {2.5/\x + 0.3});703 % Exact intersection via \pgfmathsetmacro (see quality standards above)704\end{tikzpicture}705```706707*Decision diamond (for algorithm flowcharts):*708```latex709\node[diamond, draw, aspect=2, inner sep=1pt, font=\small] (D) {condition?};710\draw[arr] (D) -- node[right, font=\scriptsize] {yes} ++(0,-1.2);711\draw[arr] (D) -- node[above, font=\scriptsize] {no} ++(2.5,0);712```713714**Iterative TikZ review loop (for complex diagrams):**715716When a TikZ diagram has ≥ 5 nodes or involves plotted curves, run an iterative review:717718```719┌─→ Step 1: Mentally render — trace every coordinate, compute where each element appears720│ Step 2: Check for issues — overlaps, misalignments, inconsistent semantics721│ Step 3: Classify — CRITICAL (overlap, wrong semantics, geometric error),722│ MAJOR (poor spacing, readability), MINOR (aesthetic)723│ Step 4: Fix all CRITICAL and MAJOR issues724│ Step 5: Re-compile and visually verify in PDF725└── If CRITICAL or MAJOR remain and round < 3: loop back to Step 1726 If all clear or round = 3: declare APPROVED or report remaining issues727```728729**Verdict criteria:**730- **APPROVED**: Zero CRITICAL, zero MAJOR → diagram is complete731- **NEEDS REVISION**: CRITICAL or MAJOR issues remain → list exact fixes needed732- **REJECTED**: Fundamental structural problems → consider redesigning the diagram733734### 2.7 `excellence [file]`735736Comprehensive multi-dimensional review. **Use the Agent tool to dispatch review agents in parallel** for maximum efficiency.737738**Parallel agent dispatch** — launch these as concurrent Agent calls:7397401. **Visual audit agent** — "Read [file]. Check every slide for: overflow, font consistency, box fatigue (2+ boxes), spacing issues, missing transitions. Report per slide with severity. Follow spacing-first fix principle."7412. **Pedagogical review agent** — "Read [file]. Validate 13 pedagogical patterns (motivation before formalism, incremental notation, worked examples, etc.) and deck-level checks (narrative arc, pacing, visual rhythm, notation consistency). Report pattern-by-pattern with status."7423. **Proofreading agent** — "Read [file]. Check grammar, typos, citation consistency (`\citet`/`\citep`), notation consistency, academic quality. Report per issue with location and fix."7434. **TikZ review agent** (if file contains `\begin{tikzpicture}`) — "Read [file744745…(truncated)