Revision Workflow¶
The canonical version lives in your markdown files. Word is the exchange format — you build it when you need to share, and sync it when feedback comes back.
A revision cycle in brief:
- Build a Word document and send it to reviewers.
- They return it with track changes and comments.
rev syncpulls the feedback into your markdown sections.- Navigate comments with
rev nextandrev todo, reply withrev reply, accept or reject changes withrev accept. - Rebuild with
rev build docx --dual— a clean document and an annotated one with your replies threaded into the original Word comments. - Archive the reviewer's file. Repeat.
Starting a Project¶
From an existing Word document:
docrev splits the document at top-level headings and creates one .md file per section. Images land in figures/, equations convert from OMML to LaTeX, and any existing comments or track changes are preserved as CriticMarkup annotations.
From scratch:
The -s flag sets section names and skips the interactive prompt. Set your preferred sections once and future rev new calls use them automatically:
Either way, the project has this shape:
my-paper/
├── rev.yaml ← config: title, authors, section order, journal profile
├── intro.md ← section files — edit these
├── methods.md
├── results.md
├── discussion.md
├── references.bib ← BibTeX bibliography
├── figures/ ← images referenced from sections
├── paper.md ← auto-combined on each build, not hand-edited
└── output/
├── my-paper.docx
└── my-paper.pdf
paper.md is regenerated from the section files in the order set by rev.yaml; output files go to output/ by default. Set outputDir: null in rev.yaml if you prefer them alongside paper.md.
Writing in Markdown¶
Citations use pandoc-citeproc syntax — [@key] for one source, [@key1; @key2] for multiple:
Figures get a label so they can be referenced by number:
{#fig:temperature}
As shown in @fig:temperature, the trend has accelerated since 1970.
Equations use standard LaTeX — inline with $...$, display with $$...$$:
The forcing relationship follows $\Delta T = \lambda \cdot \Delta F$, where
$\lambda$ is the climate sensitivity parameter.
$$
\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i
$$ {#eq:mean}
Reference with @eq:mean → "Equation 1"
Simple tables take pipe syntax:
| Site | Lat | Long | n |
|------|------|--------|----|
| A | 45.2 | -120.5 | 48 |
| B | 52.1 | -105.3 | 61 |
: Study sites {#tbl:sites}
For merged cells or multi-line cell content, use grid table syntax:
+----------+----------+----------+
| Results |
+==========+==========+==========+
| Site | 2023 | 2024 |
+----------+----------+----------+
| A | 100 | 150 |
+----------+----------+----------+
: Annual measurements {#tbl:results}
Cross-references resolve automatically at build time — @fig:label, @tbl:label, @eq:label, @sec:label become "Figure 1", "Table 2", "Equation 3", "Section 4". Use rev migrate to convert hardcoded references (Fig. 1, Table 2) to dynamic ones if you're importing an existing document.
Building and Sharing¶
rev build docx # → output/my-paper.docx
rev build pdf # → output/my-paper.pdf
rev build docx pdf # both at once
Set a journal profile to get the right citation style and PDF formatting automatically:
Six profiles include formatting defaults — nature, science, cell, pnas, plos-one, elife. All 21 support validation. To see the full list:
For a live preview while you write:
Syncing Reviewer Feedback¶
When a reviewer returns a Word document with track changes and comments:
Track changes become CriticMarkup annotations inline in your section files:
Comments land with the reviewer's name:
If your markdown has changed since you sent the document out — new edits, reordered sections — run rev verify-anchors first to see which comments will land cleanly against the updated prose, then use --comments-only to import only comments (not track changes, which would overwrite your newer edits):
For reviewers who annotate PDFs rather than Word files:
Supported annotation types: sticky notes, text boxes, highlights, underlines, strikethrough, squiggly underlines. Use rev pdf-comments annotated.pdf --with-text to extract the text that was highlighted or struck through.
Track Changes¶
List what's pending:
Accept or reject individually, or all at once:
rev accept methods.md -n 1 # accept change #1
rev reject methods.md -n 2 # reject change #2
rev accept methods.md -a # accept all
For an interactive review with keyboard shortcuts (a/r/s/q):
Comments¶
Navigate pending comments:
rev todo # list all pending as a checklist
rev next # show the next one
rev next -n 3 # skip to the 3rd
rev comments methods.md # all comments in one section, with context
rev comments methods.md --author "Reviewer 2"
Reply with your name set once in config:
The reply appears adjacent to the original:
{>>Reviewer 2: The confidence intervals seem too narrow.<<} {>>Your Name: Clarified; the intervals are bootstrap CIs at 95%.<<}
Adjacent comments from different authors thread in Word automatically. Comments must be adjacent — no text between them — for threading to work.
Mark addressed:
Multiple Reviewers¶
When several reviewers return separate files, rev merge reconciles them against a shared baseline:
docrev compares each file against .rev/base.docx (saved automatically on every build) to isolate each reviewer's changes. Conflicts on the same passage are flagged for interactive resolution.
Rebuilding and Responding¶
Once you've handled the feedback, rebuild:
This produces two files — my-paper.docx (clean, for submission or the next round) and my-paper_comments.docx (with your replies threaded under the original Word comments). The same flag works for PDF, rendering comments as LaTeX margin notes:
Generate a point-by-point response letter from the resolved comments:
Archiving and Repeating¶
Move reviewer files out of the project folder:
rev archive # → archive/20241215_143022_reviewed.docx
rev archive --by Smith # → archive/20241215_143022_Smith_my-paper.docx
rev archive --dry-run # preview without moving
Take a snapshot before a major revision round:
The cycle continues: receive feedback, sync, handle changes and comments, rebuild, archive.
Pre-Submission Checks¶
rev check # full check: lint, citations, grammar
rev doi check references.bib # validate all DOIs
rev validate -j nature # journal-specific requirements
rev word-count -j nature # word limit, counted as the journal counts it
For journals with strict requirements, running rev validate --list shows which profiles are available and which include formatting support ([formatting] tag).
Quick Reference¶
| Task | Command |
|---|---|
| Start from Word | rev import manuscript.docx |
| Start fresh | rev new my-paper |
| Build DOCX | rev build docx |
| Build clean + annotated | rev build docx --dual |
| Build PDF | rev build pdf |
| Sync feedback | rev sync reviewed.docx |
| Sync comments only (prose changed) | rev sync reviewed.docx --comments-only |
| Check anchor drift | rev verify-anchors reviewed.docx |
| Project status | rev status |
| List pending | rev todo |
| Next comment | rev next |
| Accept all changes | rev accept file.md -a |
| Reply to comment | rev reply file.md -n 1 -m "..." |
| Archive reviewer files | rev archive |
| Response letter | rev response |
| Pre-submit check | rev check |