JT

jessytsui/typeset

Developer tools

This page was translated automatically. Technical details may differ from the original. View the original

21 stars Quality 45 Trend 18

Generate Markdown into formatted Chinese .docx — contracts, agreements, official letters. Agent Skill。

Overview

Generate Markdown into standardized Chinese .docx—contracts, agreements, service confirmations, proposals, and official letters. This is an Agent Skill for Claude Code / Claude. It can also be used directly as a command-line tool. Even more troublesome are three types of issues visible only when opening Word: table cross-page split in half, clause headings left alone at the bottom, and signature areas where Party A is on the previous page and Party B on the next page. Note that LibreOffice cannot match "SimSun / Heiti" and will revert to Arial Unicode MS. The metrics for replacement words differ,—— the same contract will be 17 pages in Word, while LibreOffice will be 27 pages long. Therefore, LibreOffice is only used to check the structure (whether the table has been split or if the signature area is loose). verify.py will automatically detect whether the font has been replaced and prompt accordingly. SKILL.md is an open standard for Agent Skills, and can read Claude Code, Codex CLI, Gemini CLI, Cursor, and others. The discovery paths for the two tools are different: Then tell Claude or Codex, "Help me make this contract in Word," and it will be used automatically. Formatting parameters are concentrated in the constant block at the top of scripts/build.py. If you want to change the Fangsong font, font size, or margins, change it there—don't scatter it everywhere. For value selection, see references/house-style.md.

Overview (machine translated)

Generate Markdown into standardized Chinese .docx—contracts, agreements, service confirmations, proposals, and official letters.

This is an Agent Skill for Claude Code / Claude. It can also be used directly as a command-line tool.

Why is it needed?

pandoc x.md -o x.docx It works, but the product is for English blogs:

pandoc defaults to Chinese official documents require
Paper Pattern Letter A4
Title #0F4761 Blue, Not Bold Pure Black, Bold, Heiti
Western Typeface Aptos Times New Roman
Chinese font Topic revert, cross-machine inconsistency SimSun / Heiti explicit specification
Line spacing Single 1.5x (leaving comment space)

Even more troublesome are three types of issues visible only when opening Word: table cross-page split in half, clause headings left alone at the bottom, and signature areas where Party A is on the previous page and Party B on the next page.

Usage

Then actually look at the rendered jpg. If you pass every step and the document opens in Word, the layout might still look bad.

Note that LibreOffice cannot match “SimSun / Heiti” and will revert to Arial Unicode MS. Different replacement word metrics can even change page counts — the same contract will have 17 pages in Word and 27 pages in LibreOffice. Therefore, LibreOffice is only used to check structure (whether the table is split or if the signature area is scattered), and the final pagination and font appearance must be confirmed in Word. verify.py will automatically detect whether the font has been replaced and prompt it.

Starting with templates:

Four Sets of Cover and Seal Schemes

Solution Features
A Replica Reference Version The most common paradigm for domestic company contracts, default to select it
B Strict alignment version Label-value two columns + fill-in-the-blank line, suitable for manual filling in for printing
C Official Document Solemn Edition Information blocks with frames and enlarged titles create the most ceremonial feeling
D Modern Simple Version Left-aligned + fine line wrapping, looks best but without pagehead lines

Table of Contents

Installation

SKILL.md is the Agent Skills open standard, Claude Code, Codex CLI, Gemini CLI, Cursor, and others can read it. The discovery paths of the two tools are different:

Tools Paths
Codex CLI ~/.agents/skills/
Claude Code ~/.claude/skills/

Hold one portion, and it can be used in two places:

Then tell Claude or Codex, “Help me make this contract in Word,” and it will be used automatically.

Change your style

This page was translated automatically. Technical details may differ from the original.

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add jessytsui/typeset
New to MCP? Start with the mcpskill.org guide →