word
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<instructions>
<word_document_professional_suite>
<quality_workflow>
For all professional deliverables, you MUST follow the "Render & Review" loop:
- Edit: Use for structure/styling or the Document library for XML edits.
python-docx - Render: Convert to PDF/PNG using and
soffice:pdftoppmsoffice --headless --convert-to pdf document.docxpdftoppm -png -r 150 document.pdf page
- Inspect: Read the generated PNG images. You MUST look for clipped text, overlapping shapes, or misaligned margins.
- Fix: Address defects and repeat the loop until the document is visually flawless. </quality_workflow>
<technical_workflows>
<instructions>
<word_document_professional_suite>
<quality_workflow>
对于所有专业交付成果,您必须遵循“渲染与审核”循环:
- 编辑:使用进行结构/样式编辑,或使用Document库进行XML编辑。
python-docx - 渲染:使用和
soffice转换为PDF/PNG:pdftoppmsoffice --headless --convert-to pdf document.docxpdftoppm -png -r 150 document.pdf page
- 检查:查看生成的PNG图片。您必须检查是否存在文本截断、形状重叠或边距错位问题。
- 修复:解决发现的问题并重复循环,直到文档视觉效果完美。 </quality_workflow>
<technical_workflows>
1. Creating New Documents
1. 创建新文档
- Python: You SHOULD use . Establish hierarchy with HeadingLevel styles.
python-docx - JavaScript: You SHOULD use . Reference: See
docx-jsfor syntax.references/docx-js.md - CRITICAL: You MUST NOT use for line breaks (use Paragraphs). You MUST NOT use Unicode bullets (use numbering config).
\nMUST be inside a Paragraph.PageBreak
- Python:您应使用。通过HeadingLevel样式建立文档层级。
python-docx - JavaScript:您应使用。参考:查看
docx-js获取语法说明。references/docx-js.md - 关键注意事项:禁止使用换行(请使用段落)。禁止使用Unicode项目符号(请使用编号配置)。
\n必须放在段落内。PageBreak
2. Redlining & Tracked Changes
2. 修订标记与追踪更改
For legal or business review:
- Initialize: Use . Reference: Read
scripts/document.pyfor XML patterns.references/ooxml.md - Procedure: Unpack (), edit XML using the Document Library, then Pack (
unpack.py).pack.py - Standard: You MUST only mark text that actually changes. Keep unchanged text outside /
<w:del>.<w:ins>
针对法律或商业审核场景:
- 初始化:使用。参考:阅读
scripts/document.py了解XML模式。references/ooxml.md - 流程:解压(),使用Document库编辑XML,然后打包(
unpack.py)。pack.py - 标准:仅对实际修改的文本进行标记。未修改的文本不得包含在/
<w:del>标签内。<w:ins>
3. Text Extraction
3. 文本提取
- You SHOULD use Pandoc to convert to markdown while preserving structure:
- </technical_workflows>
pandoc --track-changes=all path-to-file.docx -o output.md
<quality_expectations>
- Client-Ready: You MUST NOT use Unicode dashes (use ASCII hyphens). No internal AI tokens.
- Element Ordering: In , elements MUST follow schema order: Style -> Numbering -> Spacing -> Indent -> Alignment.
<w:pPr> - Visual Fidelity: Charts and tables MUST be sharp and legible in rendered previews. </quality_expectations>
</word_document_professional_suite>
</instructions>
- 您应使用Pandoc将文档转换为markdown并保留结构:
- </technical_workflows>
pandoc --track-changes=all path-to-file.docx -o output.md
<quality_expectations>
- 客户就绪标准:禁止使用Unicode破折号(请使用ASCII连字符)。不得包含内部AI标记。
- 元素顺序:在中,元素必须遵循架构顺序:样式 -> 编号 -> 间距 -> 缩进 -> 对齐。
<w:pPr> - 视觉保真度:图表和表格在渲染预览中必须清晰可读。 </quality_expectations>
</word_document_professional_suite>
</instructions>