docx-editor-cn
Installation
SKILL.md
DOCX creation, editing, and analysis
Overview
A .docx file is a ZIP archive containing XML files.
Quick Reference
| Task | Approach |
|---|---|
| Read/analyze content | pandoc or unpack for raw XML |
| Create new document | node scripts/new_doc.js (edit CONTENT section first) |
| Edit existing document | Unpack → edit XML → repack - see Editing Existing Documents below |
| Insert 三线表 (XML editing) | python scripts/table.py unpacked/ "1-1" "标题" --headers … --rows … |
| Insert block formula (XML editing) | python scripts/formula.py unpacked/ "LaTeX" 1 --anchor "锚文本" |
Converting .doc to .docx
Legacy .doc files must be converted before editing: