JSPM

  • Created
  • Published
  • Downloads 155
  • Score
    100M100P100Q89847F
  • License MIT

Academic paper revision workflow: Word ↔ Markdown round-trips, DOI validation, reviewer comments

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

npm

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 feedback

Install

npm install -g docrev
brew install pandoc

Start a Project

From scratch:

rev new my-paper
cd my-paper

From existing Word document:

rev import manuscript.docx

Project structure:

my-paper/
├── introduction.md
├── methods.md
├── results.md
├── discussion.md
├── references.bib
└── rev.yaml

Markdown Basics

# Heading

Paragraph text. **Bold** and *italic*.

- Bullet point
- Another point

1. Numbered item
2. Second item

Citations

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

![Study site locations](figures/map.png){#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 save

Handle Reviewer Feedback

Import reviewed document:

rev sections reviewed.docx

View comments:

rev comments methods.md

Reply to comment:

rev config user "Your Name"
rev reply methods.md -n 1 -m "Clarified sampling methodology"

Rebuild with threaded comments:

rev build --dual

Output:

  • 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 pandoc

License

MIT