| name | compile-latex |
| description | Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex). Use when compiling lecture slides. |
| argument-hint | [filename without .tex extension] |
| allowed-tools | ["Read","Bash","Glob"] |
Compile Beamer LaTeX Slides
Compile a Beamer slide deck using XeLaTeX with full citation resolution.
Steps
- Navigate to Slides/ directory and compile with 3-pass sequence:
cd Slides
TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $ARGUMENTS.tex
BIBINPUTS=..:$BIBINPUTS bibtex $ARGUMENTS
TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $ARGUMENTS.tex
TEXINPUTS=../Preambles:$TEXINPUTS xelatex -interaction=nonstopmode $ARGUMENTS.tex
Alternative (latexmk):
cd Slides
TEXINPUTS=../Preambles:$TEXINPUTS BIBINPUTS=..:$BIBINPUTS latexmk -xelatex -interaction=nonstopmode $ARGUMENTS.tex
-
Run ChkTeX advisory lint (non-blocking):
chktex -q Slides/$ARGUMENTS.tex 2>&1 | grep "^Warning" || echo "No chktex warnings."
- Report any genuine warnings (expect ≤5 with project
.chktexrc suppressions)
- Do NOT fail compilation on chktex warnings — advisory only
-
Check for compilation warnings:
- Grep output for
Overfull \\hbox warnings
- Grep for
undefined citations or Label(s) may have changed
- Report any issues found
-
Open the PDF for visual verification:
open Slides/$ARGUMENTS.pdf
-
Report results:
- Compilation success/failure
- Number of overfull hbox warnings
- Any undefined citations
- PDF page count
Why 3 passes?
- First xelatex: Creates
.aux file with citation keys
- bibtex: Reads
.aux, generates .bbl with formatted references
- Second xelatex: Incorporates bibliography
- Third xelatex: Resolves all cross-references with final page numbers
Important
- Always use XeLaTeX, never pdflatex
- TEXINPUTS is required: your Beamer theme lives in
Preambles/
- BIBINPUTS is required: your
.bib file lives in the repo root