← 返回
未分类
中文
DOCX Editor
Read and generate Word documents with correct structure, styles, and cross-platform compatibility.
读取并生成结构、样式正确且跨平台兼容的 Word 文档。
dnaxxx-hub
未分类
clawhub
v1.0.0 1 版本 99512.2 Key: 无需
#document#docx#latest#office#python#word
概述
Structure
- DOCX is a ZIP containing XML files—
word/document.xml has main content, word/styles.xml has styles - Text splits into runs (
)—each run has uniform formatting; one word may span multiple runs - Paragraphs (
) 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
Lists & Numbering
- Numbering is complex:
abstractNum defines pattern, num references it, paragraphs reference numId - Restart numbering not automatic—need explicit
with restart flag - Bullets and numbers share the numbering system—both use
numId - Indentation controlled separately from numbering—list can exist without visual indent
Headers, Footers, Sections
- Each section can have different headers/footers—first page, odd, even pages
- Section breaks: next page, continuous, even/odd page—affects pagination
- Headers/footers stored in separate XML files—referenced by section properties
- Page numbers are fields, not static text—update on open or print
Track Changes & Comments
- Track changes stores original and revised in same document—accept/reject to finalize
- Deleted text still present with
wrapper—don't assume visible = all content - Comments reference ranges via bookmark IDs—
to - Revision IDs track who changed what—metadata persists even after accepting
Fields & Dynamic Content
- Fields have code and cached result—
{ DATE \@ "yyyy-MM-dd" } vs displayed date - TOC, page numbers, cross-references are fields—update fields to refresh
- Hyperlinks can be fields or direct
—both valid - MERGEFIELD for mail merge—placeholder until merge executes
Compatibility
- Compatibility mode limits features to earlier Word version—check
w:compat settings - LibreOffice/Google Docs: complex formatting may shift—test roundtrip
- Embedded fonts may not transfer—fallback fonts substitute
- DOCM contains macros (security risk); DOC is legacy binary format
Common Pitfalls
- Empty paragraphs for spacing—prefer space before/after in paragraph style
- Manual page breaks inside paragraphs—use section breaks for layout control
- Images in headers: relationship IDs are per-part—same image needs separate relationship in header
- Copy-paste brings source styles—can pollute style gallery with duplicates
版本历史
共 1 个版本
-
v1.0.0
当前
2026-05-29 21:43 安全 安全
安全检测
腾讯云安全 (Sanbu)
安全,无风险
查看报告
🔗 相关推荐
dnaxxx-hub
轻量级 Python 流程编排库。用于构建数据处理管道、工作流自动化、ETL 任务或任何多步骤计算...
★ 0
📥 339
dnaxxx-hub
在 Windows 上为 OpenClaw 配置本地 embedding / 本地记忆检索时使用。适用于:下载并接入 `nomic-embed-text-v1.5.Q8_0.gguf`、把 `memorySearch.provider` 改
★ 0
📥 198
dnaxxx-hub
A股量化交易工具包,基于腾讯行情API,支持实时行情、技术指标、策略回测、监控评分及自动日报生成。
★ 1
📥 250