Word / Docx
SKILL.md
Structure
- DOCX is a ZIP containing XML files—
word/document.xmlhas main content,word/styles.xmlhas styles - Text splits into runs (
<w:r>)—each run has uniform formatting; one word may span multiple runs - Paragraphs (
<w:p>) contain runs—never assume one paragraph = one text block - Sections control page layout—headers/footers, margins, orientation are per-section
Styles vs Direct Formatting
- Styles (Heading 1, Normal) are named and reusable—direct formatting is inline and overrides style
- Removing direct formatting reveals underlying style—useful for cleanup
- Character styles apply to runs, paragraph styles to paragraphs—they layer together
- Linked styles can be both—applying to paragraph or selected text behaves differently