agentleFS
WEN-JYWEN-JY/academic-research-skills/skills/markdown-to-word/AGENTS.md

academic-research-skills / markdown-to-word

AGENTS.md4 starsChanged 7 months agoMITView on GitHub

Convert Markdown files with LaTeX math, tables, and images to Word (.docx) using the bundled Node.js converter. The default output style is aimed at the common body-text rules of the Zhejiang University Master of Engineering Management thesis format. All scripts are bundled in skills/markdown-to-word/.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document contains LaTeX math, tables, images, or mixed Chinese/English text

    line 8
  2. Very specific:

    All scripts are bundled in skills/markdown-to-word/.

    line 13

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Markdown to Word Conversion

Convert Markdown files with LaTeX math, tables, and images to Word (.docx) using the bundled Node.js converter. The default output style is aimed at the common body-text rules of the Zhejiang University Master of Engineering Management thesis format.

When to Use

  • User wants to convert a .md file (especially academic papers) to .docx
  • Document contains LaTeX math, tables, images, or mixed Chinese/English text
  • User wants 正文小四仿宋、1.5 倍行距、章标题小三加黑、两端对齐、三线表等论文格式

Core Command

All scripts are bundled in skills/markdown-to-word/.

skills/markdown-to-word/convert_md_to_docx.sh [-o output.docx] input.md

Default Formatting Profile

  • 正文:小四号、仿宋、首行缩进 2 字符
  • 段落:段前 0 磅、段后 0 磅、1.5 倍行距、两端对齐
  • 一级标题:小三号、仿宋、加黑
  • 二级标题:四号、仿宋、加黑
  • 三级标题:小四号、仿宋
  • 二级标题编号后统一 2 个宋体空格,三级标题编号后统一 1 个宋体空格
  • 图题统一规范为 图1.1 图题 并按章内自增,表题统一规范为 表1.1 表题 并按章内自增
  • 块公式统一规范为 (1-1)、(1-2) 并按章内自增,公式居中、编号右对齐
  • 表格:三线表,单元格内容水平居左
  • 英文与数字:Times New Roman

Pipeline

input.md → 预处理(制表符表格 / 段落断行 / 中文标点) → markdown-it 解析 → docx 生成 → output.docx

Key Behaviors

  • 支持标题、段落、列表、引用块、代码块
  • 支持行内公式与块公式
  • 支持 Markdown 表格,并默认输出三线表
  • 支持本地图片插入
  • 支持 ^[1]、^[2,3]、^[4-6] 形式的数字引文上标
  • 生成完成后自动打开 Word 文件预览

Main Files

  • skills/markdown-to-word/convert_md_to_docx.sh
  • skills/markdown-to-word/md2docx.mjs
  • skills/markdown-to-word/latex2math.mjs

Dependencies

  • Node.js

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.