agentleFS
phanghonghaophanghonghao/THU-Awesome-Skills/skills/word2md/SKILL.md

word2md

Skill8 starsChanged 3 months agoMITView on GitHub

Convert Word (.docx) files with Office Math formulas to clean Markdown with LaTeX. Handles OMML to LaTeX conversion, Greek letters, subscripts, superscripts, fractions, and display/inline math.

  • Installs packages

The file

Files
SKILL.md

Word to Markdown Converter

Convert Word (.docx) files containing Office Math (OMML) formulas to clean Markdown with LaTeX math.

When to Use

  • User says "convert docx to md", "word to markdown", "word2md"
  • User provides a .docx file and wants it in Markdown format
  • User needs to extract math formulas from Word documents

How to Use

PYTHONIOENCODING=utf-8 python ~/.claude/skills/word2md/word2md.py "<input.docx>" ["<output.md>"]
  • input.docx (required): Path to the Word file
  • output.md (optional): Output file path. If omitted, prints to stdout

Examples

# Convert and print to stdout
PYTHONIOENCODING=utf-8 python ~/.claude/skills/word2md/word2md.py "document.docx"

# Convert and save to file
PYTHONIOENCODING=utf-8 python ~/.claude/skills/word2md/word2md.py "document.docx" "output.md"

Features

  • OMML to LaTeX: Converts Office Math XML elements (subscripts, superscripts, fractions, square roots, delimiters, sums/integrals, accents, limits, functions)
  • Unicode to LaTeX: Greek letters (alpha, beta, sigma...) and math symbols (geq, times, circ...)
  • Display vs inline math: oMathPara produces $$...$$, oMath produces $...$
  • Post-processing: Cleans up delimiter issues, fixes command spacing, bold headers

Dependencies

  • python-docx must be installed: python -m pip install python-docx

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.