Format and lint documents (LaTeX or DOCX). Validates syntax, checks citations, and ensures consistent formatting.
Resources
2Install
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
.texfiles for syntax errors - Checks citations: Verifies
\cite{}keys exist inreferences.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 cvprVenue-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
- Write content: Use
write-sectionto create sections - Format: Use
format-documentto validate and fix issues - Review: Use
review-paperfor content feedback - Compile: Use
compile-paperto 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/.