paper-compile
Fungsinya
Versi Codex dari skill kompilasi makalah ini membangun makalah LaTeX menjadi PDF dan memperbaiki error. Skill ini untuk penulis yang menyiapkan makalah untuk dikirim lewat Codex.
Kapan dipakai
- โSaat makalah LaTeX Anda sudah siap dan Anda membutuhkan PDF.
- โSaat build gagal dan Anda perlu error-nya diperbaiki.
- โSaat error build yang sama terus kembali dan Anda membutuhkan pendapat kedua.
Link skill
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/skills-codex/paper-compile/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โSaya perlu makalah LaTeX saya dikompilasi menjadi PDF, dan saya ingin error build diperbaiki.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memeriksa alat dan file LaTeX, menjalankan build, dan membaca error. Agent memperbaiki dan membangun ulang hingga tiga kali. Jika error yang sama berulang, skill menyimpan log dan meminta pendapat kedua yang terfokus.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
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).
- RESCUE_ON_REPEAT_FAILURE = true โ If the same compile class fails after two attempts, preserve
compile.logand ask for a focused rescue / second opinion before further edits.
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-core
Verify 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/null
Step 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.log
Step 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
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.pdf
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.log
Step 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
Pertanyaan umum
Mesin apa yang bisa dipakai?
Secara bawaan pdflatex, dan bisa beralih ke xelatex atau lualatex untuk font khusus atau teks CJK.
Apakah skill memeriksa batas halaman?
Ya. Skill mengetahui aturan halaman untuk venue umum dan memeriksanya.
Bagaimana jika LaTeX belum terpasang?
Skill memeriksanya terlebih dahulu dan memberi langkah instalasi untuk macOS, Ubuntu, atau server.
Detail
Deskripsi asli dari pembuat
Compile LaTeX paper to PDF, fix errors, and verify output. Use when user says \\\"\u7f16\u8bd1\u8bba\u6587\\\", \\\"compile paper\\\", \\\"build PDF\\\", \\\"\u751f\u6210PDF\\\", or wants to compile LaTeX into a submission-ready PDF.
Popularitas
- Bintang GitHub
- 18k
- Peringkat
- #10607
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
ablation-planner
18kMembantu agent Anda merencanakan studi ablasi untuk sebuah makalah, memilih uji yang kemungkinan diminta reviewer setelah hasil utama terlihat baik.
alphaxiv
18kMemungkinkan agent Anda membaca satu makalah riset dengan cepat memakai ringkasan AlphaXiv, dengan teks lengkap atau sumber LaTeX sebagai cadangan, dari tautan arXiv atau ID.
analyze-results
18kMembantu agent Anda menganalisis hasil eksperimen machine learning, membandingkan jalankan dengan baseline, dan mengubah angka-angka itu menjadi temuan serta langkah berikutnya yang jelas.
arxiv
18kMemungkinkan agent Anda mencari makalah akademik di arXiv, membaca detailnya, dan menyimpan PDF ke perpustakaan Anda untuk topik riset.
Skill serupa
obsidian-vault-maintainer
394kMembantu agent Anda merapikan vault memori yang ramah Obsidian, dengan tautan wiki berfungsi, properti konsisten, dan bagian otomatis yang aman.
wiki-maintainer
394kMembantu agent Anda memelihara wiki memori OpenClaw dengan halaman yang dapat diulang, blok terkelola yang aman, dan pemeriksaan kontradiksi atau celah.
obsidian
394kMemungkinkan agent Anda membaca, mencari, membuat, dan mengedit catatan, tugas, tautan, dan properti Obsidian memakai baris perintah resmi Obsidian.