Formatting a Chinese official document (GB/T 9704) from Markdown
Short answer: add a gongwen: block at the top of a Markdown file and write the body as usual. md-to-pdf-word lays it out according to GB/T 9704—2012 and produces a PDF and an editable Word file.
What the standard requires
GB/T 9704 fixes the layout of party and government documents: a 156 × 225 mm text block, Fangsong at size 3, 22 lines per page with 28 characters per line, a red header with the issuing authority, the issue number with hexagonal brackets 〔〕, and a record block (copies to, printed by, printing date) at the bottom of the last page.
A minimal document
---
title: 关于做好2026年度安全生产工作的通知
gongwen:
发文机关标志: 某某市人民政府文件
发文字号: 某政发〔2026〕12号
主送机关: 各区县人民政府,市政府各部门:
发文机关署名: 某某市人民政府
成文日期: 2026-10-24
---
# 一、总体要求
正文……
Every element is optional — copy number, classification, urgency, signer, notes, copies to, attachments — and missing ones are simply left out. The writing syntax lists all keys.
Heading levels
# 一、 (Heiti), ## (一) (Kaiti), ### 1. and #### (1) (Fangsong), all at body size. Turn on heading numbers to have the numerals added automatically.
Convert
Open the Chinese official documents page — the “Gov. document” style is preselected — and drop your file. The PDF follows the standard to within 0.05 mm in our measurements; the Word file keeps the same structure for further edits.
Fonts
FZXiaoBiaoSong (方正小标宋) is not installed on most computers, so titles use a bold Song typeface in Word. If your recipients have it, add heading-font: 方正小标宋简体.