compile paper
1
总安装量
0
周安装量
#50984
全站排名
安装命令
npx skills add https://github.com/midhunxavier/article-writing --skill Compile Paper
Skill 文档
Compile Paper Skill
Compile LaTeX documents to PDF or finalize DOCX documents. Includes integrated page checking, error handling, and ensures all build artifacts are placed in the build/ folder.
Overview
This skill handles:
- Multi-pass LaTeX compilation (pdflatex + bibtex)
- DOCX finalization (updates fields, TOC)
- Automatic page checking
- Error handling and log parsing
- Clean build output management
Commands
/compile-paper [--watch] [--format latex|docx]
Compile or finalize a document.
Parameters:
--watch(optional): Auto-recompile on file changes--format latex|docx(optional): Document format (default: auto-detect)
Format Support
LaTeX
- Multi-pass compilation: pdflatex â bibtex â pdflatex (2x)
- Error handling: Parse log files, explain errors
- Clean build: Remove auxiliary files from root
- Watch mode: Monitor files and recompile on changes
DOCX
- Finalizes Word document
- Updates fields and cross-references
- Generates table of contents
- Page count validation
Build Output Management
All build artifacts go to build/ folder:
- PDF output:
build/main.pdf - Intermediate files:
.aux,.log,.bbl,.blg,.toc, etc. - Clean root directory: No build files in project root
- Automatic cleanup: Removes any stray build files from root if found
Compilation uses:
-output-directory=buildflag for LaTeX compilation- All intermediate files created in
build/folder - Final PDF placed in
build/main.pdf
Page Checking
After compilation:
- Automatically checks page count
- Compares against limit from
paper-config.jsonor template defaults - Warns if over limit or approaching limit
- Works on all platforms (integrated, not via hooks)
Default Page Limits:
| Template | Limit |
|---|---|
| CVPR/ICCV | 8 pages |
| NeurIPS | 9 pages |
| ACM | 10 pages |
| IEEE Conference | 8 pages |
Compilation Process
LaTeX (Multi-pass)
- Run
pdflatex(first pass) - Run
bibtex(process bibliography) - Run
pdflatex(resolve cross-references) - Run
pdflatex(final pass) - Check page count
- Report status
DOCX
- Update all fields
- Generate table of contents
- Update cross-references
- Validate page count
- Finalize document
Examples
# Compile LaTeX to PDF
/compile-paper
# Compile with watch mode
/compile-paper --watch
# Finalize DOCX
/compile-paper --format docx
Error Handling
- Parses LaTeX log files
- Identifies common errors
- Suggests fixes
- Reports undefined citations/references
- Validates file structure
Watch Mode
When --watch is enabled:
- Monitors source files for changes
- Automatically recompiles on save
- Useful during active writing/editing
Scripts Used
scripts/compile.py– LaTeX compilation with page checkingscripts/docx_builder.py– DOCX finalization
Integration with Workflow
- Write sections: Use
write-sectionto create content - Format: Use
format-documentto validate - Compile: Use
compile-paperto build PDF - Check pages: Automatic page checking after compilation
- Review: Use
review-paperfor feedback
Platform Compatibility
Works on all platforms (Claude Code, Codex, OpenCode, Gemini, Cursor). Command syntax may vary by platform – see platform-specific documentation in docs/.