compile paper

📁 midhunxavier/article-writing 📅 Jan 1, 1970
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=build flag 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.json or 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)

  1. Run pdflatex (first pass)
  2. Run bibtex (process bibliography)
  3. Run pdflatex (resolve cross-references)
  4. Run pdflatex (final pass)
  5. Check page count
  6. Report status

DOCX

  1. Update all fields
  2. Generate table of contents
  3. Update cross-references
  4. Validate page count
  5. 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 checking
  • scripts/docx_builder.py – DOCX finalization

Integration with Workflow

  1. Write sections: Use write-section to create content
  2. Format: Use format-document to validate
  3. Compile: Use compile-paper to build PDF
  4. Check pages: Automatic page checking after compilation
  5. Review: Use review-paper for 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/.