docrev 0.6.4 → 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 +68 -182
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,132 +2,90 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/docrev)
|
|
4
4
|
|
|
5
|
-
**Write
|
|
5
|
+
**Write papers in plain text. Generate Word when needed.**
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Why
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Word documents corrupt. Versions multiply. Track changes become unreadable. Equations break. Figures embed at wrong resolutions.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Word files get corrupted
|
|
14
|
-
- "Which version is the latest?" confusion
|
|
15
|
-
- Track changes become unreadable after multiple rounds
|
|
16
|
-
- Equations break when copy-pasting
|
|
17
|
-
- Figures get embedded at wrong resolutions
|
|
18
|
-
- Collaborating means emailing files back and forth
|
|
19
|
-
|
|
20
|
-
## The Solution
|
|
21
|
-
|
|
22
|
-
**docrev** lets you write in plain text (Markdown) and generate Word/PDF whenever you need to share. Your collaborators keep using Word — they don't need to change anything. You get:
|
|
23
|
-
|
|
24
|
-
- **Version control** — See exactly what changed, when, and why
|
|
25
|
-
- **No corruption** — Plain text files never break
|
|
26
|
-
- **Equations that work** — Write LaTeX, get perfect equations in Word
|
|
27
|
-
- **Figures stay separate** — Reference images, don't embed them
|
|
28
|
-
- **Automated formatting** — Citations, cross-references, all handled
|
|
29
|
-
|
|
30
|
-
## How It Works
|
|
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.
|
|
31
12
|
|
|
32
13
|
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
│ │
|
|
38
|
-
│ ▼
|
|
39
|
-
└────────────── docrev ◄──── They send it back
|
|
40
|
-
(imports their feedback)
|
|
14
|
+
Markdown files --> docrev --> Word/PDF
|
|
15
|
+
^ |
|
|
16
|
+
| v
|
|
17
|
+
+---- docrev <---- reviewer feedback
|
|
41
18
|
```
|
|
42
19
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Quick Start
|
|
48
|
-
|
|
49
|
-
### Install
|
|
20
|
+
## Install
|
|
50
21
|
|
|
51
22
|
```bash
|
|
52
23
|
npm install -g docrev
|
|
53
|
-
brew install pandoc
|
|
24
|
+
brew install pandoc
|
|
54
25
|
```
|
|
55
26
|
|
|
56
|
-
|
|
27
|
+
## Start a Project
|
|
57
28
|
|
|
29
|
+
From scratch:
|
|
58
30
|
```bash
|
|
59
31
|
rev new my-paper
|
|
60
32
|
cd my-paper
|
|
61
33
|
```
|
|
62
34
|
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
my-paper/
|
|
66
|
-
├── introduction.md ← Write your intro here
|
|
67
|
-
├── methods.md ← Your methods
|
|
68
|
-
├── results.md ← Your results
|
|
69
|
-
├── discussion.md ← Your discussion
|
|
70
|
-
├── references.bib ← Your citations
|
|
71
|
-
└── rev.yaml ← Paper title, authors
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Or Import from Existing Word Document
|
|
75
|
-
|
|
35
|
+
From existing Word document:
|
|
76
36
|
```bash
|
|
77
|
-
rev import
|
|
37
|
+
rev import manuscript.docx
|
|
78
38
|
```
|
|
79
39
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
Markdown is just text with simple formatting. If you can write an email, you can write Markdown.
|
|
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
|
+
```
|
|
91
50
|
|
|
92
|
-
|
|
51
|
+
## Markdown Basics
|
|
93
52
|
|
|
94
53
|
```markdown
|
|
95
|
-
#
|
|
54
|
+
# Heading
|
|
96
55
|
|
|
97
|
-
|
|
56
|
+
Paragraph text. **Bold** and *italic*.
|
|
98
57
|
|
|
99
58
|
- Bullet point
|
|
100
|
-
- Another
|
|
59
|
+
- Another point
|
|
101
60
|
|
|
102
|
-
1. Numbered
|
|
61
|
+
1. Numbered item
|
|
103
62
|
2. Second item
|
|
104
63
|
```
|
|
105
64
|
|
|
106
65
|
### Citations
|
|
107
66
|
|
|
108
|
-
|
|
67
|
+
references.bib:
|
|
109
68
|
```bibtex
|
|
110
69
|
@article{Smith2020,
|
|
111
70
|
author = {Smith, Jane},
|
|
112
|
-
title = {
|
|
71
|
+
title = {Paper Title},
|
|
113
72
|
journal = {Nature},
|
|
114
73
|
year = {2020}
|
|
115
74
|
}
|
|
116
75
|
```
|
|
117
76
|
|
|
118
|
-
In
|
|
77
|
+
In text:
|
|
119
78
|
```markdown
|
|
120
|
-
Previous studies
|
|
121
|
-
Multiple citations work too [@Smith2020; @Jones2021].
|
|
79
|
+
Previous studies [@Smith2020] demonstrated this.
|
|
122
80
|
```
|
|
123
81
|
|
|
124
|
-
|
|
82
|
+
Output: "Previous studies (Smith 2020) demonstrated this."
|
|
125
83
|
|
|
126
84
|
### Equations
|
|
127
85
|
|
|
128
|
-
Inline: `$E = mc^2$`
|
|
86
|
+
Inline: `$E = mc^2$`
|
|
129
87
|
|
|
130
|
-
Display
|
|
88
|
+
Display:
|
|
131
89
|
```markdown
|
|
132
90
|
$$
|
|
133
91
|
\hat{p} = \frac{\sum_d w_d p_d}{\sum_d w_d}
|
|
@@ -137,123 +95,72 @@ $$
|
|
|
137
95
|
### Figures
|
|
138
96
|
|
|
139
97
|
```markdown
|
|
140
|
-
{#fig:map}
|
|
141
99
|
|
|
142
|
-
|
|
100
|
+
Results shown in @fig:map indicate regional variation.
|
|
143
101
|
```
|
|
144
102
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
The figure number updates automatically if you reorder figures.
|
|
148
|
-
|
|
149
|
-
---
|
|
103
|
+
Output: "Results shown in Figure 1 indicate regional variation."
|
|
150
104
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
rev build docx # Generate Word document
|
|
155
|
-
rev build pdf # Generate PDF
|
|
156
|
-
rev build --dual # Both clean + with-comments versions
|
|
157
|
-
```
|
|
105
|
+
Figure numbers update automatically when reordered.
|
|
158
106
|
|
|
159
|
-
|
|
107
|
+
## Build
|
|
160
108
|
|
|
161
109
|
```bash
|
|
162
|
-
rev
|
|
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
|
|
163
114
|
```
|
|
164
115
|
|
|
165
|
-
---
|
|
166
|
-
|
|
167
116
|
## Handle Reviewer Feedback
|
|
168
117
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Your supervisor sends back `manuscript_reviewed.docx` with comments and track changes.
|
|
172
|
-
|
|
118
|
+
Import reviewed document:
|
|
173
119
|
```bash
|
|
174
|
-
rev sections
|
|
120
|
+
rev sections reviewed.docx
|
|
175
121
|
```
|
|
176
122
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
### 2. See Their Comments
|
|
180
|
-
|
|
123
|
+
View comments:
|
|
181
124
|
```bash
|
|
182
125
|
rev comments methods.md
|
|
183
126
|
```
|
|
184
127
|
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
#1 [Dr. Smith] line 45
|
|
188
|
-
"Please clarify the sampling methodology"
|
|
189
|
-
|
|
190
|
-
#2 [Dr. Smith] line 78
|
|
191
|
-
"Add a citation here"
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### 3. Reply to Comments
|
|
195
|
-
|
|
128
|
+
Reply to comment:
|
|
196
129
|
```bash
|
|
197
|
-
rev config user "Your Name"
|
|
198
|
-
rev reply methods.md -n 1 -m "
|
|
130
|
+
rev config user "Your Name"
|
|
131
|
+
rev reply methods.md -n 1 -m "Clarified sampling methodology"
|
|
199
132
|
```
|
|
200
133
|
|
|
201
|
-
|
|
202
|
-
|
|
134
|
+
Rebuild with threaded comments:
|
|
203
135
|
```bash
|
|
204
136
|
rev build --dual
|
|
205
137
|
```
|
|
206
138
|
|
|
207
|
-
|
|
208
|
-
- `paper.docx`
|
|
209
|
-
- `paper_comments.docx`
|
|
210
|
-
|
|
211
|
-
Your reply appears under their comment, just like a conversation in Word.
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Why Separate Files?
|
|
139
|
+
Output:
|
|
140
|
+
- `paper.docx` (clean)
|
|
141
|
+
- `paper_comments.docx` (with comment threads)
|
|
216
142
|
|
|
217
|
-
|
|
143
|
+
## Commands
|
|
218
144
|
|
|
219
|
-
|
|
|
145
|
+
| Task | Command |
|
|
220
146
|
|------|---------|
|
|
221
|
-
|
|
|
222
|
-
|
|
|
223
|
-
|
|
|
224
|
-
| `discussion.md` | Interpretation |
|
|
225
|
-
|
|
226
|
-
**Benefits:**
|
|
227
|
-
- Easier to navigate
|
|
228
|
-
- Work on one section without scrolling
|
|
229
|
-
- Git shows changes per section
|
|
230
|
-
- Collaborators can review specific parts
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## Commands Reference
|
|
235
|
-
|
|
236
|
-
| What you want to do | Command |
|
|
237
|
-
|---------------------|---------|
|
|
238
|
-
| Create new paper | `rev new my-paper` |
|
|
239
|
-
| Import from Word | `rev import manuscript.docx` |
|
|
240
|
-
| Build Word doc | `rev build docx` |
|
|
147
|
+
| New project | `rev new my-paper` |
|
|
148
|
+
| Import Word | `rev import manuscript.docx` |
|
|
149
|
+
| Build Word | `rev build docx` |
|
|
241
150
|
| Build PDF | `rev build pdf` |
|
|
242
|
-
| Import
|
|
243
|
-
|
|
|
244
|
-
| Reply to comment
|
|
245
|
-
|
|
|
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` |
|
|
246
155
|
| Validate DOIs | `rev doi check` |
|
|
247
|
-
|
|
|
156
|
+
| Pre-submit check | `rev check` |
|
|
248
157
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
---
|
|
158
|
+
Full reference: [docs/commands.md](docs/commands.md)
|
|
252
159
|
|
|
253
160
|
## Requirements
|
|
254
161
|
|
|
255
|
-
-
|
|
256
|
-
-
|
|
162
|
+
- Node.js 18+
|
|
163
|
+
- Pandoc
|
|
257
164
|
|
|
258
165
|
```bash
|
|
259
166
|
# macOS
|
|
@@ -266,27 +173,6 @@ winget install JohnMacFarlane.Pandoc
|
|
|
266
173
|
sudo apt install pandoc
|
|
267
174
|
```
|
|
268
175
|
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## FAQ
|
|
272
|
-
|
|
273
|
-
**Q: Do my collaborators need to install docrev?**
|
|
274
|
-
No. They keep using Word normally. You handle the conversion.
|
|
275
|
-
|
|
276
|
-
**Q: Can I use my existing Word document?**
|
|
277
|
-
Yes. `rev import manuscript.docx` converts it to Markdown.
|
|
278
|
-
|
|
279
|
-
**Q: What about my bibliography?**
|
|
280
|
-
Use a `.bib` file (export from Zotero/Mendeley/EndNote). Citations are handled automatically.
|
|
281
|
-
|
|
282
|
-
**Q: Will equations look right in Word?**
|
|
283
|
-
Yes. LaTeX equations are converted to native Word equations.
|
|
284
|
-
|
|
285
|
-
**Q: What if I make a mistake?**
|
|
286
|
-
Plain text + Git means you can always go back. Run `rev backup` before big changes.
|
|
287
|
-
|
|
288
|
-
---
|
|
289
|
-
|
|
290
176
|
## License
|
|
291
177
|
|
|
292
178
|
MIT
|