Loading...
Loading...
Convert Markdown documents to professionally styled DOCX (Word) files with python-docx. Handles CJK/Latin mixed text, fenced code blocks, tables, blockquotes, cover pages, TOC field, watermarks, and page numbers. Supports multiple color themes matching any2pdf (Warm Academic, Nord, GitHub Light, etc.) and is battle-tested for Chinese technical reports. Use this skill whenever the user wants to turn a .md file into a styled Word document, generate an editable report from markdown, or create a DOCX from markdown content — especially if CJK characters, code blocks, or tables are involved. Also trigger when the user mentions "markdown to docx", "md2docx", "any2docx", "md转word", "md转docx", "生成word", or asks for an "editable document" from markdown source.
npx skill4agent add lovstudio/skills lovstudio-any2docx.md.docxpython lovstudio-any2docx/scripts/md2docx.py \
--input report.md \
--output report.docx \
--title "My Report" \
--author "Author Name" \
--theme warm-academic--inputAskUserQuestionAskUserQuestionAskUserQuestion开始转 Word!先帮你确认几个选项 👇
━━━ 📐 设计风格 ━━━
a) 暖学术 — 陶土色调,温润典雅,适合人文/社科报告
b) 经典论文 — 棕色调,灵感源自 LaTeX classicthesis,适合学术论文
c) Tufte — 极简留白,深红点缀,适合数据叙事/技术写作
d) 期刊蓝 — 藏蓝严谨,灵感源自 IEEE,适合正式发表风格
e) 精装书 — 咖啡色调,书卷气,适合长篇专著/技术书
f) 中国红 — 朱红配暖纸,适合中文正式报告/白皮书
g) 水墨 — 纯灰黑,素雅克制,适合文学/设计类内容
h) GitHub — 蓝白极简,程序员熟悉的风格
i) Nord 冰霜 — 蓝灰北欧风,清爽现代
j) 海洋 — 青绿色调,清新自然
k) 投资报告 — 楷体+深红,专业严谨,适合投资/尽调报告
━━━ 💧 水印 ━━━
1) 不加
2) 自定义文字(如 "DRAFT"、"内部资料")
示例回复:"a, 水印:仅供内部参考"
直接说人话就行,不用记编号 😄| Choice | CLI arg |
|---|---|
| Design style a-k | |
| Watermark text | |
| Choice | |
|---|---|
| a) 暖学术 | |
| b) 经典论文 | |
| c) Tufte | |
| d) 期刊蓝 | |
| e) 精装书 | |
| f) 中国红 | |
| g) 水墨 | |
| h) GitHub | |
| i) Nord | |
| j) 海洋 | |
| k) 投资报告 | |
Markdown → Strip frontmatter → Preprocess (split merged headings) → Parse (code-fence-aware) → python-docx Document → .docx_split_mixed()_parse_inline()codeadd_picture()updateFields=truestatus: draft| Argument | Default | Description |
|---|---|---|
| (required) | Path to markdown file |
| | Output DOCX path |
| From first H1 | Document title for cover page |
| | Subtitle text |
| | Author name |
| Today | Date string |
| | Version string for cover |
| | Watermark text (empty = none) |
| | Color theme name |
| | Generate cover page |
| | Generate table of contents |
| | Report title in page header |
| author | Brand/author in footer |
| | Stats on cover |
| | Second stats line |
| | Edition line on cover |
| | Max lines per code block |
pip install python-docx --break-system-packages