🌿 md2docx v1.0.0 · MIT
Polished Markdown → Word (.docx) rendering with real visual hierarchy, styled tables and CJK-aware fonts.
The problem
Default Markdown → Word conversions (raw pandoc, LibreOffice round-trips) produce a dull document: no heading hierarchy, tables without styled headers, and East-Asian fonts mishandled (wrong w:eastAsia attribute, so Chinese text falls back to the default Latin face). md2docx produces a presentable .docx you can send straight to colleagues or management.
What it does
- Headings (
#/##/###) rendered as a real hierarchy — accent colors, border rules, spacing. - Tables with dark header row, alternating row shading, and a repeating header on page breaks.
- Inline markup:
**bold**,*italic*,`code`— in headings, paragraphs, lists and table cells. - Lists, quotes, rules: bullets (
-,·,•), numbered items, block quotes, horizontal rules. - CJK-aware:
--lang zh|en|frfont profiles set the proper East-Asian font attributes (微软雅黑 headings / 宋体 body for zh) — not font-name hacks. - Optional centered footer (
--footer), justified body, print-friendly margins.
Install (pip)
pip install md2docx @ git+https://mandrilly.com/git/md2docx.git
Only dependency: python-docx.
Usage
md2docx report.md -o report.docx --lang zh md2docx report.md -o report.docx --lang en --footer "Team — September 2026"