Skip to main content

English | 简体中文

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 init creates 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 pandoc or pandoc-crossref are 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
  • Cross-platform MathType-compatible OLE/WMF equations, with an optional native MathType comparison path on Windows

Quick Start

Prerequisites

Install these tools first:

  1. uv for running the CLI and Python environment
  2. pandoc 3.0+ and pandoc-crossref
  3. Optional: Microsoft Word or soffice for line-number source workflows
  4. Optional: MathType on Windows only if you select rust-sdk, set-data, auto, or both; the default rust path is self-contained

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 pandoc-manuscript-template pmt init my-paper
cd my-paper
pmt doctor
pmt build docx

To initialize the manuscript project in the current directory, omit the target directory:

pmt init

That produces:

output/docx/manuscript.docx

If you prefer installing the tool once:

uv tool install --upgrade pandoc-manuscript-template
pmt init my-paper

After each pmt invocation, PMT reads its cached PyPI update status and prints an upgrade hint when one is available. A silent background worker refreshes that cache at most once every hour, so commands do not wait for network I/O. Upgrade an installed PMT tool with:

uv tool upgrade pandoc-manuscript-template

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

In generated projects, style.yml keeps PMT-owned build settings at the top level and places metadata sent to Pandoc under pandocMetadata. Manuscript YAML overrides only the Pandoc metadata domain.

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 [directory]
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.

Add --verbose to any command, for example pmt build docx --verbose, to show detailed debug logs such as complete external command lines. Normal output keeps the main build stages, warnings, and results concise.

Acknowledgments

Support

Typst equation font

Configure style.yml to select an installed OpenType math font:

mathtype: true
mathtypeConversionMethod: rust
mathtypeSvgBackend: typst
mathtypeTypstMathFont: Cambria Math

Bundled math families are XITS Math (the default) and New Computer Modern Math. You can also set mathtypeTypstMathFont: fonts/STIXTwoMath-Regular.otf to load a font file without installing it. Relative paths resolve beside the style file; absolute paths are supported. Accepted files are .otf, .ttf, .ttc, and .otc, and must contain an OpenType math font. Collections select their first math family. When using a custom family name, install it in every build environment. Changing the family or font file contents invalidates the formula preview cache. This controls Typst SVG/WMF previews, not editable MathType OLE font preferences. It has no effect on RaTeX or native MathType previews (set-data / rust-sdk). auto applies it only when using rust; both retains the native MathType result.

If the mathtype-rust or latex2wmf native library reports a formula conversion error, the build warns with the exit code and LaTeX input and continues. The affected formula retains its original Word equation (OMML); other formulas are converted normally. In both mode, conversion continues with the set-data result. Failed conversions are not cached.

Release files for pandoc-manuscript-template 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pandoc-manuscript-template 0.6.0
File Interpreter ABI Platform
pandoc_manuscript_template-0.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
pandoc_manuscript_template-0.6.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
pandoc_manuscript_template-0.6.0-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details

Total release size: 90.2 MB

Release files / pandoc_manuscript_template-0.6.0-py3-none-win_amd64.whl

Download URL pandoc_manuscript_template-0.6.0-py3-none-win_amd64.whl
Size 43.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
31a5f0dcb07c109f5533f035dad032e9bbc9bd0d49b40dd30f40a974053c7716
BLAKE2b-256 checksum
How to use checksums
729dfb227e33a6b3cc4ce93b7f9db3ad2475ccd167ef4c3eba2bae02ce78d15b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pandoc_manuscript_template-0.6.0-py3-none-manylinux_2_28_x86_64.whl

Download URL pandoc_manuscript_template-0.6.0-py3-none-manylinux_2_28_x86_64.whl
Size 24.2 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
45f12a1ac76e04e1dd804780e573def6affbf26af3c6c1507aed45d51e45d53d
BLAKE2b-256 checksum
How to use checksums
d10742db42cdd3d1e0507df879888fd2f40fd0c44d293846ebea295366b64416
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pandoc_manuscript_template-0.6.0-py3-none-macosx_14_0_arm64.whl

Download URL pandoc_manuscript_template-0.6.0-py3-none-macosx_14_0_arm64.whl
Size 22.9 MB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
eb19f3ff5e3f022bc4ee423f65003f2aece41feb0a74f867947f7c2a24997227
BLAKE2b-256 checksum
How to use checksums
305a72402326f969a5333ef0b85a24e0324e48a3362050bd2a2f3105113d421e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.6.4

3 release files

0.6.3

3 release files

0.6.2

3 release files

0.6.1

3 release files

This release

0.6.0 This release

3 release files

0.5.9

3 release files

0.5.8

3 release files

0.5.7

3 release files

0.5.5

3 release files

0.5.4

3 release files

0.5.3

3 release files

0.5.2

3 release files

0.5.1

3 release files

0.5.0

3 release files

0.4.0

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.1.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page