360 Secure SkillHub
360 安全技能中心

Chinese DOCX Typesetting Baseline

为中文 Word/DOCX 与公众号文章提供锁定设计基线:正文16px、小标题18px、标题23px、深蓝#1a3a5c标题色,禁用HTML表格/卡片/背景。适用中文文档排版、html-to-docx样式丢失或Windows转换失败、多文档风格统一。输入HTML或转换配置,输出可编辑DOCX,含失败恢复(预处理重试、python-docx重建)与验证清单。不适用英文文档、PDF、PPT。

haiyangchenbj
haiyangchenbj
热度 32.02
最近更新 2026-09-23 18:57:26
分类:效率依赖:代码执行 / 读写文件应用场景:文件转换 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add docx-chinese-baseline
Metadata
name
docx-chinese-baseline
slug
docx-chinese-baseline
displayName
Chinese DOCX Typesetting Baseline
version
1.0.2
description
Locked design-token baseline for Chinese Word/DOCX documents and WeChat-native (公众号) article layouts: body 16px, section head 18px, title 23px, deep-blue #1a3a5c headings, no HTML tables/cards/backgrounds. Use when typesetting a Chinese DOCX or WeChat article, when html-to-docx output loses styles or fails on Windows, or when successive documents must stay visually consistent. Trigger keywords: 中文 docx 排版, Word 中文文档美化, html to docx 样式丢失, 16 18 23 px 基线, 深蓝标题, 公众号排版, 微信文章排版, WeChat article typesetting, 字号基线, font size baseline, Windows html-to-docx 失败, DOCX 样式. Baseline changes must update this skill first.
description_zh
中文 Word 文档与公众号原生排版的锁定设计基线:正文 16px / 小标题 18px / 标题 23px、深蓝 #1a3a5c 标题色、禁 HTML 表格卡片背景、Windows html-to-docx 稳定转换路径。保证跨文档风格一致;基线变更必须先改本 skill。
read_when
Typesetting a Chinese DOCX or WeChat-native (公众号) article, aligning font/color tokens across documents, or when html-to-docx conversion loses styles or fails on Windows.
not_for
["English-language documents","PDF generation","Slides / PPT","Image-heavy poster design"]
agent_created
true

Chinese DOCX Typesetting Baseline

Purpose: one locked baseline instead of per-task improvisation. Every Chinese DOCX produced from HTML follows the same token set, so successive documents look consistent and conversion failures have a known recovery path.

Design Tokens (locked)

Element Token
Title (H1) 23px, deep blue #1a3a5c, bold
Section head (H2) 18px, deep blue #1a3a5c, bold
Body 16px, dark gray/black
Heading color #1a3a5c
WeChat-native layout vertical info bars + plain editorial style; NO HTML tables, cards, backgrounds, popup grids

Workflow

  1. [Deterministic] Pick the target style: WeChat-native article (strict no-table/no-card rules) or generic Word document (tables allowed, same font tokens).
  2. [Deterministic] Apply tokens: set title 23px / section 18px / body 16px, heading color #1a3a5c in the source HTML or converter config before conversion.
  3. [Deterministic] Convert with the html-to-docx pipeline.
  4. [Deterministic] Windows failure recovery: if the bundled converter fails on Windows, follow the html-to-docx recovery skill: pre-process the HTML (strip unsupported CSS constructs), retry once; if still failing, rebuild the document programmatically (e.g. python-docx) applying the same tokens paragraph by paragraph.
  5. [Deterministic] Verify the output: reopen the DOCX; confirm heading sizes 23/18/16 present, heading color #1a3a5c applied, CJK glyphs render correctly (no tofu), text remains editable (no flattened images).

Hard Rules

  • Never flatten text to images; the DOCX must stay fully editable.
  • WeChat-native layouts: no HTML tables, cards, background colors, or popup grids — vertical info bars only.
  • Baseline changes (sizes, colors) must update this skill first, then the documents. No per-task deviation.
  • Headings stay anchored to topic content (who / scene / problem), never filename-style titles.

Failure Handling

  • Converter crashes on Windows twice: switch to programmatic rebuild (python-docx) with the same tokens; do not debug the converter beyond two attempts.
  • Styles lost after conversion: verify the HTML source carries inline styles or a converter-compatible stylesheet before blaming the converter; fix the source, reconvert once.
  • CJK font issues: confirm the converter's font-fallback setting includes a Chinese font before changing the baseline.

Output Format

Report: target style chosen → conversion path used (direct / recovery / programmatic) → verification checklist results (sizes, color, editability) → output file path.