docrev 0.9.14 → 0.9.15

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.
package/README.md CHANGED
@@ -179,11 +179,12 @@ my-report/
179
179
  ├── references.bib
180
180
  ├── rev.yaml
181
181
  ├── paper.md ← combined sections (auto-generated)
182
- ├── my-report.docx ← output for collaborators
183
- └── my-report.pdf ← output for journals
182
+ └── output/
183
+ ├── my-report.docx ← output for collaborators
184
+ └── my-report.pdf ← output for journals
184
185
  ```
185
186
 
186
- The output filename is derived from your project title in `rev.yaml`. Citations are resolved, equations rendered, and cross-references numbered.
187
+ The output filename is derived from your project title in `rev.yaml`. Citations are resolved, equations rendered, and cross-references numbered. Set `outputDir: null` in `rev.yaml` if you'd rather have the built files land alongside `paper.md` (legacy layout).
187
188
 
188
189
  ### Starting from an Existing Word Document
189
190
 
@@ -201,14 +202,32 @@ Layout is controlled in `rev.yaml`:
201
202
 
202
203
  ```yaml
203
204
  title: "My Document"
204
- output:
205
- docx:
206
- reference-doc: template.docx # your Word template
207
- pdf:
208
- documentclass: article
209
- fontsize: 12pt
205
+ authors: []
206
+ sections:
207
+ - intro.md
208
+ - methods.md
209
+ - results.md
210
+ - discussion.md
211
+
212
+ # Where built artefacts land (default: output/). Set to null for the
213
+ # legacy "outputs alongside paper.md" layout.
214
+ outputDir: output
215
+
216
+ docx:
217
+ reference: template.docx # your Word template
218
+
219
+ pdf:
220
+ documentclass: article
221
+ fontsize: 12pt
222
+ engine: pdflatex # or xelatex/lualatex for Latin-Extended
223
+ # Fonts apply only under xelatex/lualatex (fontspec):
224
+ # mainfont: "TeX Gyre Termes"
225
+ # sansfont: "TeX Gyre Heros"
226
+ # monofont: "TeX Gyre Cursor"
210
227
  ```
211
228
 
229
+ Switch to `engine: xelatex` (or `lualatex`) when the manuscript has Czech/Polish/Croatian/Spanish names or species epithets that `pdflatex` mangles. Under those engines, `mainfont`/`sansfont`/`monofont` are forwarded to pandoc.
230
+
212
231
  Configure your name for comment replies:
213
232
 
214
233
  ```bash
@@ -321,6 +340,7 @@ Cross-references: `@fig:label`, `@tbl:label`, `@eq:label` → "Figure 1", "Table
321
340
  | Build DOCX | `rev build docx` |
322
341
  | Build PDF | `rev build pdf` |
323
342
  | Build clean + annotated | `rev build docx --dual` |
343
+ | Build with visible track changes | `rev build docx --show-changes` |
324
344
  | Sync Word feedback | `rev sync reviewed.docx` |
325
345
  | Sync PDF comments | `rev sync annotated.pdf` |
326
346
  | Extract PDF comments | `rev pdf-comments annotated.pdf` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docrev",
3
- "version": "0.9.14",
3
+ "version": "0.9.15",
4
4
  "description": "Academic paper revision workflow: Word ↔ Markdown round-trips, DOI validation, reviewer comments",
5
5
  "type": "module",
6
6
  "types": "dist/lib/types.d.ts",
@@ -61,11 +61,20 @@ rev build pdf # PDF only
61
61
  rev build docx # DOCX only
62
62
  rev build --toc # Include table of contents
63
63
  rev build docx --dual # Clean + annotated versions
