Pandoc Markdown manuscript template with DOCX-focused post-processing
Project description
Pandoc Manuscript Template
Write in Markdown. Submit in Word.
PMT is a DOCX-first academic writing workflow built for the AI era. AI tools are already great at drafting, revising, and restructuring Markdown. The problem is that many journals, editors, and collaborators still expect .docx. PMT bridges that gap: you keep the clarity and version-control friendliness of Markdown, while generating submission-ready Word documents when it is time to deliver.
Why This Exists
Markdown has become a very natural writing format for research teams, especially when AI is part of the drafting loop. It is easier to generate, review, diff, and refine than LaTeX for many authors. LaTeX is still powerful, but it is not always the most approachable tool for collaborators who mainly need to write and revise. Typst is promising, but it is not yet the default format most journals ask for.
DOCX, however, is still the format a lot of publishers, editors, and co-authors want.
PMT is built around that reality:
- Write the manuscript in Markdown.
- Keep sources easy for humans and AI to edit.
- Generate Word-first output for submission.
- Preserve the pieces academic writing actually needs: citations, equations, tables, figures, cross-references, and reviewer replies.
Why PMT
PMT is not just a generic Pandoc wrapper. It is a manuscript workflow with opinionated support for the annoying parts of real submission work.
- DOCX-first workflow: the primary target is a polished Word manuscript, not DOCX as an afterthought.
- AI-friendly authoring: Markdown is easier for LLMs to generate and easier for humans to review in Git.
- One-command project bootstrap:
pmt initcreates a reusable paper workspace with manuscript files, style metadata, references, and agent guidance. - Submission-oriented post-processing: PMT applies DOCX-specific cleanup and formatting after Pandoc runs.
- Reviewer reply support: build response letters as DOCX or TXT, while resolving manuscript references and citations.
- Managed Pandoc tools: if
pandocorpandoc-crossrefare missing, PMT can install project-local copies under.pmt/tools. - Optional LaTeX and JSON output: keep a Markdown-centered workflow without giving up other export targets.
What You Get
- Manuscript scaffolding with
pmt init - Environment checks with
pmt doctor - Project-local tool setup with
pmt setup - DOCX, LaTeX, and JSON builds with
pmt build - Reviewer reply builds with
pmt build-reply - Cross-references for figures, tables, equations, and sections
- CSL-based citations
- Reference DOCX support for Word styling
- DOCX post-processing for author blocks, table behavior, styles, and line-number-related workflows
- SVG handling and DOCX fallbacks for figures that Word does not handle well
- MathType-aware DOCX workflow when needed
Quick Start
Prerequisites
Install these tools first:
uvfor running the CLI and Python environmentpandoc3.0+ andpandoc-crossref- Optional: Microsoft Word or
sofficefor line-number source workflows - Optional: MathType if you need MathType-based DOCX equations
If pandoc or pandoc-crossref are not on PATH, PMT can download managed project-local copies into .pmt/tools.
Rough Python Compatibility Check
If you just want a quick syntax-level check against the project's minimum Python target, use Ruff:
uvx ruff check .
This is only a rough version-compatibility check. It can catch syntax that does not fit the configured Python target, but it does not prove runtime compatibility.
Create Your First Project
uvx --from git+https://github.com/cesaryuan/pandoc-manuscript-template pmt init my-paper
cd my-paper
pmt doctor
pmt build docx
That produces:
output/docx/manuscript.docx
If you prefer installing the tool once:
uv tool install --upgrade pandoc-manuscript-template
pmt init my-paper
Typical Workflow
# Create a new manuscript project
pmt init my-paper --setup
# Check dependencies and project files
pmt doctor
# Build the main manuscript
pmt build docx
# Build another Markdown file explicitly
pmt build docx paper.md -o build/paper.docx
# Build a reviewer reply
pmt build-reply reply.md --reply-manuscript manuscript.md -o output/docx/reply.docx
Standout Features
1. Markdown that stays pleasant to edit
PMT leans into plain-text authoring instead of fighting it. Your manuscript remains easy to diff, refactor, prompt into AI tools, and review collaboratively.
2. DOCX output that is actually the point
Many academic writing pipelines treat DOCX as a secondary export. PMT treats it as the main delivery format, with Word-oriented defaults and post-processing built into the workflow.
3. Better fit for real submission tasks
PMT goes beyond "convert Markdown to Word" by helping with the parts that tend to break late in the process:
- reviewer replies
- figure and table references
- equation numbering
- citation formatting
- Word reference documents
- DOCX figure edge cases such as SVG conversion or embedding
4. Friendly to automation without hiding the files
The output is scripted, reproducible, and version-controlled, but the source project still looks like a normal manuscript folder that a researcher can understand quickly.
Documentation Map
template/manuscript-syntax.md: manuscript syntax, citations, cross-references, pseudocode, revision markup, and style metadatatemplate/manuscript.md: example manuscript contentAGENTS.md: repository-specific guidance for coding agents
When PMT Is a Good Fit
PMT is especially useful if:
- you draft heavily with AI and want a format AI handles naturally
- you want Git-friendly manuscript sources instead of editing Word binaries directly
- your target journal still expects DOCX
- you need a repeatable manuscript and reviewer-reply workflow
- you want Pandoc power without forcing every collaborator into a LaTeX-first workflow
Commands at a Glance
pmt init my-paper
pmt setup
pmt doctor
pmt build docx
pmt build latex
pmt build json
pmt build-reply reply.md -o output/docx/reply.docx
pmt clean
pmt distclean
Use pmt --help to see the full CLI.
Acknowledgments
Support
- Review the syntax guide in
template/manuscript-syntax.md - Open an issue with a minimal reproducible example
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandoc_manuscript_template-0.1.10.tar.gz.
File metadata
- Download URL: pandoc_manuscript_template-0.1.10.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbab4df8a2c72712bf34065c92c271cf901bcbe221b61fbc71f9533857c12fe1
|
|
| MD5 |
7b03459d47eb2e5461744cba63f74bbc
|
|
| BLAKE2b-256 |
68d6fdae783107d656d221846c06061f3057d0a5f78f806a391cc59ea8c147e7
|
File details
Details for the file pandoc_manuscript_template-0.1.10-py3-none-any.whl.
File metadata
- Download URL: pandoc_manuscript_template-0.1.10-py3-none-any.whl
- Upload date:
- Size: 802.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
745e7ae5415e8ec5585235a70d0a8de8607b6abc0999497d2cdc7f3efa8bfc6a
|
|
| MD5 |
4b860f8d3ef5811d1a373daa6c633cbd
|
|
| BLAKE2b-256 |
e40ce88ae088609d6577fdf06ee1fe32282045257fbd37fe0247ee0541c4ce7d
|