Package Exports
- docrev
- docrev/annotations
- docrev/build
- docrev/citations
- docrev/crossref
- docrev/doi
- docrev/equations
- docrev/git
- docrev/grammar
- docrev/journals
- docrev/merge
- docrev/sections
- docrev/spelling
- docrev/trackchanges
- docrev/variables
- docrev/word
- docrev/wordcomments
Readme
docrev
Write papers in plain text. Generate Word when needed.
Why
Word documents corrupt. Versions multiply. Track changes become unreadable. Equations break. Figures embed at wrong resolutions.
docrev solves this: write in Markdown, generate Word/PDF for collaborators. They use Word normally. You get version control, clean diffs, and automated formatting.
Markdown files --> docrev --> Word/PDF
^ |
| v
+---- docrev <---- reviewer feedbackInstall
npm install -g docrev
brew install pandocStart a Project
From scratch:
rev new my-paper
cd my-paperFrom existing Word document:
rev import manuscript.docxProject structure:
my-paper/
├── introduction.md
├── methods.md
├── results.md
├── discussion.md
├── references.bib
└── rev.yamlMarkdown Basics
# Heading
Paragraph text. **Bold** and *italic*.
- Bullet point
- Another point
1. Numbered item
2. Second itemCitations
references.bib:
@article{Smith2020,
author = {Smith, Jane},
title = {Paper Title},
journal = {Nature},
year = {2020}
}In text:
Previous studies [@Smith2020] demonstrated this.Output: "Previous studies (Smith 2020) demonstrated this."
Equations
Inline: $E = mc^2$
Display:
$$
\hat{p} = \frac{\sum_d w_d p_d}{\sum_d w_d}
$$Figures
{#fig:map}
Results shown in @fig:map indicate regional variation.Output: "Results shown in Figure 1 indicate regional variation."
Figure numbers update automatically when reordered.
Build
rev build docx # Word document
rev build pdf # PDF
rev build --dual # Clean + comments versions
rev watch docx # Auto-rebuild on saveHandle Reviewer Feedback
Import reviewed document:
rev sections reviewed.docxView comments:
rev comments methods.mdReply to comment:
rev config user "Your Name"
rev reply methods.md -n 1 -m "Clarified sampling methodology"Rebuild with threaded comments:
rev build --dualOutput:
paper.docx(clean)paper_comments.docx(with comment threads)
Commands
| Task | Command |
|---|---|
| New project | rev new my-paper |
| Import Word | rev import manuscript.docx |
| Build Word | rev build docx |
| Build PDF | rev build pdf |
| Import feedback | rev sections reviewed.docx |
| View comments | rev comments methods.md |
| Reply to comment | rev reply methods.md -n 1 -m "text" |
| Word count | rev word-count |
| Validate DOIs | rev doi check |
| Pre-submit check | rev check |
Full reference: docs/commands.md
Requirements
- Node.js 18+
- Pandoc
# macOS
brew install pandoc
# Windows
winget install JohnMacFarlane.Pandoc
# Linux
sudo apt install pandocLicense
MIT