mcpbeat

Compile Latex

pedrohcgs/compile-latex

Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex). Use when user says "compile", "build the slides", "rebuild the PDF", "run latex", "render the tex", or asks why a `.tex` file isn't producing a PDF. Operates on `Slides/*.tex`.

491 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1440
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/pedrohcgs/claude-code-my-workflow --skill compile-latex

The instruction itself

4 sections, as written by the author

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
  • Check for 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          # macOS
   # xdg-open Slides/$ARGUMENTS.pdf    # Linux
  • 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

How to use it

Copy the folder

Take pedrohcgs/compile-latex from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.