paper-compile
यह क्या करती है
यह स्किल LaTeX शोध-पेपर को PDF में बनाती है और बिल्ड रोकने वाली गलतियाँ ठीक करती है। यह उन लेखकों के लिए है जो पेपर जमा करने की तैयारी कर रहे हैं।
कब इस्तेमाल करें
- ✓जब आपका LaTeX पेपर तैयार हो और आपको PDF चाहिए।
- ✓जब LaTeX बिल्ड फ़ेल हो और आपको गलतियाँ ठीक करवानी हों।
- ✓जब आपको जाँचना हो कि पेपर आपके venue की पेज सीमा में फ़िट होता है।
Skill का लिंक
https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep/blob/main/skills/paper-compile/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरा LaTeX पेपर PDF में कंपाइल कीजिए, और जो बिल्ड की गलतियाँ मिलें उन्हें ठीक कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट जाँचता है कि टूल्स और फ़ाइलें मौजूद हैं, बिल्ड चलाता है और गलतियाँ पढ़ता है। वह उन्हें ठीक करता है और तीन प्रयास तक दोबारा बिल्ड करता है, फिर आउटपुट जाँचता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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).
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
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.pdf
Visual 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 >
अक्सर पूछे जाने वाले सवाल
यह कौन-सा LaTeX इंजन इस्तेमाल करती है?
डिफ़ॉल्ट रूप से pdflatex, और कस्टम फ़ॉन्ट या CJK टेक्स्ट के लिए xelatex या lualatex।
पेज सीमा कैसे संभालती है?
यह ICLR, NeurIPS और IEEE जैसे आम venues के पेज नियम जानती है और उनके हिसाब से जाँचती है।
क्या इसे LaTeX इंस्टॉल होना चाहिए?
हाँ। यह पहले LaTeX टूल्स जाँचती है, और अगर वे न हों तो इंस्टॉल के चरण बताती है।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 18k
- रैंकिंग में स्थान
- #10559
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
ablation-planner
18kआपके एजेंट को किसी शोधपत्र के लिए ablation अध्ययन की योजना बनाने में मदद करती है, मुख्य परिणाम अच्छे दिखने पर समीक्षकों द्वारा माँगे जाने वाले परीक्षण चुनते हुए।
alphaxiv
18kआपके एजेंट को AlphaXiv सार से एक शोधपत्र जल्दी पढ़ने देती है, पूरे पाठ या LaTeX स्रोत को बैकअप के रूप में रखकर, arXiv लिंक या ID से।
analyze-results
18kआपके एजेंट को मशीन लर्निंग प्रयोगों के परिणामों का विश्लेषण करने देती है, रनों की तुलना आधार रेखा से करती है, और आँकड़ों को स्पष्ट निष्कर्षों और अगले कदमों में बदलती है।
arxiv
18kआपके एजेंट को arXiv पर शैक्षणिक शोधपत्र खोजने, उनका विवरण पढ़ने, और किसी शोध विषय के लिए PDF आपकी लाइब्रेरी में सहेजने देती है।
मिलती-जुलती skills
obsidian-vault-maintainer
394kयह आपके एजेंट को Obsidian के अनुकूल मेमोरी vault व्यवस्थित रखने देती है, जिसमें काम करने वाले wiki लिंक, एक जैसी properties और सुरक्षित जेनरेटेड सेक्शन हों।
wiki-maintainer
394kयह आपके एजेंट को OpenClaw मेमोरी wiki दोहराए जा सकने वाले पेजों, सुरक्षित मैनेज्ड ब्लॉक्स और विरोधाभास या कमियों की जांच के साथ संभालने देती है।
obsidian
394kयह आपके एजेंट को आधिकारिक Obsidian कमांड-लाइन से Obsidian नोट्स, टास्क, लिंक और properties पढ़ने, खोजने, बनाने और बदलने देती है।