64
+ rev build docx --show-changes # DOCX with visible track changes (audit)
64
65
  ```
65
66
 
67
+ By default, outputs land in `output/` next to `rev.yaml`. Override or
68
+ disable via the `outputDir` field in rev.yaml (see below).
69
+
66
70
  The `--dual` flag produces:
67
- - `paper.docx` — clean, for submission
68
- - `paper_comments.docx` — includes comment threads as Word comments
71
+ - `output/<title>.docx` — clean, for submission
72
+ - `output/<title>_comments.docx` — includes comment threads as Word comments
73
+
74
+ The `--show-changes` flag (DOCX only) produces a single audit document
75
+ where every accepted/rejected revision and substitution is exported as a
76
+ visible Word track change, attributed to the configured user. Useful when
77
+ a co-author wants to see what changed since the last shared version.
69
78
 
70
79
  ### rev preview
71
80
  Build and open document in default app.
@@ -342,6 +351,39 @@ rev config # Show current config
342
351
 
343
352
  ## rev.yaml Settings
344
353
 
354
+ ### Output Directory
355
+
356
+ By default, built artefacts land in `output/` next to `rev.yaml`. Both the
357
+ clean output and `--dual` companion (`*_comments.docx` / `*_comments.pdf`)
358
+ follow the configured location. Override or disable:
359
+
360
+ ```yaml
361
+ outputDir: output # default — outputs land in ./output/
362
+ outputDir: dist # custom subdirectory
363
+ outputDir: null # legacy layout — outputs alongside paper.md
364
+ ```
365
+
366
+ Explicit caller-supplied output paths (e.g. internal temp files in the
367
+ dual flow) bypass `outputDir`.
368
+
369
+ ### PDF Engine and Fonts
370
+
371
+ The default PDF engine is `pdflatex`. Switch to xelatex/lualatex when the
372
+ manuscript needs native UTF-8 rendering of Latin-Extended diacritics
373
+ (Czech/Polish/Croatian/Spanish author names, species epithets):
374
+
375
+ ```yaml
376
+ pdf:
377
+ engine: xelatex # or lualatex, tectonic, etc.
378
+ mainfont: "TeX Gyre Termes" # serif (xelatex/lualatex only — uses fontspec)
379
+ sansfont: "TeX Gyre Heros" # sans (optional)
380
+ monofont: "TeX Gyre Cursor" # monospace (optional)
381
+ ```
382
+
383
+ `mainfont`/`sansfont`/`monofont` are forwarded as pandoc `-V` flags and
384
+ require an engine that loads `fontspec` (xelatex or lualatex). They are
385
+ ignored under `pdflatex`.
386
+
345
387
  ### Tables
346
388
 
347
389
  Configure table formatting for PDF output:
package/skill/SKILL.md CHANGED
@@ -85,11 +85,20 @@ rev resolve methods.md -n 1 # Mark comment #1 as resolved
85
85
  ### 7. Rebuild with comment threads
86
86
 
87
87
  ```bash
88
- rev build docx --dual # Produces clean + annotated versions
88
+ rev build docx --dual # Produces clean + annotated versions
89
+ rev build docx --show-changes # Single DOCX with visible track changes
89
90
  ```
90
91
 
91
- - `paper.docx` — clean, for submission
92
- - `paper_comments.docx` — includes comment threads as Word comments
92
+ `--dual` produces:
93
+ - `output/<title>.docx` — clean, for submission
94
+ - `output/<title>_comments.docx` — comment threads as Word comments
95
+
96
+ `--show-changes` produces a single audit DOCX where every accepted/rejected
97
+ revision is rendered as a visible Word track change. Useful when a co-author
98
+ wants to see what changed since the last shared version.
99
+
100
+ Outputs land in `output/` by default; set `outputDir: null` in `rev.yaml`
101
+ to keep them alongside `paper.md` (legacy layout).
93
102
 
94
103
  ### 8. Archive reviewer files
95
104
 
@@ -135,6 +144,7 @@ rev response # Generate point-by-point response letter
135
144
  | Build PDF | `rev build pdf` |
136
145
  | Build clean + annotated Word | `rev build docx --dual` |
137
146
  | Build clean + annotated PDF | `rev build pdf --dual` |
147
+ | Build with visible track changes | `rev build docx --show-changes` |
138
148
  | Show contributors | `rev contributors` |
139
149
  | Lookup ORCID | `rev orcid 0000-0002-1825-0097` |
140
150
  | Archive reviewer files | `rev archive` |
@@ -193,9 +203,15 @@ my-document/
193
203
  ├── discussion.md
194
204
  ├── references.bib # Bibliography
195
205
  ├── figures/ # Images
196
- └── paper.docx # Built output
206
+ ├── paper.md # Combined sections (auto-generated)
207
+ └── output/ # Built artefacts
208
+ ├── my-document.docx
209
+ └── my-document.pdf
197
210
  ```
198
211
 
212
+ Set `outputDir: null` in `rev.yaml` to write outputs alongside `paper.md`
213
+ instead.
214
+
199
215
  ## PDF Comment Workflow
200
216
 
201
217
  For reviewers who annotate PDFs instead of Word documents: