Laitangtang-lab-workflows

Word Standards — Data skill for Claude Code

Data community

Generate journal-style Word documents from Markdown: a pandoc + raw-OOXML pipeline with every trap defused - equation numbers via \tag preprocessing, caption rules, DPI-aware image sizing, Cambria Mat.

How to install Word Standards

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Laitangtang-lab-workflows/word-standards and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Word Standards does

Generate journal-style Word documents from Markdown: a pandoc + raw-OOXML pipeline with every trap defused - equation numbers via \tag preprocessing, caption rules, DPI-aware image sizing, Cambria Math protection, verify-before-overwrite gates. Agent skill (SKILL.md). AI-maintained. CC0.

Alternatives in Data

  • Portaljs Add Dcat — Make a PortalJS portal harvestable by national/EU/US open-data portals — emit standards-compliant DCAT catalog 2.3k ★
  • Memex — Open-source, local-first AI journal app for iOS and Android 697 ★
  • Local News Site — Publish a local news article as a standalone Elementor page, with Google News-grade structured data and image 648 ★

README

word-standards

**Generate journal-style Word documents from Markdown: a pandoc + raw-OOXML pipeline with every trap already defused — equation numbers, caption rules, math fonts and all.**

[!NOTE] This repository is **written and maintained entirely by AI agents** under human direction — see [AI-maintained](#ai-maintained). Documentation is English-first; a Chinese README is available ([README.zh-CN.md](README.zh-CN.md)), and a Chinese SKILL companion ([SKILL.zh-CN.md](SKILL.zh-CN.md)).

Why

Turning a Markdown manuscript into a properly formatted .docx is deceptively hard: pandoc silently drops `\tag{}` equation numbers, implicit figures duplicate your captions, one careless font replacement destroys every equation, and the difference between `$1` and `\1` quietly corrupts the XML. This project packages a complete, battle-tested pipeline — distilled from a real research group's manuscript workflow — where every rule exists because a specific bug once slipped through:

  • Full md→docx pipeline (_rebuild_word.py): \tag preprocessing, style injection via pandoc's reference.docx mechanism, post-processing (caption sizing, image centering, DPI-aware image widths, tab-stop equation layout, table gridlines, reference-entry styling), and verify-before-overwrite gates.
  • In-place patcher (_fix_docx_format.py): three formatting fixes applied directly to a hand-edited docx, without regenerating and losing the edits.
  • A measured format specification: page geometry, typography, heading conventions, caption rules, equation layout and reference formatting — every value extracted from a real published manuscript, in copy-pasteable twips/pt tables.
  • The pitfall collection: twenty-plus confirmed traps across the pandoc layer, the OOXML/regex layer and general engineering practice, each with its countermeasure.

The skill format

The core of this repository is a **`SKILL.md` agent skill** (the convention used by Claude Code, DeepSeek Harness and