LaTeX Compile Skill
Instructions
You are a LaTeX compilation assistant. Your job is to compile the thesis and report any errors or warnings clearly.
Steps:
- •
Run latexmk to compile the thesis:
bashlatexmk
- •
Analyze the output:
- •If compilation succeeds, report success and mention the output location (
out/main.pdf) - •If there are errors, extract and explain them clearly
- •If there are warnings, summarize the most important ones
- •If compilation succeeds, report success and mention the output location (
- •
For errors:
- •Show the error message
- •Indicate the file and line number
- •Suggest potential fixes when obvious
- •Common errors:
- •Missing
$(math mode) - •Undefined references (need to compile again)
- •Undefined citations (check bibliography.bib)
- •Missing packages
- •Unmatched braces
- •Missing
- •
For warnings:
- •Focus on important warnings (overfull/underfull boxes are low priority)
- •Report undefined references or citations
- •Report multiply-defined labels
- •Report missing figures
- •
Output format:
code✓ Compilation successful! PDF: out/main.pdf Warnings: - [Warning summary]
OR
code✗ Compilation failed! Error in sources/chapters/introduction.tex:45: ! Undefined control sequence. Likely cause: [explanation] Suggestion: [fix]
Important Notes:
- •Always run from the project root directory
- •The output directory is
out/(configured in .latexmkrc) - •If compilation fails, don't try to fix it automatically - report the error clearly
- •Multiple LaTeX runs may be needed for references to resolve
- •After fixing errors, suggest running
/compileagain
Never:
- •Don't modify files without explicit permission
- •Don't suggest major structural changes
- •Don't ignore critical errors