paper-compilation

Compile LaTeX papers to PDF with automatic error detection, chktex style checking, and citation/reference validation. Runs the full pdflatex + bibtex pipeline. Use when the user wants to compile a paper, fix compilation errors, or debug LaTeX.

By lingzhi227 · 1,413 installs

npx skills add lingzhi227/agent-research-skills --skill paper-compilation

Source repository · Upstream listing

Paper Compilation Compile a LaTeX paper to PDF with error detection and correction. Input $ARGUMENTS — Path to the main .tex file Scripts Compile paper Reports: compilation status, page count, warnings, citation/reference stats, style issues. Validate citations before compiling Auto fix LaTeX errors Fixes: HTML tags in LaTeX, mismatched environments, missing figures. Key flags: dry run , auto detect Compile with auto fix retry Runs fix latex errors.py + recompile up to 3 rounds until compilation succeeds. Workflow Step 1: Pre Compilation Validation Run validate citations.py to catch issues before compiling: Every \cite{key} has a matching .bib entry Every \includegraphics{file} exists No duplicate labels or sections Step 2: Compile Run compile paper.py which executes: pdflatex → bibtex → pdflatex → pdflatex Step 3: Error Correction Loop (up to 5 rounds) If compilation fails, read the error output and fix: ! Undefined control sequence → Add missing package or fix typo ! Missing $ inserted → Wrap math in $...$ ! Missing } inserted → Fix unmatched brace Citation 'key' undefined → Add to .bib or fix \cite </end{figure} → Replace with \end{figure} (HTML syntax in LaTeX) Apply minimal fixes. Do not remove packages unnecessarily. Recompile after each fix. Step 4: Post Compilation Report Check: page count vs venue limit, remaining warnings, chktex style issues. Troubleshooting pdflatex not found Alternative: latexmk (auto handles multiple passes) Related Skills Upstream: [latex formatting](../latex formatting/), [citation management](../citation management/), [figure generation](../figure generation/), [table generation](../table generation/) Downstream: [self review](../self review/) See also: [paper assembly](../paper assembly/)