midhunxavier

Format Document

Format and lint documents (LaTeX or DOCX). Validates syntax, checks citations, and ensures consistent formatting.

midhunxavier 0 Updated 3mo ago

Resources

2
GitHub

Install

npx skillscat add midhunxavier/article-writing/format-document

Install via the SkillsCat registry.

SKILL.md

Format Document Skill

Format and lint documents for LaTeX or DOCX. Validates syntax, checks citations and references, and ensures consistent formatting.

Overview

This skill helps you:

  • Validate LaTeX/DOCX syntax
  • Check citation formatting
  • Verify cross-references
  • Ensure style consistency
  • Fix common formatting issues

Commands

/format-document <file> [--venue <venue>] [--format latex|docx]

Format and validate a document.

Parameters:

  • file (required): File or directory to format/validate
  • --venue <venue> (optional): Venue for style checking (e.g., neurips, cvpr, ieee)
  • --format latex|docx (optional): Document format (default: auto-detect)

Format Support

LaTeX

  • Lints .tex files for syntax errors
  • Checks citations: Verifies \cite{} keys exist in references.bib
  • Validates references: Ensures \ref{} has matching \label{}
  • Formatting rules: Proper equation environments, list formatting
  • Venue-specific checks: Page limits, formatting requirements

DOCX

  • Validates Word styles
  • Checks citation formatting
  • Ensures consistent formatting
  • Validates table of contents
  • Checks figure/table captions

Formatting Rules

LaTeX Elements

Element Best Practice
Equations Use \begin{equation} for numbered, \[...\] for unnumbered
Cross-refs Every \ref{} must have matching \label{}
Citations Use \cite{} with keys from references.bib
Lists Use itemize/enumerate environments
Math Inline: $...$, Display: \[...\] or \begin{equation}

DOCX Elements

  • Consistent heading styles
  • Proper paragraph formatting
  • Table formatting
  • Figure captions
  • Citation style consistency

Examples

# Format LaTeX file
/format-document main.tex --venue neurips

# Format all sections
/format-document sections/ --format latex

# Format DOCX document
/format-document paper.docx --format docx

# Check venue compliance
/format-document main.tex --venue cvpr

Venue-Specific Checks

NeurIPS

  • Page limit: 9 pages
  • Formatting requirements
  • Citation style

CVPR/ICCV

  • Page limit: 8 pages
  • Formatting requirements
  • Figure/table guidelines

IEEE

  • Page limit: 8 pages (conference)
  • Formatting requirements
  • Citation style

Common Issues Detected

  • Undefined references and citations
  • Citation formatting issues
  • Figure labeling problems
  • Common writing typos
  • Venue-specific requirements violations
  • Inconsistent formatting

Scripts Used

  • ./tex_linter.py - LaTeX linting and validation
  • ./docx_formatter.py - DOCX formatting and validation

Integration with Workflow

  1. Write content: Use write-section to create sections
  2. Format: Use format-document to validate and fix issues
  3. Review: Use review-paper for content feedback
  4. Compile: Use compile-paper to build final document

Platform Compatibility

Works on all platforms (Claude Code, Codex, OpenCode, Gemini, Cursor). Command syntax may vary by platform - see platform-specific documentation in docs/.