AI Agent Hub
Back to skills
Chinese Official Document Typesetting Assistant icon

Chinese Official Document Typesetting Assistant

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_eff99d18/joyful-tree-9026 according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem It Solves

Chinese official documents, reports, and business files often require precise layout: page margins, heading fonts, body indentation, fixed line spacing, and page numbering cannot be fixed by visual tweaking alone. Manual edits are easy to miss, and template reuse can break due to font availability or Word version differences. This skill turns those layout rules into concrete steps, applying them to existing docx files or generating a new document from scratch.

How It Works

  • Existing documents: unpack the file with unpack.py, read word/document.xml, footers, and related XML, edit fonts, sizes, spacing, indentation, margins, and page number references, then repack with pack.py.
  • New documents: use docx-js to define styles and paragraphs, apply the same font, indentation, and spacing rules, and export a .docx file.
  • Key rules: margins of top 37mm, bottom 35mm, left 28mm, right 26mm; main title in FangZheng XiaoBiaoSong with single spacing; level 1 headings in 16pt SimHei; level 2 and 3 headings plus body text in KaiTi and FangSong with fixed 30pt spacing; body paragraphs indented by two characters; page numbers in 14pt SimSun.

Scope And Caveats

The skill is best suited for formal Chinese layout automation, not full English academic typesetting, complex table reflow, or pixel-perfect visual parity across platforms. Fonts such as FangZheng XiaoBiaoSong, FangSong GB2312, and KaiTi GB2312 may be substituted if missing. firstLineChars is preferred over fixed DXA indentation because it adjusts with font size. The “winged” page number style also depends on template or system support, so a centered page number is a safer fallback.

Use Cases

  • Normalize an existing report to official standards for margins, heading sizes, and body spacing.
  • Edit fonts, indentation, and page number references in `document.xml` before repacking.
  • Generate a new standard `.docx` file from scratch with `docx-js`.
  • Verify first-line indent, fixed 30pt line spacing, and page number formatting.

Best For

  • Government or enterprise office staff who need consistent official document formatting.
  • Administrative or clerical staff handling reports, notices, and meeting minutes.
  • Document managers maintaining internal Word templates and style consistency.
  • Engineers automating Word layout by editing `docx` XML or using `docx-js`.