Skip to content

/compile-latex

Category: drafting
Field: economics
License: MIT
Updated: 2026-04
Stages: paper-drafting

Compile Beamer LaTeX Slides

Compile a Beamer slide deck using XeLaTeX with full citation resolution.

Steps

  1. Navigate to Slides/ directory and compile with 3-pass sequence:
Bash
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):

Bash
cd Slides
TEXINPUTS=../Preambles:$TEXINPUTS BIBINPUTS=..:$BIBINPUTS latexmk -xelatex -interaction=nonstopmode $ARGUMENTS.tex

  1. Check for warnings:
  2. Grep output for Overfull \\hbox warnings
  3. Grep for undefined citations or Label(s) may have changed
  4. Report any issues found

  5. Open the PDF for visual verification:

    Bash
    open Slides/$ARGUMENTS.pdf          # macOS
    # xdg-open Slides/$ARGUMENTS.pdf    # Linux
    

  6. Report results:

  7. Compilation success/failure
  8. Number of overfull hbox warnings
  9. Any undefined citations
  10. PDF page count

Why 3 passes?

  1. First xelatex: Creates .aux file with citation keys
  2. bibtex: Reads .aux, generates .bbl with formatted references
  3. Second xelatex: Incorporates bibliography
  4. 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