name: compile-latex description: Compile a LaTeX manuscript with pdflatex (3 passes + bibtex). Use when compiling the research paper. disable-model-invocation: true argument-hint: "[filename without .tex extension]" allowed-tools: ["Read", "Bash", "Glob"]
Compile LaTeX Manuscript
Compile a LaTeX manuscript using the standard 3-pass sequence for full citation resolution.
Steps
-
Identify the file: Use
$ARGUMENTSas the base name (without.tex). If no argument, look for the main.texfile in the paper folder. -
Compile (from the paper folder):
pdflatex -interaction=nonstopmode $ARGUMENTS.tex bibtex $ARGUMENTS pdflatex -interaction=nonstopmode $ARGUMENTS.tex pdflatex -interaction=nonstopmode $ARGUMENTS.tex -
Check results:
- Grep for
Overfull \\hboxwarnings -- count them - Grep for
undefined citationsormissing references - Verify PDF was generated with non-zero size:
ls -la $ARGUMENTS.pdf - Report page count if
pdfinfois available
- Grep for
-
Report:
- Compilation: PASS / FAIL
- Warnings: N overfull hbox, N undefined citations
- PDF: exists, N pages, X KB
Notes
- Uses
pdflatexby default. Change toxelatexorlualatexif your project requires it. - The
.bibfile should be in the same directory or referenced with a relative path. - Parameter estimates loaded via
\input{}must exist at their referenced paths.