docrev 0.6.3 → 0.6.5
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 +133 -74
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,118 +1,177 @@
|
|
|
1
1
|
# docrev
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/docrev)
|
|
4
|
-
[](https://nodejs.org/)
|
|
5
|
-
[](https://opensource.org/licenses/MIT)
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
**Write papers in plain text. Generate Word when needed.**
|
|
6
|
+
|
|
7
|
+
## Why
|
|
8
|
+
|
|
9
|
+
Word documents corrupt. Versions multiply. Track changes become unreadable. Equations break. Figures embed at wrong resolutions.
|
|
10
|
+
|
|
11
|
+
docrev solves this: write in Markdown, generate Word/PDF for collaborators. They use Word normally. You get version control, clean diffs, and automated formatting.
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Markdown files --> docrev --> Word/PDF
|
|
15
|
+
^ |
|
|
16
|
+
| v
|
|
17
|
+
+---- docrev <---- reviewer feedback
|
|
18
|
+
```
|
|
8
19
|
|
|
9
20
|
## Install
|
|
10
21
|
|
|
11
22
|
```bash
|
|
12
23
|
npm install -g docrev
|
|
24
|
+
brew install pandoc
|
|
13
25
|
```
|
|
14
26
|
|
|
15
|
-
|
|
27
|
+
## Start a Project
|
|
16
28
|
|
|
29
|
+
From scratch:
|
|
17
30
|
```bash
|
|
18
|
-
|
|
19
|
-
|
|
31
|
+
rev new my-paper
|
|
32
|
+
cd my-paper
|
|
33
|
+
```
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
rev
|
|
35
|
+
From existing Word document:
|
|
36
|
+
```bash
|
|
37
|
+
rev import manuscript.docx
|
|
24
38
|
```
|
|
25
39
|
|
|
26
|
-
|
|
40
|
+
Project structure:
|
|
41
|
+
```
|
|
42
|
+
my-paper/
|
|
43
|
+
├── introduction.md
|
|
44
|
+
├── methods.md
|
|
45
|
+
├── results.md
|
|
46
|
+
├── discussion.md
|
|
47
|
+
├── references.bib
|
|
48
|
+
└── rev.yaml
|
|
49
|
+
```
|
|
27
50
|
|
|
28
|
-
|
|
29
|
-
# Create new project
|
|
30
|
-
rev new my-paper
|
|
51
|
+
## Markdown Basics
|
|
31
52
|
|
|
32
|
-
|
|
33
|
-
|
|
53
|
+
```markdown
|
|
54
|
+
# Heading
|
|
55
|
+
|
|
56
|
+
Paragraph text. **Bold** and *italic*.
|
|
34
57
|
|
|
35
|
-
|
|
58
|
+
- Bullet point
|
|
59
|
+
- Another point
|
|
36
60
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
rev build docx
|
|
40
|
-
rev build --dual # Clean + comments DOCX with threaded comments
|
|
61
|
+
1. Numbered item
|
|
62
|
+
2. Second item
|
|
41
63
|
```
|
|
42
64
|
|
|
43
|
-
|
|
65
|
+
### Citations
|
|
44
66
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
references.bib:
|
|
68
|
+
```bibtex
|
|
69
|
+
@article{Smith2020,
|
|
70
|
+
author = {Smith, Jane},
|
|
71
|
+
title = {Paper Title},
|
|
72
|
+
journal = {Nature},
|
|
73
|
+
year = {2020}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
48
76
|
|
|
49
|
-
|
|
50
|
-
|
|
77
|
+
In text:
|
|
78
|
+
```markdown
|
|
79
|
+
Previous studies [@Smith2020] demonstrated this.
|
|
80
|
+
```
|
|
51
81
|
|
|
52
|
-
|
|
53
|
-
rev comments methods.md
|
|
54
|
-
rev reply methods.md -n 1 -m "Added clarification"
|
|
82
|
+
Output: "Previous studies (Smith 2020) demonstrated this."
|
|
55
83
|
|
|
56
|
-
|
|
57
|
-
|
|
84
|
+
### Equations
|
|
85
|
+
|
|
86
|
+
Inline: `$E = mc^2$`
|
|
87
|
+
|
|
88
|
+
Display:
|
|
89
|
+
```markdown
|
|
90
|
+
$$
|
|
91
|
+
\hat{p} = \frac{\sum_d w_d p_d}{\sum_d w_d}
|
|
92
|
+
$$
|
|
58
93
|
```
|
|
59
94
|
|
|
60
|
-
|
|
95
|
+
### Figures
|
|
61
96
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- **Interactive review** - Accept/reject track changes with TUI
|
|
65
|
-
- **Comment threading** - Guy→Gilles reply pairs become threaded Word comments
|
|
66
|
-
- **Cross-references** - `@fig:label` → "Figure 1" (auto-converted from Word)
|
|
67
|
-
- **DOI validation** - Check and lookup DOIs via Crossref/DataCite
|
|
68
|
-
- **Journal validation** - Check against 21 journal requirement profiles
|
|
97
|
+
```markdown
|
|
98
|
+
{#fig:map}
|
|
69
99
|
|
|
70
|
-
|
|
100
|
+
Results shown in @fig:map indicate regional variation.
|
|
101
|
+
```
|
|
71
102
|
|
|
72
|
-
|
|
73
|
-
|---------|-------------|
|
|
74
|
-
| `rev build [pdf\|docx\|tex]` | Build outputs from sections |
|
|
75
|
-
| `rev build --dual` | Clean + comments DOCX |
|
|
76
|
-
| `rev import <docx>` | Bootstrap project from Word |
|
|
77
|
-
| `rev sections <docx>` | Import to existing section files |
|
|
78
|
-
| `rev review <file>` | Interactive accept/reject TUI |
|
|
79
|
-
| `rev comments <file>` | List comments with context |
|
|
80
|
-
| `rev reply <file> -n N -m "text"` | Reply to comment |
|
|
81
|
-
| `rev doi check [file.bib]` | Validate DOIs |
|
|
82
|
-
| `rev doi lookup [file.bib]` | Find missing DOIs |
|
|
83
|
-
| `rev validate -j <journal>` | Check journal requirements |
|
|
103
|
+
Output: "Results shown in Figure 1 indicate regional variation."
|
|
84
104
|
|
|
85
|
-
|
|
105
|
+
Figure numbers update automatically when reordered.
|
|
86
106
|
|
|
87
|
-
##
|
|
107
|
+
## Build
|
|
88
108
|
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
109
|
+
```bash
|
|
110
|
+
rev build docx # Word document
|
|
111
|
+
rev build pdf # PDF
|
|
112
|
+
rev build --dual # Clean + comments versions
|
|
113
|
+
rev watch docx # Auto-rebuild on save
|
|
94
114
|
```
|
|
95
115
|
|
|
96
|
-
##
|
|
116
|
+
## Handle Reviewer Feedback
|
|
97
117
|
|
|
118
|
+
Import reviewed document:
|
|
119
|
+
```bash
|
|
120
|
+
rev sections reviewed.docx
|
|
98
121
|
```
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
├── results.md
|
|
104
|
-
├── discussion.md
|
|
105
|
-
├── references.bib # Bibliography
|
|
106
|
-
├── figures/ # Images
|
|
107
|
-
└── paper.docx # Generated output
|
|
122
|
+
|
|
123
|
+
View comments:
|
|
124
|
+
```bash
|
|
125
|
+
rev comments methods.md
|
|
108
126
|
```
|
|
109
127
|
|
|
110
|
-
|
|
128
|
+
Reply to comment:
|
|
129
|
+
```bash
|
|
130
|
+
rev config user "Your Name"
|
|
131
|
+
rev reply methods.md -n 1 -m "Clarified sampling methodology"
|
|
132
|
+
```
|
|
111
133
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
134
|
+
Rebuild with threaded comments:
|
|
135
|
+
```bash
|
|
136
|
+
rev build --dual
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Output:
|
|
140
|
+
- `paper.docx` (clean)
|
|
141
|
+
- `paper_comments.docx` (with comment threads)
|
|
142
|
+
|
|
143
|
+
## Commands
|
|
144
|
+
|
|
145
|
+
| Task | Command |
|
|
146
|
+
|------|---------|
|
|
147
|
+
| New project | `rev new my-paper` |
|
|
148
|
+
| Import Word | `rev import manuscript.docx` |
|
|
149
|
+
| Build Word | `rev build docx` |
|
|
150
|
+
| Build PDF | `rev build pdf` |
|
|
151
|
+
| Import feedback | `rev sections reviewed.docx` |
|
|
152
|
+
| View comments | `rev comments methods.md` |
|
|
153
|
+
| Reply to comment | `rev reply methods.md -n 1 -m "text"` |
|
|
154
|
+
| Word count | `rev word-count` |
|
|
155
|
+
| Validate DOIs | `rev doi check` |
|
|
156
|
+
| Pre-submit check | `rev check` |
|
|
157
|
+
|
|
158
|
+
Full reference: [docs/commands.md](docs/commands.md)
|
|
159
|
+
|
|
160
|
+
## Requirements
|
|
161
|
+
|
|
162
|
+
- Node.js 18+
|
|
163
|
+
- Pandoc
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# macOS
|
|
167
|
+
brew install pandoc
|
|
168
|
+
|
|
169
|
+
# Windows
|
|
170
|
+
winget install JohnMacFarlane.Pandoc
|
|
171
|
+
|
|
172
|
+
# Linux
|
|
173
|
+
sudo apt install pandoc
|
|
174
|
+
```
|
|
116
175
|
|
|
117
176
|
## License
|
|
118
177
|
|