docrev 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,518 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-bs-theme="light">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Get Started — docrev</title>
7
+ <meta name="description" content="CLI for writing documents in Markdown while collaborating with Word users.">
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.3/dist/sandstone/bootstrap.min.css">
9
+ <style>
10
+ html { -webkit-text-size-adjust: 100%; }
11
+ pre > code.sourceCode { white-space: pre; position: relative; }
12
+ pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
13
+ pre > code.sourceCode > span:empty { height: 1.2em; }
14
+ .sourceCode { overflow: visible; }
15
+ code.sourceCode > span { color: inherit; text-decoration: inherit; }
16
+ div.sourceCode { margin: 1em 0; }
17
+ pre.sourceCode { margin: 0; }
18
+ @media screen {
19
+ div.sourceCode { overflow: auto; }
20
+ }
21
+ @media print {
22
+ pre > code.sourceCode { white-space: pre-wrap; }
23
+ pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
24
+ }
25
+ pre.numberSource code
26
+ { counter-reset: source-line 0; }
27
+ pre.numberSource code > span
28
+ { position: relative; left: -4em; counter-increment: source-line; }
29
+ pre.numberSource code > span > a:first-child::before
30
+ { content: counter(source-line);
31
+ position: relative; left: -1em; text-align: right; vertical-align: baseline;
32
+ border: none; display: inline-block;
33
+ -webkit-touch-callout: none; -webkit-user-select: none;
34
+ -khtml-user-select: none; -moz-user-select: none;
35
+ -ms-user-select: none; user-select: none;
36
+ padding: 0 4px; width: 4em;
37
+ color: #aaaaaa;
38
+ }
39
+ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
40
+ div.sourceCode
41
+ { }
42
+ @media screen {
43
+ pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
44
+ }
45
+ code span.al { color: #ff0000; font-weight: bold; } /* Alert */
46
+ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
47
+ code span.at { color: #7d9029; } /* Attribute */
48
+ code span.bn { color: #40a070; } /* BaseN */
49
+ code span.bu { color: #008000; } /* BuiltIn */
50
+ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
51
+ code span.ch { color: #4070a0; } /* Char */
52
+ code span.cn { color: #880000; } /* Constant */
53
+ code span.co { color: #60a0b0; font-style: italic; } /* Comment */
54
+ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
55
+ code span.do { color: #ba2121; font-style: italic; } /* Documentation */
56
+ code span.dt { color: #902000; } /* DataType */
57
+ code span.dv { color: #40a070; } /* DecVal */
58
+ code span.er { color: #ff0000; font-weight: bold; } /* Error */
59
+ code span.ex { } /* Extension */
60
+ code span.fl { color: #40a070; } /* Float */
61
+ code span.fu { color: #06287e; } /* Function */
62
+ code span.im { color: #008000; font-weight: bold; } /* Import */
63
+ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
64
+ code span.kw { color: #007020; font-weight: bold; } /* Keyword */
65
+ code span.op { color: #666666; } /* Operator */
66
+ code span.ot { color: #007020; } /* Other */
67
+ code span.pp { color: #bc7a00; } /* Preprocessor */
68
+ code span.sc { color: #4070a0; } /* SpecialChar */
69
+ code span.ss { color: #bb6688; } /* SpecialString */
70
+ code span.st { color: #4070a0; } /* String */
71
+ code span.va { color: #19177c; } /* Variable */
72
+ code span.vs { color: #4070a0; } /* VerbatimString */
73
+ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
74
+ </style>
75
+ <link rel="stylesheet" href="assets/extra.css">
76
+ </head>
77
+ <body>
78
+
79
+ <nav class="navbar navbar-expand-lg fixed-top" aria-label="Site navigation">
80
+ <div class="container">
81
+ <a class="navbar-brand me-2" href="index.html">docrev</a>
82
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-main" aria-controls="navbar-main" aria-expanded="false" aria-label="Toggle navigation">
83
+ <span class="navbar-toggler-icon"></span>
84
+ </button>
85
+ <div class="collapse navbar-collapse" id="navbar-main">
86
+ <ul class="navbar-nav me-auto">
87
+ <li class="nav-item">
88
+ <a class="nav-link" href="index.html">Home</a>
89
+ </li>
90
+ <li class="nav-item">
91
+ <a class="nav-link active" aria-current="page" href="workflow.html">Get Started</a>
92
+ </li>
93
+ <li class="nav-item">
94
+ <a class="nav-link" href="commands.html">Commands</a>
95
+ </li>
96
+ <li class="nav-item">
97
+ <a class="nav-link" href="configuration.html">Configuration</a>
98
+ </li>
99
+ <li class="nav-item">
100
+ <a class="nav-link" href="troubleshooting.html">Troubleshooting</a>
101
+ </li>
102
+ </ul>
103
+ <ul class="navbar-nav">
104
+ <li class="nav-item">
105
+ <button id="theme-toggle" class="btn btn-link nav-link border-0" aria-label="Toggle dark mode">
106
+ <svg id="icon-sun" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
107
+ <path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707"/>
108
+ </svg>
109
+ <svg id="icon-moon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" style="display:none">
110
+ <path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278"/>
111
+ </svg>
112
+ </button>
113
+ </li>
114
+ <li class="nav-item">
115
+ <a class="nav-link" href="https://github.com/gcol33/docrev" aria-label="GitHub">
116
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16">
117
+ <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8"/>
118
+ </svg>
119
+ </a>
120
+ </li>
121
+ <li class="nav-item">
122
+ <a class="nav-link" href="https://www.npmjs.com/package/docrev" aria-label="npm">
123
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
124
+ <path d="M0 0v16h16V0zm5.333 13.333H2.667V5.333h2.666v5.334H8V5.333h2.667v8H5.333z"/>
125
+ </svg>
126
+ </a>
127
+ </li>
128
+ </ul>
129
+ </div>
130
+ </div>
131
+ </nav>
132
+
133
+ <div class="container template-article">
134
+ <div class="row">
135
+ <main id="main" class="col-md-9">
136
+ <h1 id="revision-workflow">Revision Workflow</h1>
137
+ <p>The canonical version lives in your markdown files. Word is the
138
+ exchange format — you build it when you need to share, and sync it
139
+ when feedback comes back.</p>
140
+ <p>A revision cycle in brief:</p>
141
+ <ol type="1">
142
+ <li>Build a Word document and send it to reviewers.</li>
143
+ <li>They return it with track changes and comments.</li>
144
+ <li><code>rev sync</code> pulls the feedback into your markdown
145
+ sections.</li>
146
+ <li>Navigate comments with <code>rev next</code> and
147
+ <code>rev todo</code>, reply with <code>rev reply</code>, accept
148
+ or reject changes with <code>rev accept</code>.</li>
149
+ <li>Rebuild with <code>rev build docx --dual</code> — a clean
150
+ document and an annotated one with your replies threaded into the
151
+ original Word comments.</li>
152
+ <li>Archive the reviewer’s file. Repeat.</li>
153
+ </ol>
154
+ <hr />
155
+ <h2 id="starting-a-project">Starting a Project</h2>
156
+ <p>From an existing Word document:</p>
157
+ <div class="sourceCode" id="cb1"><pre
158
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> import manuscript.docx</span></code></pre></div>
159
+ <p>docrev splits the document at top-level headings and creates
160
+ one <code>.md</code> file per section. Images land in
161
+ <code>figures/</code>, equations convert from OMML to LaTeX, and
162
+ any existing comments or track changes are preserved as
163
+ CriticMarkup annotations.</p>
164
+ <p>From scratch:</p>
165
+ <div class="sourceCode" id="cb2"><pre
166
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> new my-paper <span class="at">-s</span> intro,methods,results,discussion</span>
167
+ <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> my-paper</span></code></pre></div>
168
+ <p>The <code>-s</code> flag sets section names and skips the
169
+ interactive prompt. Set your preferred sections once and future
170
+ <code>rev new</code> calls use them automatically:</p>
171
+ <div class="sourceCode" id="cb3"><pre
172
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> config sections <span class="st">&quot;intro,methods,results,discussion&quot;</span></span></code></pre></div>
173
+ <p>Either way, the project has this shape:</p>
174
+ <pre><code>my-paper/
175
+ ├── rev.yaml ← config: title, authors, section order, journal profile
176
+ ├── intro.md ← section files — edit these
177
+ ├── methods.md
178
+ ├── results.md
179
+ ├── discussion.md
180
+ ├── references.bib ← BibTeX bibliography
181
+ ├── figures/ ← images referenced from sections
182
+ ├── paper.md ← auto-combined on each build, not hand-edited
183
+ └── output/
184
+ ├── my-paper.docx
185
+ └── my-paper.pdf</code></pre>
186
+ <p><code>paper.md</code> is regenerated from the section files in
187
+ the order set by <code>rev.yaml</code>; output files go to
188
+ <code>output/</code> by default. Set <code>outputDir: null</code>
189
+ in <code>rev.yaml</code> if you prefer them alongside
190
+ <code>paper.md</code>.</p>
191
+ <hr />
192
+ <h2 id="writing-in-markdown">Writing in Markdown</h2>
193
+ <p>Citations use pandoc-citeproc syntax — <code>[@key]</code> for
194
+ one source, <code>[@key1; @key2]</code> for multiple:</p>
195
+ <div class="sourceCode" id="cb5"><pre
196
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>Global temperatures have risen by 1.1°C since pre-industrial levels <span class="co">[</span><span class="ot">@IPCC2021</span><span class="co">]</span>.</span></code></pre></div>
197
+ <p>Figures get a label so they can be referenced by number:</p>
198
+ <div class="sourceCode" id="cb6"><pre
199
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="al">![Temperature anomalies since 1880](figures/temperature.png)</span>{#fig:temperature}</span>
200
+ <span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a></span>
201
+ <span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a>As shown in @fig:temperature, the trend has accelerated since 1970.</span></code></pre></div>
202
+ <p>Equations use standard LaTeX — inline with <code>$...$</code>,
203
+ display with <code>$$...$$</code>:</p>
204
+ <div class="sourceCode" id="cb7"><pre
205
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>The forcing relationship follows $\Delta T = \lambda \cdot \Delta F$, where</span>
206
+ <span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>$\lambda$ is the climate sensitivity parameter.</span>
207
+ <span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a></span>
208
+ <span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>$$</span>
209
+ <span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a>\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i</span>
210
+ <span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a>$$ {#eq:mean}</span>
211
+ <span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a></span>
212
+ <span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a>Reference with @eq:mean → &quot;Equation 1&quot;</span></code></pre></div>
213
+ <p>Simple tables take pipe syntax:</p>
214
+ <div class="sourceCode" id="cb8"><pre
215
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="pp">|</span> Site <span class="pp">|</span> Lat <span class="pp">|</span> Long <span class="pp">|</span> n <span class="pp">|</span></span>
216
+ <span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="pp">|------|------|--------|----|</span></span>
217
+ <span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="pp">|</span> A <span class="pp">|</span> 45.2 <span class="pp">|</span> -120.5 <span class="pp">|</span> 48 <span class="pp">|</span></span>
218
+ <span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="pp">|</span> B <span class="pp">|</span> 52.1 <span class="pp">|</span> -105.3 <span class="pp">|</span> 61 <span class="pp">|</span></span>
219
+ <span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a></span>
220
+ <span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a>: Study sites {#tbl:sites}</span></code></pre></div>
221
+ <p>For merged cells or multi-line cell content, use grid table
222
+ syntax:</p>
223
+ <div class="sourceCode" id="cb9"><pre
224
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>+----------+----------+----------+</span>
225
+ <span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="pp">|</span> Results <span class="pp">|</span></span>
226
+ <span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a>+========<span class="al">==+==========+==</span>========+</span>
227
+ <span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="pp">|</span> Site <span class="pp">|</span> 2023 <span class="pp">|</span> 2024 <span class="pp">|</span></span>
228
+ <span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a>+----------+----------+----------+</span>
229
+ <span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a><span class="pp">|</span> A <span class="pp">|</span> 100 <span class="pp">|</span> 150 <span class="pp">|</span></span>
230
+ <span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a>+----------+----------+----------+</span>
231
+ <span id="cb9-8"><a href="#cb9-8" aria-hidden="true" tabindex="-1"></a></span>
232
+ <span id="cb9-9"><a href="#cb9-9" aria-hidden="true" tabindex="-1"></a>: Annual measurements {#tbl:results}</span></code></pre></div>
233
+ <p>Cross-references resolve automatically at build time —
234
+ <code>@fig:label</code>, <code>@tbl:label</code>,
235
+ <code>@eq:label</code>, <code>@sec:label</code> become “Figure 1”,
236
+ “Table 2”, “Equation 3”, “Section 4”. Use <code>rev migrate</code>
237
+ to convert hardcoded references (Fig. 1, Table 2) to dynamic ones
238
+ if you’re importing an existing document.</p>
239
+ <hr />
240
+ <h2 id="building-and-sharing">Building and Sharing</h2>
241
+ <div class="sourceCode" id="cb10"><pre
242
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build docx <span class="co"># → output/my-paper.docx</span></span>
243
+ <span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build pdf <span class="co"># → output/my-paper.pdf</span></span>
244
+ <span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build docx pdf <span class="co"># both at once</span></span></code></pre></div>
245
+ <p>Set a journal profile to get the right citation style and PDF
246
+ formatting automatically:</p>
247
+ <div class="sourceCode" id="cb11"><pre
248
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build pdf <span class="at">-j</span> nature</span></code></pre></div>
249
+ <p>Six profiles include formatting defaults — <code>nature</code>,
250
+ <code>science</code>, <code>cell</code>, <code>pnas</code>,
251
+ <code>plos-one</code>, <code>elife</code>. All 21 support
252
+ validation. To see the full list:</p>
253
+ <div class="sourceCode" id="cb12"><pre
254
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> validate <span class="at">--list</span></span></code></pre></div>
255
+ <p>For a live preview while you write:</p>
256
+ <div class="sourceCode" id="cb13"><pre
257
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> watch docx <span class="co"># rebuilds on every save</span></span></code></pre></div>
258
+ <hr />
259
+ <h2 id="syncing-reviewer-feedback">Syncing Reviewer Feedback</h2>
260
+ <p>When a reviewer returns a Word document with track changes and
261
+ comments:</p>
262
+ <div class="sourceCode" id="cb14"><pre
263
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> sync reviewed.docx</span></code></pre></div>
264
+ <p>Track changes become CriticMarkup annotations inline in your
265
+ section files:</p>
266
+ <div class="sourceCode" id="cb15"><pre
267
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>The sample size was {--100--}{++150++} participants.</span>
268
+ <span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>Data was collected {~~monthly~&gt;weekly~~}.</span></code></pre></div>
269
+ <p>Comments land with the reviewer’s name:</p>
270
+ <div class="sourceCode" id="cb16"><pre
271
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>{&gt;&gt;Reviewer 2: The confidence intervals here seem too narrow. Please clarify.&lt;&lt;}</span></code></pre></div>
272
+ <p>If your markdown has changed since you sent the document out —
273
+ new edits, reordered sections — run
274
+ <code>rev verify-anchors</code> first to see which comments will
275
+ land cleanly against the updated prose, then use
276
+ <code>--comments-only</code> to import only comments (not track
277
+ changes, which would overwrite your newer edits):</p>
278
+ <div class="sourceCode" id="cb17"><pre
279
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> verify-anchors reviewed.docx</span>
280
+ <span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> sync reviewed.docx <span class="at">--comments-only</span></span></code></pre></div>
281
+ <p>For reviewers who annotate PDFs rather than Word files:</p>
282
+ <div class="sourceCode" id="cb18"><pre
283
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> sync annotated.pdf</span></code></pre></div>
284
+ <p>Supported annotation types: sticky notes, text boxes,
285
+ highlights, underlines, strikethrough, squiggly underlines. Use
286
+ <code>rev pdf-comments annotated.pdf --with-text</code> to extract
287
+ the text that was highlighted or struck through.</p>
288
+ <hr />
289
+ <h2 id="track-changes">Track Changes</h2>
290
+ <p>List what’s pending:</p>
291
+ <div class="sourceCode" id="cb19"><pre
292
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> accept methods.md</span></code></pre></div>
293
+ <p>Accept or reject individually, or all at once:</p>
294
+ <div class="sourceCode" id="cb20"><pre
295
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> accept methods.md <span class="at">-n</span> 1 <span class="co"># accept change #1</span></span>
296
+ <span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> reject methods.md <span class="at">-n</span> 2 <span class="co"># reject change #2</span></span>
297
+ <span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> accept methods.md <span class="at">-a</span> <span class="co"># accept all</span></span></code></pre></div>
298
+ <p>For an interactive review with keyboard shortcuts
299
+ (a/r/s/q):</p>
300
+ <div class="sourceCode" id="cb21"><pre
301
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> review methods.md</span></code></pre></div>
302
+ <hr />
303
+ <h2 id="comments">Comments</h2>
304
+ <p>Navigate pending comments:</p>
305
+ <div class="sourceCode" id="cb22"><pre
306
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> todo <span class="co"># list all pending as a checklist</span></span>
307
+ <span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> next <span class="co"># show the next one</span></span>
308
+ <span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> next <span class="at">-n</span> 3 <span class="co"># skip to the 3rd</span></span>
309
+ <span id="cb22-4"><a href="#cb22-4" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> comments methods.md <span class="co"># all comments in one section, with context</span></span>
310
+ <span id="cb22-5"><a href="#cb22-5" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> comments methods.md <span class="at">--author</span> <span class="st">&quot;Reviewer 2&quot;</span></span></code></pre></div>
311
+ <p>Reply with your name set once in config:</p>
312
+ <div class="sourceCode" id="cb23"><pre
313
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> config user <span class="st">&quot;Your Name&quot;</span></span>
314
+ <span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> reply methods.md <span class="at">-n</span> 1 <span class="at">-m</span> <span class="st">&quot;Added clarification in the revised text.&quot;</span></span></code></pre></div>
315
+ <p>The reply appears adjacent to the original:</p>
316
+ <div class="sourceCode" id="cb24"><pre
317
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a>{&gt;&gt;Reviewer 2: The confidence intervals seem too narrow.&lt;&lt;} {&gt;&gt;Your Name: Clarified; the intervals are bootstrap CIs at 95%.&lt;&lt;}</span></code></pre></div>
318
+ <p>Adjacent comments from different authors thread in Word
319
+ automatically. Comments must be adjacent — no text between them —
320
+ for threading to work.</p>
321
+ <p>Mark addressed:</p>
322
+ <div class="sourceCode" id="cb25"><pre
323
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> resolve methods.md <span class="at">-n</span> 1</span></code></pre></div>
324
+ <hr />
325
+ <h2 id="multiple-reviewers">Multiple Reviewers</h2>
326
+ <p>When several reviewers return separate files,
327
+ <code>rev merge</code> reconciles them against a shared
328
+ baseline:</p>
329
+ <div class="sourceCode" id="cb26"><pre
330
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> merge reviewer_A.docx reviewer_B.docx</span></code></pre></div>
331
+ <p>docrev compares each file against <code>.rev/base.docx</code>
332
+ (saved automatically on every build) to isolate each reviewer’s
333
+ changes. Conflicts on the same passage are flagged for interactive
334
+ resolution.</p>
335
+ <hr />
336
+ <h2 id="rebuilding-and-responding">Rebuilding and Responding</h2>
337
+ <p>Once you’ve handled the feedback, rebuild:</p>
338
+ <div class="sourceCode" id="cb27"><pre
339
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build docx <span class="at">--dual</span></span></code></pre></div>
340
+ <p>This produces two files — <code>my-paper.docx</code> (clean,
341
+ for submission or the next round) and
342
+ <code>my-paper_comments.docx</code> (with your replies threaded
343
+ under the original Word comments). The same flag works for PDF,
344
+ rendering comments as LaTeX margin notes:</p>
345
+ <div class="sourceCode" id="cb28"><pre
346
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build pdf <span class="at">--dual</span></span></code></pre></div>
347
+ <p>Generate a point-by-point response letter from the resolved
348
+ comments:</p>
349
+ <div class="sourceCode" id="cb29"><pre
350
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> response <span class="op">&gt;</span> response-letter.md</span></code></pre></div>
351
+ <hr />
352
+ <h2 id="archiving-and-repeating">Archiving and Repeating</h2>
353
+ <p>Move reviewer files out of the project folder:</p>
354
+ <div class="sourceCode" id="cb30"><pre
355
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> archive <span class="co"># → archive/20241215_143022_reviewed.docx</span></span>
356
+ <span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> archive <span class="at">--by</span> Smith <span class="co"># → archive/20241215_143022_Smith_my-paper.docx</span></span>
357
+ <span id="cb30-3"><a href="#cb30-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> archive <span class="at">--dry-run</span> <span class="co"># preview without moving</span></span></code></pre></div>
358
+ <p>Take a snapshot before a major revision round:</p>
359
+ <div class="sourceCode" id="cb31"><pre
360
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> backup <span class="at">--name</span> <span class="st">&quot;before-round-2&quot;</span></span></code></pre></div>
361
+ <p>The cycle continues: receive feedback, sync, handle changes and
362
+ comments, rebuild, archive.</p>
363
+ <hr />
364
+ <h2 id="pre-submission-checks">Pre-Submission Checks</h2>
365
+ <div class="sourceCode" id="cb32"><pre
366
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> check <span class="co"># full check: lint, citations, grammar</span></span>
367
+ <span id="cb32-2"><a href="#cb32-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> doi check references.bib <span class="co"># validate all DOIs</span></span>
368
+ <span id="cb32-3"><a href="#cb32-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> validate <span class="at">-j</span> nature <span class="co"># journal-specific requirements</span></span>
369
+ <span id="cb32-4"><a href="#cb32-4" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> word-count <span class="at">-j</span> nature <span class="co"># check against word limit</span></span></code></pre></div>
370
+ <p>For journals with strict requirements, running
371
+ <code>rev validate --list</code> shows which profiles are
372
+ available and which include formatting support
373
+ (<code>[formatting]</code> tag).</p>
374
+ <hr />
375
+ <h2 id="quick-reference">Quick Reference</h2>
376
+ <table>
377
+ <colgroup>
378
+ <col style="width: 40%" />
379
+ <col style="width: 60%" />
380
+ </colgroup>
381
+ <thead>
382
+ <tr>
383
+ <th>Task</th>
384
+ <th>Command</th>
385
+ </tr>
386
+ </thead>
387
+ <tbody>
388
+ <tr>
389
+ <td>Start from Word</td>
390
+ <td><code>rev import manuscript.docx</code></td>
391
+ </tr>
392
+ <tr>
393
+ <td>Start fresh</td>
394
+ <td><code>rev new my-paper</code></td>
395
+ </tr>
396
+ <tr>
397
+ <td>Build DOCX</td>
398
+ <td><code>rev build docx</code></td>
399
+ </tr>
400
+ <tr>
401
+ <td>Build clean + annotated</td>
402
+ <td><code>rev build docx --dual</code></td>
403
+ </tr>
404
+ <tr>
405
+ <td>Build PDF</td>
406
+ <td><code>rev build pdf</code></td>
407
+ </tr>
408
+ <tr>
409
+ <td>Sync feedback</td>
410
+ <td><code>rev sync reviewed.docx</code></td>
411
+ </tr>
412
+ <tr>
413
+ <td>Sync comments only (prose changed)</td>
414
+ <td><code>rev sync reviewed.docx --comments-only</code></td>
415
+ </tr>
416
+ <tr>
417
+ <td>Check anchor drift</td>
418
+ <td><code>rev verify-anchors reviewed.docx</code></td>
419
+ </tr>
420
+ <tr>
421
+ <td>Project status</td>
422
+ <td><code>rev status</code></td>
423
+ </tr>
424
+ <tr>
425
+ <td>List pending</td>
426
+ <td><code>rev todo</code></td>
427
+ </tr>
428
+ <tr>
429
+ <td>Next comment</td>
430
+ <td><code>rev next</code></td>
431
+ </tr>
432
+ <tr>
433
+ <td>Accept all changes</td>
434
+ <td><code>rev accept file.md -a</code></td>
435
+ </tr>
436
+ <tr>
437
+ <td>Reply to comment</td>
438
+ <td><code>rev reply file.md -n 1 -m "..."</code></td>
439
+ </tr>
440
+ <tr>
441
+ <td>Archive reviewer files</td>
442
+ <td><code>rev archive</code></td>
443
+ </tr>
444
+ <tr>
445
+ <td>Response letter</td>
446
+ <td><code>rev response</code></td>
447
+ </tr>
448
+ <tr>
449
+ <td>Pre-submit check</td>
450
+ <td><code>rev check</code></td>
451
+ </tr>
452
+ </tbody>
453
+ </table>
454
+ </main>
455
+ <aside class="col-md-3 d-none d-md-block">
456
+ <nav id="toc" data-toggle="toc" aria-label="On this page">
457
+ <h2 class="h6">On this page</h2>
458
+ <div class="toc"><ul>
459
+ <li><a href="#revision-workflow" id="toc-revision-workflow">Revision
460
+ Workflow</a>
461
+ <ul>
462
+ <li><a href="#starting-a-project" id="toc-starting-a-project">Starting a
463
+ Project</a></li>
464
+ <li><a href="#writing-in-markdown" id="toc-writing-in-markdown">Writing
465
+ in Markdown</a></li>
466
+ <li><a href="#building-and-sharing"
467
+ id="toc-building-and-sharing">Building and Sharing</a></li>
468
+ <li><a href="#syncing-reviewer-feedback"
469
+ id="toc-syncing-reviewer-feedback">Syncing Reviewer Feedback</a></li>
470
+ <li><a href="#track-changes" id="toc-track-changes">Track
471
+ Changes</a></li>
472
+ <li><a href="#comments" id="toc-comments">Comments</a></li>
473
+ <li><a href="#multiple-reviewers" id="toc-multiple-reviewers">Multiple
474
+ Reviewers</a></li>
475
+ <li><a href="#rebuilding-and-responding"
476
+ id="toc-rebuilding-and-responding">Rebuilding and Responding</a></li>
477
+ <li><a href="#archiving-and-repeating"
478
+ id="toc-archiving-and-repeating">Archiving and Repeating</a></li>
479
+ <li><a href="#pre-submission-checks"
480
+ id="toc-pre-submission-checks">Pre-Submission Checks</a></li>
481
+ <li><a href="#quick-reference" id="toc-quick-reference">Quick
482
+ Reference</a></li>
483
+ </ul></li>
484
+ </ul></div>
485
+ </nav>
486
+ </aside>
487
+ </div>
488
+ </div>
489
+
490
+ <footer class="border-top py-3 mt-auto">
491
+ <div class="container d-flex justify-content-between align-items-center text-muted" style="font-size:.85rem">
492
+ <span>docrev 0.9.15</span>
493
+ <span>Built with <a href="https://pandoc.org" class="text-muted">pandoc</a></span>
494
+ </div>
495
+ </footer>
496
+
497
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
498
+ <script>
499
+ (function () {
500
+ var html = document.documentElement;
501
+ var sun = document.getElementById('icon-sun');
502
+ var moon = document.getElementById('icon-moon');
503
+ function apply(t) {
504
+ html.setAttribute('data-bs-theme', t);
505
+ sun.style.display = t === 'dark' ? 'none' : '';
506
+ moon.style.display = t === 'dark' ? '' : 'none';
507
+ }
508
+ apply(localStorage.getItem('docrev-theme') || 'light');
509
+ document.getElementById('theme-toggle').addEventListener('click', function () {
510
+ var next = html.getAttribute('data-bs-theme') === 'dark' ? 'light' : 'dark';
511
+ localStorage.setItem('docrev-theme', next);
512
+ apply(next);
513
+ });
514
+ })();
515
+ </script>
516
+
517
+ </body>
518
+ </html>
@@ -62,6 +62,7 @@ rev build docx # DOCX only
62
62
  rev build --toc # Include table of contents
63
63
  rev build docx --dual # Clean + annotated versions
64
64
  rev build docx --show-changes # DOCX with visible track changes (audit)
65
+ rev build docx --dual --show-changes # One DOCX: tracked changes + threaded comments
65
66
  rev build docx --pandoc-arg=--lua-filter=tofill.lua # Pass extra args to pandoc
66
67
  rev build -o Final_Report # Override output filename (extension auto-added)
67
68
  rev build pdf --verbose # Echo the pandoc invocation (useful for filter debugging)
@@ -138,9 +139,19 @@ The `--dual` flag produces:
138
139
  - `output/<title>_comments.docx` — includes comment threads as Word comments
139
140
 
140
141
  The `--show-changes` flag (DOCX only) produces a single audit document
141
- where every accepted/rejected revision and substitution is exported as a
142
- visible Word track change, attributed to the configured user. Useful when
143
- a co-author wants to see what changed since the last shared version.
142
+ (`output/<title>-changes.docx`) where every insertion/deletion/substitution is
143
+ exported as a visible Word track change, attributed to the configured user.
144
+ Useful when a co-author wants to see what changed since the last shared
145
+ version. The revisions are emitted by pandoc as native run-level `w:ins`/`w:del`
146
+ elements through the full filter chain (crossref, citeproc, reference-doc,
147
+ macros) — not post-processed markers.
148
+
149
+ Combine `--dual --show-changes` to get one `output/<title>-changes.docx` with
150
+ tracked changes AND threaded comments: your `{++..++}`/`{--..--}` edits as
151
+ track changes alongside the reviewer's `{>>..<<}` comments and your threaded
152
+ replies. This is the standard "return to senior author" artifact. Add
153
+ `--reference <docx>` to realign comment anchors against a reviewer's copy
154
+ before injecting.
144
155
 
145
156
  ### rev preview
146
157
  Build and open document in default app.
package/skill/SKILL.md CHANGED
@@ -84,17 +84,24 @@ rev resolve methods.md -n 1 # Mark comment #1 as resolved
84
84
  ### 7. Rebuild with comment threads
85
85
 
86
86
  ```bash
87
- rev build docx --dual # Produces clean + annotated versions
88
- rev build docx --show-changes # Single DOCX with visible track changes
87
+ rev build docx --dual # Produces clean + annotated versions
88
+ rev build docx --show-changes # Single DOCX with visible track changes
89
+ rev build docx --dual --show-changes # One DOCX: tracked changes + threaded comments
89
90
  ```
90
91
 
91
92
  `--dual` produces:
92
93
  - `output/<title>.docx` — clean, for submission
93
94
  - `output/<title>_comments.docx` — comment threads as Word comments
94
95
 
95
- `--show-changes` produces a single audit DOCX where every accepted/rejected
96
- revision is rendered as a visible Word track change. Useful when a co-author
97
- wants to see what changed since the last shared version.
96
+ `--show-changes` produces a single audit DOCX (`<title>-changes.docx`) where
97
+ every accepted/rejected revision is rendered as a visible Word track change.
98
+ Useful when a co-author wants to see what changed since the last shared version.
99
+
100
+ `--dual --show-changes` combines both into one `<title>-changes.docx`: my
101
+ `{++..++}`/`{--..--}` edits as tracked changes *and* the reviewer's `{>>..<<}`
102
+ comments with my threaded replies. This is the file a supervisor opens,
103
+ reviews next to each other, and hands back. Add `--reference <docx>` to
104
+ realign comment anchors against a reviewer's copy first.
98
105
 
99
106
  Outputs land in `output/` by default; set `outputDir: null` in `rev.yaml`
100
107
  to keep them alongside `paper.md` (legacy layout). The basename is derived