docrev 0.6.4 → 0.6.6
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 +69 -181
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,132 +2,92 @@
|
|
|
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
|
+
Scientific papers go through many revision cycles. You send a Word document to collaborators, they add comments and track changes, you address the feedback and send it back. Then journal submission, reviewer comments, more revisions. After a few rounds, track changes become unreadable, you have fifteen versions of the same file, and nobody knows which one is current. Equations break when copying between documents. Figures get embedded at the wrong resolution or disappear entirely.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
docrev takes a different approach. You write in plain text using Markdown, a simple formatting syntax that takes ten minutes to learn. When you need to share with collaborators or submit to a journal, docrev generates a Word document or PDF. Your collaborators review and comment in Word as usual. When they send it back, docrev imports their feedback into your Markdown files. You address the comments, rebuild the document, and send it back. The cycle continues, but your source files stay clean and under version control.
|
|
12
12
|
|
|
13
|
-
|
|
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
|
|
13
|
+
Your collaborators do not need to install anything or change how they work. They keep using Word. You handle the conversion on your end. The result is proper version history, equations that never break, figures that stay linked rather than embedded, and automated citation formatting.
|
|
31
14
|
|
|
32
15
|
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
│ │
|
|
38
|
-
│ ▼
|
|
39
|
-
└────────────── docrev ◄──── They send it back
|
|
40
|
-
(imports their feedback)
|
|
16
|
+
Markdown files --> docrev --> Word/PDF
|
|
17
|
+
^ |
|
|
18
|
+
| v
|
|
19
|
+
+---- docrev <---- reviewer feedback
|
|
41
20
|
```
|
|
42
21
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Quick Start
|
|
48
|
-
|
|
49
|
-
### Install
|
|
22
|
+
## Install
|
|
50
23
|
|
|
51
24
|
```bash
|
|
52
25
|
npm install -g docrev
|
|
53
|
-
brew install pandoc
|
|
26
|
+
brew install pandoc
|
|
54
27
|
```
|
|
55
28
|
|
|
56
|
-
|
|
29
|
+
## Start a Project
|
|
57
30
|
|
|
31
|
+
From scratch:
|
|
58
32
|
```bash
|
|
59
33
|
rev new my-paper
|
|
60
34
|
cd my-paper
|
|
61
35
|
```
|
|
62
36
|
|
|
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
|
-
|
|
37
|
+
From existing Word document:
|
|
76
38
|
```bash
|
|
77
|
-
rev import
|
|
39
|
+
rev import manuscript.docx
|
|
78
40
|
```
|
|
79
41
|
|
|
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.
|
|
42
|
+
Project structure:
|
|
43
|
+
```
|
|
44
|
+
my-paper/
|
|
45
|
+
├── introduction.md
|
|
46
|
+
├── methods.md
|
|
47
|
+
├── results.md
|
|
48
|
+
├── discussion.md
|
|
49
|
+
├── references.bib
|
|
50
|
+
└── rev.yaml
|
|
51
|
+
```
|
|
91
52
|
|
|
92
|
-
|
|
53
|
+
## Markdown Basics
|
|
93
54
|
|
|
94
55
|
```markdown
|
|
95
|
-
#
|
|
56
|
+
# Heading
|
|
96
57
|
|
|
97
|
-
|
|
58
|
+
Paragraph text. **Bold** and *italic*.
|
|
98
59
|
|
|
99
60
|
- Bullet point
|
|
100
|
-
- Another
|
|
61
|
+
- Another point
|
|
101
62
|
|
|
102
|
-
1. Numbered
|
|
63
|
+
1. Numbered item
|
|
103
64
|
2. Second item
|
|
104
65
|
```
|
|
105
66
|
|
|
106
67
|
### Citations
|
|
107
68
|
|
|
108
|
-
|
|
69
|
+
references.bib:
|
|
109
70
|
```bibtex
|
|
110
71
|
@article{Smith2020,
|
|
111
72
|
author = {Smith, Jane},
|
|
112
|
-
title = {
|
|
73
|
+
title = {Paper Title},
|
|
113
74
|
journal = {Nature},
|
|
114
75
|
year = {2020}
|
|
115
76
|
}
|
|
116
77
|
```
|
|
117
78
|
|
|
118
|
-
In
|
|
79
|
+
In text:
|
|
119
80
|
```markdown
|
|
120
|
-
Previous studies
|
|
121
|
-
Multiple citations work too [@Smith2020; @Jones2021].
|
|
81
|
+
Previous studies [@Smith2020] demonstrated this.
|
|
122
82
|
```
|
|
123
83
|
|
|
124
|
-
|
|
84
|
+
Output: "Previous studies (Smith 2020) demonstrated this."
|
|
125
85
|
|
|
126
86
|
### Equations
|
|
127
87
|
|
|
128
|
-
Inline: `$E = mc^2$`
|
|
88
|
+
Inline: `$E = mc^2$`
|
|
129
89
|
|
|
130
|
-
Display
|
|
90
|
+
Display:
|
|
131
91
|
```markdown
|
|
132
92
|
$$
|
|
133
93
|
\hat{p} = \frac{\sum_d w_d p_d}{\sum_d w_d}
|
|
@@ -137,123 +97,72 @@ $$
|
|
|
137
97
|
### Figures
|
|
138
98
|
|
|
139
99
|
```markdown
|
|
140
|
-
{#fig:map}
|
|
141
101
|
|
|
142
|
-
|
|
102
|
+
Results shown in @fig:map indicate regional variation.
|
|
143
103
|
```
|
|
144
104
|
|
|
145
|
-
|
|
105
|
+
Output: "Results shown in Figure 1 indicate regional variation."
|
|
146
106
|
|
|
147
|
-
|
|
107
|
+
Figure numbers update automatically when reordered.
|
|
148
108
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## Build Your Document
|
|
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
|
-
```
|
|
158
|
-
|
|
159
|
-
### Preview While Writing
|
|
109
|
+
## Build
|
|
160
110
|
|
|
161
111
|
```bash
|
|
162
|
-
rev
|
|
112
|
+
rev build docx # Word document
|
|
113
|
+
rev build pdf # PDF
|
|
114
|
+
rev build --dual # Clean + comments versions
|
|
115
|
+
rev watch docx # Auto-rebuild on save
|
|
163
116
|
```
|
|
164
117
|
|
|
165
|
-
---
|
|
166
|
-
|
|
167
118
|
## Handle Reviewer Feedback
|
|
168
119
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
Your supervisor sends back `manuscript_reviewed.docx` with comments and track changes.
|
|
172
|
-
|
|
120
|
+
Import reviewed document:
|
|
173
121
|
```bash
|
|
174
|
-
rev sections
|
|
122
|
+
rev sections reviewed.docx
|
|
175
123
|
```
|
|
176
124
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
### 2. See Their Comments
|
|
180
|
-
|
|
125
|
+
View comments:
|
|
181
126
|
```bash
|
|
182
127
|
rev comments methods.md
|
|
183
128
|
```
|
|
184
129
|
|
|
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
|
-
|
|
130
|
+
Reply to comment:
|
|
196
131
|
```bash
|
|
197
|
-
rev config user "Your Name"
|
|
198
|
-
rev reply methods.md -n 1 -m "
|
|
132
|
+
rev config user "Your Name"
|
|
133
|
+
rev reply methods.md -n 1 -m "Clarified sampling methodology"
|
|
199
134
|
```
|
|
200
135
|
|
|
201
|
-
|
|
202
|
-
|
|
136
|
+
Rebuild with threaded comments:
|
|
203
137
|
```bash
|
|
204
138
|
rev build --dual
|
|
205
139
|
```
|
|
206
140
|
|
|
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?
|
|
141
|
+
Output:
|
|
142
|
+
- `paper.docx` (clean)
|
|
143
|
+
- `paper_comments.docx` (with comment threads)
|
|
216
144
|
|
|
217
|
-
|
|
145
|
+
## Commands
|
|
218
146
|
|
|
219
|
-
|
|
|
147
|
+
| Task | Command |
|
|
220
148
|
|------|---------|
|
|
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` |
|
|
149
|
+
| New project | `rev new my-paper` |
|
|
150
|
+
| Import Word | `rev import manuscript.docx` |
|
|
151
|
+
| Build Word | `rev build docx` |
|
|
241
152
|
| Build PDF | `rev build pdf` |
|
|
242
|
-
| Import
|
|
243
|
-
|
|
|
244
|
-
| Reply to comment
|
|
245
|
-
|
|
|
153
|
+
| Import feedback | `rev sections reviewed.docx` |
|
|
154
|
+
| View comments | `rev comments methods.md` |
|
|
155
|
+
| Reply to comment | `rev reply methods.md -n 1 -m "text"` |
|
|
156
|
+
| Word count | `rev word-count` |
|
|
246
157
|
| Validate DOIs | `rev doi check` |
|
|
247
|
-
|
|
|
158
|
+
| Pre-submit check | `rev check` |
|
|
248
159
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
---
|
|
160
|
+
Full reference: [docs/commands.md](docs/commands.md)
|
|
252
161
|
|
|
253
162
|
## Requirements
|
|
254
163
|
|
|
255
|
-
-
|
|
256
|
-
-
|
|
164
|
+
- Node.js 18+
|
|
165
|
+
- Pandoc
|
|
257
166
|
|
|
258
167
|
```bash
|
|
259
168
|
# macOS
|
|
@@ -266,27 +175,6 @@ winget install JohnMacFarlane.Pandoc
|
|
|
266
175
|
sudo apt install pandoc
|
|
267
176
|
```
|
|
268
177
|
|
|
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
178
|
## License
|
|
291
179
|
|
|
292
180
|
MIT
|