paper-compile
Skill16 starsChanged 6 months agoMITView on GitHub
Compile LaTeX paper to PDF, fix errors, and verify output. Use when user says \"编译论文\", \"compile paper\", \"build PDF\", \"生成PDF\", or wants to compile LaTeX into a submission-ready PDF.
- Installs packages
10 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- PKU-DAIR/AutoScitheir own version, first seen Oct 25, 2026
- DAIR-AutoResearch/AutoScitheir own version, first seen Oct 15, 2026
- skyllwt/OmegaWikitheir own version, first seen Oct 8, 2026
- skyllwt/AutoScitheir own version, first seen Sep 28, 2026
- talhaMah56/claude_skillsedited, first seen Sep 12, 2026
- wanshuiyin/Auto-claude-code-research-in-sleepedited, first seen Jul 15, 2026
Used with
Projects with it also use daily-arxiv, exp-eval and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
skyllwtSkillexp-pilot-eval
Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.
Also in 4 projects that use this
skyllwtSkillexp-pilot-run
Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.
Also in 4 projects that use this
phanghonghaoSkillposter
HTML/CSS A4 海报生成。从沙龙/活动 Markdown 文件生成科技风 A4 海报 PDF/PNG。Use when user mentions: poster, 海报, 海报生成, make poster, generate poster, 活动海报, 沙龙海报.
Also in 4 projects that use this
- +6 more from Lambenthan
- +1 more from skyllwt
Other versions10 projects use a version of this.
Word for word · 2
- Chanw-research/claude-code-paper-writing★ 42100% same
- raja21068/AutoResearch★ 2100% same
Edited · 3
- wanshuiyin/Auto-claude-code-research-in-sleep★ 19k100% same
- Yusong-Enceladus/claude-skills★ 894% same
- talhaMah56/claude_skills★ 0100% same
Wrote their own version · 5
- skyllwt/OmegaWiki★ 1.7ksame name
- DAIR-AutoResearch/AutoSci★ 1.7ksame name
- PKU-DAIR/AutoSci★ 1.7ksame name
- skyllwt/AutoSci★ 1.7ksame name
- Lambenthan/empiricalwiki★ 85same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- argument-stress-testSkill
- citation-auditSkill
- comm-lit-review-claude-singleSkill
- comparative-lawSkill
- exa-searchSkill
- feishu-notifySkill
- figure-descriptionSkill
- figure-specSkill
- formula-derivationSkill
- grant-proposalSkill
- legal-writingSkill
- llm-wikiSkill
- mermaid-diagramSkill
- novelty-checkSkill
- overleaf-syncSkill
- paper-claim-auditSkill
- paper-figureSkill
- paper-illustrationSkill
- paper-planSkill
- paper-posterSkill
- paper-slidesSkill
- paper-writeSkill
- paper-writingSkill
- prism-pipelineSkill
- proof-checkerSkill
- proof-writerSkill
- rebuttalSkill
- research-litSkill
- research-pipelineSkill
- research-refine-pipelineSkill
- research-refineSkill
- research-reviewSkill
- research-wikiSkill
- semantic-scholarSkill
- comm-lit-reviewSkill
- feishu-notifySkill
- formula-derivationSkill
- grant-proposalSkill
- mermaid-diagramSkill
- novelty-checkSkill
- paper-compileSkill
- paper-figureSkill
- paper-illustrationSkill
- paper-planSkill
- paper-posterSkill
- paper-slidesSkill
- paper-writeSkill
- paper-writingSkill
- proof-writerSkill
- rebuttalSkill
- research-litSkill
- research-pipelineSkill
- research-refine-pipelineSkill
- research-refineSkill
- research-reviewSkill
- statute-case-mapperSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 6 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Check that the compilation environment is ready:
- Distinctive: line 36
Verify all required files exist:
- Very specific: line 62
If compilation fails, read compile.log and fix common errors:
- Very specific: line 118
Read the error message from compile.log
- Very specific: line 123
Stuck after 2 attempts?: If Codex plugin is installed, invoke /codex:rescue — Codex can independently read the LaTeX source and compile.log …
- Distinctive: line 127
After successful compilation, verify the output:
- Distinctive: line 140
If the compiled PDF exists, read it directly to check visual presentation:
- Distinctive: line 145
No overfull content visibly extending past margins
- Very specific: line 167
CRITICAL: Verify paper fits within MAX_PAGES.
- Distinctive: line 192
If Conclusion ends mid-page and References start on the same page, the main body is that page number (e.g., if both are on page 9, main …
- Very specific: line 201
Check for orphaned section files not referenced by main.tex:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Paper Compile: LaTeX to Submission-Ready PDF
Compile the LaTeX paper and fix any issues: $ARGUMENTS
Constants
- COMPILER =
latexmk— LaTeX build tool. Handles multi-pass compilation automatically. - ENGINE =
pdflatex— LaTeX engine. Options:pdflatex(default),xelatex(for CJK/custom fonts),lualatex. - MAX_COMPILE_ATTEMPTS = 3 — Maximum attempts to fix errors and recompile.
- PAPER_DIR =
paper/— Directory containing LaTeX source files. - MAX_PAGES — Page limit. ML conferences: main body to Conclusion end (excluding references & appendix). ICLR=9, NeurIPS=9, ICML=8. IEEE venues: references ARE included in page count. IEEE journal ≈ 12-14 pages, IEEE conference ≈ 5-8 pages (all inclusive).
Workflow
Step 1: Verify Prerequisites
Check that the compilation environment is ready:
# Check LaTeX installation
which pdflatex && which latexmk && which bibtex
# If not installed, provide instructions:
# macOS: brew install --cask mactex-no-gui
# Ubuntu: sudo apt-get install texlive-full
# Server: conda install -c conda-forge texlive-coreVerify all required files exist:
# Must exist
ls $PAPER_DIR/main.tex
# Should exist
ls $PAPER_DIR/references.bib
ls $PAPER_DIR/sections/*.tex
ls $PAPER_DIR/figures/*.pdf 2>/dev/null || ls $PAPER_DIR/figures/*.png 2>/dev/nullStep 2: First Compilation Attempt
cd $PAPER_DIR
# Clean previous build artifacts
latexmk -C
# Full compilation (pdflatex + bibtex + pdflatex × 2)
latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex 2>&1 | tee compile.logStep 3: Error Diagnosis and Auto-Fix
If compilation fails, read compile.log and fix common errors:
Missing packages:
! LaTeX Error: File `somepackage.sty' not found.→ Install via tlmgr install somepackage or remove the \usepackage if unused.
Undefined references:
LaTeX Warning: Reference `fig:xyz' on page 3 undefined→ Check \label{fig:xyz} exists in the correct figure environment.
Missing figures:
! LaTeX Error: File `figures/fig1.pdf' not found.→ Check if the file exists with a different extension (.png vs .pdf). Update the \includegraphics path.
Citation undefined:
LaTeX Warning: Citation `smith2024' undefined→ Add the missing entry to references.bib or fix the citation key.
[VERIFY] markers in text:
→ Search for [VERIFY] markers left by /paper-write. These indicate unverified citations or facts. Search for the correct information or flag to the user.
Overfull hbox:
Overfull \hbox (12.5pt too wide) in paragraph at lines 42--45→ Minor: usually ignorable. If severe (>20pt), rephrase the text or adjust figure width.
BibTeX errors:
I was expecting a `,' or a `}'---line 15 of references.bib→ Fix BibTeX syntax (missing comma, unmatched braces, special characters in title).
\crefname undefined for custom theorem types:
→ Ensure \crefname{assumption}{Assumption}{Assumptions} and similar are in the preamble after \newtheorem{assumption}.
Step 4: Iterative Fix Loop
for attempt in 1..MAX_COMPILE_ATTEMPTS:
compile()
if success:
break
parse_errors()
auto_fix()For each error:
- Read the error message from
compile.log - Locate the source file and line number
- Apply the fix
- Recompile
Stuck after 2 attempts? If Codex plugin is installed, invoke /codex:rescue — Codex can independently read the LaTeX source and compile.log to spot issues Claude missed (e.g., conflicting packages, encoding problems, subtle macro errors). If not installed, continue with Claude's own diagnosis.
Step 5: Post-Compilation Checks
After successful compilation, verify the output:
# Check PDF exists and has content
ls -la main.pdf
# Check page count
pdfinfo main.pdf | grep Pages
# macOS: open for visual inspection
# open main.pdfVisual review (automated): If the compiled PDF exists, read it directly to check visual presentation:
- Figure quality: readable labels, legible text, distinguishable colors
- Layout: no orphaned section headers, no awkward page breaks
- Figures appear near their first text reference (not pages away)
- Tables: aligned columns, consistent decimal precision
- No overfull content visibly extending past margins
This is a quick visual scan, not a full review — the improvement loop does deeper visual review.
Automated checks:
- PDF file exists and is > 100KB (not empty/corrupt)
- Total page count is reasonable (MAX_PAGES + appendix + references)
- No "??" in the PDF (undefined references — grep the log)
- No "[?]" in the PDF (undefined citations — grep the log)
- Figures are rendered (not missing image placeholders)
# Check for undefined references
grep -c "LaTeX Warning.*undefined" compile.log
# Check for missing citations
grep -c "Citation.*undefined" compile.logStep 6: Page Count Verification
CRITICAL: Verify paper fits within MAX_PAGES.
For ML conferences (ICLR/NeurIPS/ICML/CVPR/ACL/AAAI): Main body = first page through end of Conclusion section (not necessarily §5 — could be §6, §7, or §8 depending on structure). References and appendix are NOT counted.
For IEEE venues: The TOTAL page count (including references) must fit within the limit. There is no separate "main body" counting — everything up to and including the references counts.
Precise check using pdftotext:
# Extract text and find where Conclusion ends vs References begin
pdftotext main.pdf - | python3 -c "
import sys
text = sys.stdin.read()
pages = text.split('\f')
for i, page in enumerate(pages):
if 'Ethics Statement' in page or 'Reproducibility' in page:
print(f'Conclusion ends on page {i+1}')
if any(w in page for w in ['References', 'Bibliography']):
lines = [l for l in page.split('\n') if l.strip()]
for l in lines[:3]:
if 'References' in l or 'Bibliography' in l:
print(f'References start on page {i+1}')
break
"If Conclusion ends mid-page and References start on the same page, the main body is that page number (e.g., if both are on page 9, main body = ~8.5 pages, which is fine for a 9-page limit since it leaves room for the References header).
If over limit:
- Identify which sections are longest
- Suggest specific cuts (move proofs to appendix, compress tables, tighten writing)
- Report: "Main body is X pages (limit: MAX_PAGES). Suggestion: move [specific content] to appendix."
Step 6.5: Stale File Detection
Check for orphaned section files not referenced by main.tex:
# Find all .tex files in sections/ and check which are \input'ed by main.tex
for f in paper/sections/*.tex; do
base=$(basename "$f")
if ! grep -q "$base" paper/main.tex; then
echo "WARNING: $f is not referenced by main.tex — consider removing"
fi
doneThis prevents confusion from leftover files when section structure changes (e.g., old 5_conclusion.tex left behind after restructuring to 7 sections).
Step 7: Submission Readiness
For conference submission, additional checks:
- Anonymous: no author names, affiliations, or self-citations that reveal identity
- Page limit: main body within MAX_PAGES (to end of Conclusion)
- Font embedding: all fonts embedded in PDF
pdffonts main.pdf | grep -v "yes" # should return nothing (or only header) - No supplementary mixed in: appendix clearly after
\newpage\appendix - File size: reasonable (< 50MB for most venues, < 10MB preferred)
- No
[VERIFY]markers: search the PDF text for leftover markers
Step 8: Output Summary
## Compilation Report
- **Status**: SUCCESS / FAILED
- **PDF**: paper/main.pdf
- **Pages**: X (main body to Conclusion) + Y (references) + Z (appendix)
- **Within page limit**: YES/NO (MAX_PAGES = N)
- **Errors fixed**: [list of auto-fixed issues]
- **Warnings remaining**: [list of non-critical warnings]
- **Undefined references**: 0
- **Undefined citations**: 0
### Next Steps
- [ ] Visual inspection of PDF
- [ ] Run `/paper-write` to fix any content issues
- [ ] Submit to [venue] via OpenReview / CMT / HotCRPKey Rules
- Never delete the user's source files — only modify to fix errors
- Keep compile.log — useful for debugging
- Don't suppress warnings — report them, let the user decide
- If LaTeX is not installed, provide clear installation instructions rather than failing silently
- Font embedding is critical — some venues reject PDFs with non-embedded fonts
- Page count rules differ by venue — ML conferences: main body to Conclusion (refs excluded). IEEE venues: total pages including references.
Common Venue Requirements
| Venue | Style File | Citation | Page Limit | Refs in limit? | Submission |
| ICLR 2026 | iclr2026_conference.sty | natbib (\citep/\citet) | 9 pages (to Conclusion end) | No | OpenReview |
| NeurIPS 2025 | neurips_2025.sty | natbib (\citep/\citet) | 9 pages (to Conclusion end) | No | OpenReview |
| ICML 2025 | icml2025.sty | natbib (\citep/\citet) | 8 pages (to Conclusion end) | No | OpenReview |
| IEEE Journal | IEEEtran.cls [journal] | cite (\cite{}, numeric) | ~12-14 pages (Transactions) / ~4-5 (Letters) | Yes | IEEE Author Portal / ScholarOne |
| IEEE Conference | IEEEtran.cls [conference] | cite (\cite{}, numeric) | 5-8 pages (varies by conf) | Yes | EDAS / IEEE Author Portal |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

