docrev 0.8.1 → 0.8.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.
Files changed (306) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/PLAN-tables-and-postprocess.md +850 -0
  3. package/README.md +33 -0
  4. package/bin/rev.js +12 -131
  5. package/bin/rev.ts +145 -0
  6. package/dist/bin/rev.d.ts +9 -0
  7. package/dist/bin/rev.d.ts.map +1 -0
  8. package/dist/bin/rev.js +118 -0
  9. package/dist/bin/rev.js.map +1 -0
  10. package/dist/lib/annotations.d.ts +91 -0
  11. package/dist/lib/annotations.d.ts.map +1 -0
  12. package/dist/lib/annotations.js +554 -0
  13. package/dist/lib/annotations.js.map +1 -0
  14. package/dist/lib/build.d.ts +171 -0
  15. package/dist/lib/build.d.ts.map +1 -0
  16. package/dist/lib/build.js +755 -0
  17. package/dist/lib/build.js.map +1 -0
  18. package/dist/lib/citations.d.ts +34 -0
  19. package/dist/lib/citations.d.ts.map +1 -0
  20. package/dist/lib/citations.js +140 -0
  21. package/dist/lib/citations.js.map +1 -0
  22. package/dist/lib/commands/build.d.ts +13 -0
  23. package/dist/lib/commands/build.d.ts.map +1 -0
  24. package/dist/lib/commands/build.js +678 -0
  25. package/dist/lib/commands/build.js.map +1 -0
  26. package/dist/lib/commands/citations.d.ts +11 -0
  27. package/dist/lib/commands/citations.d.ts.map +1 -0
  28. package/dist/lib/commands/citations.js +428 -0
  29. package/dist/lib/commands/citations.js.map +1 -0
  30. package/dist/lib/commands/comments.d.ts +11 -0
  31. package/dist/lib/commands/comments.d.ts.map +1 -0
  32. package/dist/lib/commands/comments.js +883 -0
  33. package/dist/lib/commands/comments.js.map +1 -0
  34. package/dist/lib/commands/context.d.ts +35 -0
  35. package/dist/lib/commands/context.d.ts.map +1 -0
  36. package/dist/lib/commands/context.js +59 -0
  37. package/dist/lib/commands/context.js.map +1 -0
  38. package/dist/lib/commands/core.d.ts +11 -0
  39. package/dist/lib/commands/core.d.ts.map +1 -0
  40. package/dist/lib/commands/core.js +246 -0
  41. package/dist/lib/commands/core.js.map +1 -0
  42. package/dist/lib/commands/doi.d.ts +11 -0
  43. package/dist/lib/commands/doi.d.ts.map +1 -0
  44. package/dist/lib/commands/doi.js +373 -0
  45. package/dist/lib/commands/doi.js.map +1 -0
  46. package/dist/lib/commands/history.d.ts +11 -0
  47. package/dist/lib/commands/history.d.ts.map +1 -0
  48. package/dist/lib/commands/history.js +245 -0
  49. package/dist/lib/commands/history.js.map +1 -0
  50. package/dist/lib/commands/index.d.ts +28 -0
  51. package/dist/lib/commands/index.d.ts.map +1 -0
  52. package/dist/lib/commands/index.js +35 -0
  53. package/dist/lib/commands/index.js.map +1 -0
  54. package/dist/lib/commands/init.d.ts +11 -0
  55. package/dist/lib/commands/init.d.ts.map +1 -0
  56. package/dist/lib/commands/init.js +209 -0
  57. package/dist/lib/commands/init.js.map +1 -0
  58. package/dist/lib/commands/response.d.ts +11 -0
  59. package/dist/lib/commands/response.d.ts.map +1 -0
  60. package/dist/lib/commands/response.js +317 -0
  61. package/dist/lib/commands/response.js.map +1 -0
  62. package/dist/lib/commands/sections.d.ts +11 -0
  63. package/dist/lib/commands/sections.d.ts.map +1 -0
  64. package/dist/lib/commands/sections.js +1071 -0
  65. package/dist/lib/commands/sections.js.map +1 -0
  66. package/dist/lib/commands/utilities.d.ts +19 -0
  67. package/dist/lib/commands/utilities.d.ts.map +1 -0
  68. package/dist/lib/commands/utilities.js +2009 -0
  69. package/dist/lib/commands/utilities.js.map +1 -0
  70. package/dist/lib/comment-realign.d.ts +50 -0
  71. package/dist/lib/comment-realign.d.ts.map +1 -0
  72. package/dist/lib/comment-realign.js +372 -0
  73. package/dist/lib/comment-realign.js.map +1 -0
  74. package/dist/lib/config.d.ts +41 -0
  75. package/dist/lib/config.d.ts.map +1 -0
  76. package/dist/lib/config.js +76 -0
  77. package/dist/lib/config.js.map +1 -0
  78. package/dist/lib/crossref.d.ts +108 -0
  79. package/dist/lib/crossref.d.ts.map +1 -0
  80. package/dist/lib/crossref.js +597 -0
  81. package/dist/lib/crossref.js.map +1 -0
  82. package/dist/lib/dependencies.d.ts +30 -0
  83. package/dist/lib/dependencies.d.ts.map +1 -0
  84. package/dist/lib/dependencies.js +95 -0
  85. package/dist/lib/dependencies.js.map +1 -0
  86. package/dist/lib/doi-cache.d.ts +29 -0
  87. package/dist/lib/doi-cache.d.ts.map +1 -0
  88. package/dist/lib/doi-cache.js +104 -0
  89. package/dist/lib/doi-cache.js.map +1 -0
  90. package/dist/lib/doi.d.ts +65 -0
  91. package/dist/lib/doi.d.ts.map +1 -0
  92. package/dist/lib/doi.js +710 -0
  93. package/dist/lib/doi.js.map +1 -0
  94. package/dist/lib/equations.d.ts +61 -0
  95. package/dist/lib/equations.d.ts.map +1 -0
  96. package/dist/lib/equations.js +445 -0
  97. package/dist/lib/equations.js.map +1 -0
  98. package/dist/lib/errors.d.ts +60 -0
  99. package/dist/lib/errors.d.ts.map +1 -0
  100. package/dist/lib/errors.js +303 -0
  101. package/dist/lib/errors.js.map +1 -0
  102. package/dist/lib/format.d.ts +104 -0
  103. package/dist/lib/format.d.ts.map +1 -0
  104. package/dist/lib/format.js +416 -0
  105. package/dist/lib/format.js.map +1 -0
  106. package/dist/lib/git.d.ts +88 -0
  107. package/dist/lib/git.d.ts.map +1 -0
  108. package/dist/lib/git.js +304 -0
  109. package/dist/lib/git.js.map +1 -0
  110. package/dist/lib/grammar.d.ts +62 -0
  111. package/dist/lib/grammar.d.ts.map +1 -0
  112. package/dist/lib/grammar.js +244 -0
  113. package/dist/lib/grammar.js.map +1 -0
  114. package/dist/lib/image-registry.d.ts +68 -0
  115. package/dist/lib/image-registry.d.ts.map +1 -0
  116. package/dist/lib/image-registry.js +112 -0
  117. package/dist/lib/image-registry.js.map +1 -0
  118. package/dist/lib/import.d.ts +184 -0
  119. package/dist/lib/import.d.ts.map +1 -0
  120. package/dist/lib/import.js +1581 -0
  121. package/dist/lib/import.js.map +1 -0
  122. package/dist/lib/journals.d.ts +55 -0
  123. package/dist/lib/journals.d.ts.map +1 -0
  124. package/dist/lib/journals.js +417 -0
  125. package/dist/lib/journals.js.map +1 -0
  126. package/dist/lib/merge.d.ts +138 -0
  127. package/dist/lib/merge.d.ts.map +1 -0
  128. package/dist/lib/merge.js +603 -0
  129. package/dist/lib/merge.js.map +1 -0
  130. package/dist/lib/orcid.d.ts +36 -0
  131. package/dist/lib/orcid.d.ts.map +1 -0
  132. package/dist/lib/orcid.js +117 -0
  133. package/dist/lib/orcid.js.map +1 -0
  134. package/dist/lib/pdf-comments.d.ts +95 -0
  135. package/dist/lib/pdf-comments.d.ts.map +1 -0
  136. package/dist/lib/pdf-comments.js +192 -0
  137. package/dist/lib/pdf-comments.js.map +1 -0
  138. package/dist/lib/pdf-import.d.ts +118 -0
  139. package/dist/lib/pdf-import.d.ts.map +1 -0
  140. package/dist/lib/pdf-import.js +397 -0
  141. package/dist/lib/pdf-import.js.map +1 -0
  142. package/dist/lib/plugins.d.ts +76 -0
  143. package/dist/lib/plugins.d.ts.map +1 -0
  144. package/dist/lib/plugins.js +235 -0
  145. package/dist/lib/plugins.js.map +1 -0
  146. package/dist/lib/postprocess.d.ts +42 -0
  147. package/dist/lib/postprocess.d.ts.map +1 -0
  148. package/dist/lib/postprocess.js +138 -0
  149. package/dist/lib/postprocess.js.map +1 -0
  150. package/dist/lib/pptx-template.d.ts +59 -0
  151. package/dist/lib/pptx-template.d.ts.map +1 -0
  152. package/dist/lib/pptx-template.js +613 -0
  153. package/dist/lib/pptx-template.js.map +1 -0
  154. package/dist/lib/pptx-themes.d.ts +80 -0
  155. package/dist/lib/pptx-themes.d.ts.map +1 -0
  156. package/dist/lib/pptx-themes.js +818 -0
  157. package/dist/lib/pptx-themes.js.map +1 -0
  158. package/dist/lib/protect-restore.d.ts +137 -0
  159. package/dist/lib/protect-restore.d.ts.map +1 -0
  160. package/dist/lib/protect-restore.js +394 -0
  161. package/dist/lib/protect-restore.js.map +1 -0
  162. package/dist/lib/rate-limiter.d.ts +27 -0
  163. package/dist/lib/rate-limiter.d.ts.map +1 -0
  164. package/dist/lib/rate-limiter.js +79 -0
  165. package/dist/lib/rate-limiter.js.map +1 -0
  166. package/dist/lib/response.d.ts +41 -0
  167. package/dist/lib/response.d.ts.map +1 -0
  168. package/dist/lib/response.js +150 -0
  169. package/dist/lib/response.js.map +1 -0
  170. package/dist/lib/review.d.ts +35 -0
  171. package/dist/lib/review.d.ts.map +1 -0
  172. package/dist/lib/review.js +263 -0
  173. package/dist/lib/review.js.map +1 -0
  174. package/dist/lib/schema.d.ts +66 -0
  175. package/dist/lib/schema.d.ts.map +1 -0
  176. package/dist/lib/schema.js +339 -0
  177. package/dist/lib/schema.js.map +1 -0
  178. package/dist/lib/scientific-words.d.ts +6 -0
  179. package/dist/lib/scientific-words.d.ts.map +1 -0
  180. package/dist/lib/scientific-words.js +66 -0
  181. package/dist/lib/scientific-words.js.map +1 -0
  182. package/dist/lib/sections.d.ts +40 -0
  183. package/dist/lib/sections.d.ts.map +1 -0
  184. package/dist/lib/sections.js +288 -0
  185. package/dist/lib/sections.js.map +1 -0
  186. package/dist/lib/slides.d.ts +86 -0
  187. package/dist/lib/slides.d.ts.map +1 -0
  188. package/dist/lib/slides.js +676 -0
  189. package/dist/lib/slides.js.map +1 -0
  190. package/dist/lib/spelling.d.ts +76 -0
  191. package/dist/lib/spelling.d.ts.map +1 -0
  192. package/dist/lib/spelling.js +272 -0
  193. package/dist/lib/spelling.js.map +1 -0
  194. package/dist/lib/templates.d.ts +30 -0
  195. package/dist/lib/templates.d.ts.map +1 -0
  196. package/dist/lib/templates.js +504 -0
  197. package/dist/lib/templates.js.map +1 -0
  198. package/dist/lib/themes.d.ts +85 -0
  199. package/dist/lib/themes.d.ts.map +1 -0
  200. package/dist/lib/themes.js +652 -0
  201. package/dist/lib/themes.js.map +1 -0
  202. package/dist/lib/trackchanges.d.ts +51 -0
  203. package/dist/lib/trackchanges.d.ts.map +1 -0
  204. package/dist/lib/trackchanges.js +202 -0
  205. package/dist/lib/trackchanges.js.map +1 -0
  206. package/dist/lib/tui.d.ts +76 -0
  207. package/dist/lib/tui.d.ts.map +1 -0
  208. package/dist/lib/tui.js +377 -0
  209. package/dist/lib/tui.js.map +1 -0
  210. package/dist/lib/types.d.ts +447 -0
  211. package/dist/lib/types.d.ts.map +1 -0
  212. package/dist/lib/types.js +6 -0
  213. package/dist/lib/types.js.map +1 -0
  214. package/dist/lib/undo.d.ts +57 -0
  215. package/dist/lib/undo.d.ts.map +1 -0
  216. package/dist/lib/undo.js +185 -0
  217. package/dist/lib/undo.js.map +1 -0
  218. package/dist/lib/utils.d.ts +16 -0
  219. package/dist/lib/utils.d.ts.map +1 -0
  220. package/dist/lib/utils.js +40 -0
  221. package/dist/lib/utils.js.map +1 -0
  222. package/dist/lib/variables.d.ts +42 -0
  223. package/dist/lib/variables.d.ts.map +1 -0
  224. package/dist/lib/variables.js +141 -0
  225. package/dist/lib/variables.js.map +1 -0
  226. package/dist/lib/word.d.ts +80 -0
  227. package/dist/lib/word.d.ts.map +1 -0
  228. package/dist/lib/word.js +360 -0
  229. package/dist/lib/word.js.map +1 -0
  230. package/dist/lib/wordcomments.d.ts +51 -0
  231. package/dist/lib/wordcomments.d.ts.map +1 -0
  232. package/dist/lib/wordcomments.js +587 -0
  233. package/dist/lib/wordcomments.js.map +1 -0
  234. package/eslint.config.js +27 -0
  235. package/lib/annotations.ts +622 -0
  236. package/lib/apply-buildup-colors.py +88 -0
  237. package/lib/build.ts +1013 -0
  238. package/lib/{citations.js → citations.ts} +38 -27
  239. package/lib/commands/{build.js → build.ts} +80 -27
  240. package/lib/commands/{citations.js → citations.ts} +36 -18
  241. package/lib/commands/{comments.js → comments.ts} +187 -54
  242. package/lib/commands/{context.js → context.ts} +18 -8
  243. package/lib/commands/{core.js → core.ts} +34 -20
  244. package/lib/commands/{doi.js → doi.ts} +32 -16
  245. package/lib/commands/{history.js → history.ts} +25 -12
  246. package/lib/commands/{index.js → index.ts} +9 -5
  247. package/lib/commands/{init.js → init.ts} +20 -8
  248. package/lib/commands/{response.js → response.ts} +47 -20
  249. package/lib/commands/{sections.js → sections.ts} +273 -68
  250. package/lib/commands/{utilities.js → utilities.ts} +338 -158
  251. package/lib/{comment-realign.js → comment-realign.ts} +117 -45
  252. package/lib/config.ts +84 -0
  253. package/lib/{crossref.js → crossref.ts} +213 -138
  254. package/lib/dependencies.ts +106 -0
  255. package/lib/doi-cache.ts +115 -0
  256. package/lib/{doi.js → doi.ts} +115 -281
  257. package/lib/{equations.js → equations.ts} +60 -64
  258. package/lib/{errors.js → errors.ts} +56 -48
  259. package/lib/{format.js → format.ts} +137 -63
  260. package/lib/{git.js → git.ts} +66 -63
  261. package/lib/{grammar.js → grammar.ts} +45 -32
  262. package/lib/image-registry.ts +180 -0
  263. package/lib/import.ts +2060 -0
  264. package/lib/journals.ts +505 -0
  265. package/lib/{merge.js → merge.ts} +185 -135
  266. package/lib/{orcid.js → orcid.ts} +17 -22
  267. package/lib/{pdf-comments.js → pdf-comments.ts} +76 -18
  268. package/lib/{pdf-import.js → pdf-import.ts} +148 -70
  269. package/lib/{plugins.js → plugins.ts} +82 -39
  270. package/lib/postprocess.ts +188 -0
  271. package/lib/pptx-color-filter.lua +37 -0
  272. package/lib/pptx-template.ts +625 -0
  273. package/lib/pptx-themes/academic.pptx +0 -0
  274. package/lib/pptx-themes/corporate.pptx +0 -0
  275. package/lib/pptx-themes/dark.pptx +0 -0
  276. package/lib/pptx-themes/default.pptx +0 -0
  277. package/lib/pptx-themes/minimal.pptx +0 -0
  278. package/lib/pptx-themes/plant.pptx +0 -0
  279. package/lib/pptx-themes.ts +896 -0
  280. package/lib/protect-restore.ts +516 -0
  281. package/lib/rate-limiter.ts +94 -0
  282. package/lib/{response.js → response.ts} +36 -21
  283. package/lib/{review.js → review.ts} +53 -43
  284. package/lib/{schema.js → schema.ts} +70 -25
  285. package/lib/{sections.js → sections.ts} +71 -76
  286. package/lib/slides.ts +793 -0
  287. package/lib/{spelling.js → spelling.ts} +43 -59
  288. package/lib/{templates.js → templates.ts} +20 -17
  289. package/lib/themes.ts +742 -0
  290. package/lib/{trackchanges.js → trackchanges.ts} +52 -23
  291. package/lib/types.ts +509 -0
  292. package/lib/{undo.js → undo.ts} +75 -52
  293. package/lib/utils.ts +41 -0
  294. package/lib/{variables.js → variables.ts} +60 -54
  295. package/lib/word.ts +428 -0
  296. package/lib/{wordcomments.js → wordcomments.ts} +94 -40
  297. package/package.json +15 -5
  298. package/skill/REFERENCE.md +67 -0
  299. package/tsconfig.json +26 -0
  300. package/lib/annotations.js +0 -414
  301. package/lib/build.js +0 -639
  302. package/lib/config.js +0 -79
  303. package/lib/import.js +0 -1145
  304. package/lib/journals.js +0 -629
  305. package/lib/word.js +0 -225
  306. /package/lib/{scientific-words.js → scientific-words.ts} +0 -0
@@ -0,0 +1,504 @@
1
+ /**
2
+ * Built-in templates for project scaffolding
3
+ *
4
+ * Used by `rev new` command to create new paper projects
5
+ */
6
+ export const TEMPLATES = {
7
+ /**
8
+ * Standard academic paper structure
9
+ */
10
+ paper: {
11
+ name: 'Academic Paper',
12
+ description: 'Standard paper with introduction, methods, results, discussion',
13
+ files: {
14
+ 'rev.yaml': `# Paper configuration
15
+ title: "Your Paper Title"
16
+ authors:
17
+ - name: First Author
18
+ affiliation: Institution
19
+ email: author@example.com
20
+
21
+ # Section files in order
22
+ sections:
23
+ - introduction.md
24
+ - methods.md
25
+ - results.md
26
+ - discussion.md
27
+
28
+ # Bibliography (optional)
29
+ bibliography: references.bib
30
+ csl: null # uses default CSL
31
+
32
+ # Cross-reference settings
33
+ crossref:
34
+ figureTitle: Figure
35
+ tableTitle: Table
36
+ figPrefix: [Fig., Figs.]
37
+ tblPrefix: [Table, Tables]
38
+ linkReferences: true
39
+
40
+ # PDF output settings
41
+ pdf:
42
+ documentclass: article
43
+ fontsize: 12pt
44
+ geometry: margin=1in
45
+ linestretch: 1.5
46
+ numbersections: false
47
+
48
+ # Word output settings
49
+ docx:
50
+ reference: null # path to reference.docx template
51
+ keepComments: true
52
+ `,
53
+ 'introduction.md': `# Introduction
54
+
55
+ Your introduction goes here. Use dynamic figure references like @fig:example.
56
+
57
+ `,
58
+ 'methods.md': `# Methods
59
+
60
+ ## Study Design
61
+
62
+ Describe your methodology here.
63
+
64
+ ## Data Analysis
65
+
66
+ Reference tables with @tbl:summary.
67
+
68
+ `,
69
+ 'results.md': `# Results
70
+
71
+ Present your findings. See @fig:results for the main analysis.
72
+
73
+ ![Example figure caption](figures/placeholder.png){#fig:results}
74
+
75
+ `,
76
+ 'discussion.md': `# Discussion
77
+
78
+ Interpret your results here.
79
+
80
+ ## Conclusions
81
+
82
+ Summarize key findings.
83
+
84
+ `,
85
+ 'references.bib': `@article{example2024,
86
+ author = {Author, A. and Coauthor, B.},
87
+ title = {An Example Paper Title},
88
+ journal = {Journal Name},
89
+ year = {2024},
90
+ volume = {1},
91
+ pages = {1--10}
92
+ }
93
+ `,
94
+ '.gitignore': `# Build outputs
95
+ *.pdf
96
+ *.docx
97
+ *.tex
98
+ paper.md
99
+ .paper-*.md
100
+
101
+ # System
102
+ .DS_Store
103
+ `,
104
+ },
105
+ directories: ['figures'],
106
+ },
107
+ /**
108
+ * Minimal single-section document
109
+ */
110
+ minimal: {
111
+ name: 'Minimal',
112
+ description: 'Single document with basic config',
113
+ files: {
114
+ 'rev.yaml': `title: "Document Title"
115
+ authors: []
116
+ sections:
117
+ - content.md
118
+ `,
119
+ 'content.md': `# Your Document
120
+
121
+ Write your content here.
122
+
123
+ `,
124
+ },
125
+ directories: [],
126
+ },
127
+ /**
128
+ * Thesis chapter structure
129
+ */
130
+ thesis: {
131
+ name: 'Thesis Chapter',
132
+ description: 'Thesis-style with abstract, sections, appendix',
133
+ files: {
134
+ 'rev.yaml': `title: "Chapter Title"
135
+ authors:
136
+ - name: Your Name
137
+ affiliation: University
138
+
139
+ sections:
140
+ - abstract.md
141
+ - introduction.md
142
+ - literature.md
143
+ - methods.md
144
+ - results.md
145
+ - discussion.md
146
+ - conclusion.md
147
+ - appendix.md
148
+
149
+ bibliography: references.bib
150
+
151
+ pdf:
152
+ documentclass: report
153
+ fontsize: 11pt
154
+ geometry: "margin=1in"
155
+ linestretch: 2
156
+ numbersections: true
157
+ `,
158
+ 'abstract.md': `# Abstract
159
+
160
+ Brief summary of the chapter (150-300 words).
161
+
162
+ `,
163
+ 'introduction.md': `# Introduction
164
+
165
+ Background and research questions.
166
+
167
+ `,
168
+ 'literature.md': `# Literature Review
169
+
170
+ Review of relevant prior work.
171
+
172
+ `,
173
+ 'methods.md': `# Materials and Methods
174
+
175
+ Detailed methodology.
176
+
177
+ `,
178
+ 'results.md': `# Results
179
+
180
+ Findings and analysis.
181
+
182
+ `,
183
+ 'discussion.md': `# Discussion
184
+
185
+ Interpretation of results.
186
+
187
+ `,
188
+ 'conclusion.md': `# Conclusion
189
+
190
+ Summary and implications.
191
+
192
+ `,
193
+ 'appendix.md': `# Appendix
194
+
195
+ ## Supplementary Materials
196
+
197
+ Additional details here.
198
+
199
+ `,
200
+ 'references.bib': ``,
201
+ '.gitignore': `*.pdf
202
+ *.docx
203
+ *.tex
204
+ paper.md
205
+ .paper-*.md
206
+ .DS_Store
207
+ `,
208
+ },
209
+ directories: ['figures', 'tables'],
210
+ },
211
+ /**
212
+ * LaTeX-focused project with direct .tex output
213
+ */
214
+ latex: {
215
+ name: 'LaTeX Project',
216
+ description: 'LaTeX-native with journal template support',
217
+ files: {
218
+ 'rev.yaml': `# LaTeX Paper Configuration
219
+ title: "Paper Title"
220
+ authors:
221
+ - name: First Author
222
+ affiliation: University
223
+ email: author@example.edu
224
+ orcid: 0000-0000-0000-0000
225
+
226
+ sections:
227
+ - introduction.md
228
+ - methods.md
229
+ - results.md
230
+ - discussion.md
231
+
232
+ bibliography: references.bib
233
+ csl: null
234
+
235
+ # LaTeX-specific settings
236
+ pdf:
237
+ documentclass: article
238
+ classoption: [11pt, a4paper]
239
+ fontsize: 11pt
240
+ geometry: "margin=2.5cm"
241
+ linestretch: 1.5
242
+ numbersections: true
243
+ header-includes: |
244
+ \\usepackage{amsmath}
245
+ \\usepackage{graphicx}
246
+ \\usepackage{booktabs}
247
+ \\usepackage{hyperref}
248
+ \\usepackage{natbib}
249
+
250
+ # TEX output settings
251
+ tex:
252
+ standalone: true
253
+ keep-tex: true
254
+ `,
255
+ 'introduction.md': `# Introduction
256
+
257
+ Background and motivation.
258
+
259
+ ## Objectives
260
+
261
+ State your research questions.
262
+
263
+ `,
264
+ 'methods.md': `# Materials and Methods
265
+
266
+ ## Study Area
267
+
268
+ Describe the study area or data sources.
269
+
270
+ ## Statistical Analysis
271
+
272
+ All analyses were performed in R [@R2024].
273
+
274
+ `,
275
+ 'results.md': `# Results
276
+
277
+ Main findings presented here.
278
+
279
+ ![Caption for figure](figures/fig1.pdf){#fig:main width=100%}
280
+
281
+ See @fig:main for the main results.
282
+
283
+ | Variable | Value | SE |
284
+ |----------|-------|------|
285
+ | A | 1.23 | 0.05 |
286
+ | B | 4.56 | 0.12 |
287
+
288
+ : Summary statistics {#tbl:summary}
289
+
290
+ `,
291
+ 'discussion.md': `# Discussion
292
+
293
+ Interpretation of findings.
294
+
295
+ ## Limitations
296
+
297
+ Study limitations.
298
+
299
+ ## Conclusions
300
+
301
+ Key takeaways.
302
+
303
+ `,
304
+ 'references.bib': `@Manual{R2024,
305
+ title = {R: A Language and Environment for Statistical Computing},
306
+ author = {{R Core Team}},
307
+ organization = {R Foundation for Statistical Computing},
308
+ address = {Vienna, Austria},
309
+ year = {2024},
310
+ url = {https://www.R-project.org/}
311
+ }
312
+ `,
313
+ '.gitignore': `# Build outputs
314
+ *.pdf
315
+ *.docx
316
+ paper.md
317
+ .paper-*.md
318
+
319
+ # Keep .tex for version control
320
+ # *.tex
321
+
322
+ # LaTeX auxiliary files
323
+ *.aux
324
+ *.bbl
325
+ *.blg
326
+ *.log
327
+ *.out
328
+ *.toc
329
+ *.fdb_latexmk
330
+ *.fls
331
+ *.synctex.gz
332
+
333
+ # System
334
+ .DS_Store
335
+ `,
336
+ },
337
+ directories: ['figures', 'tables'],
338
+ },
339
+ /**
340
+ * Review article structure
341
+ */
342
+ review: {
343
+ name: 'Review Article',
344
+ description: 'Literature review or synthesis paper',
345
+ files: {
346
+ 'rev.yaml': `title: "Review Title"
347
+ authors:
348
+ - name: Author Name
349
+ affiliation: Institution
350
+
351
+ sections:
352
+ - introduction.md
353
+ - section1.md
354
+ - section2.md
355
+ - section3.md
356
+ - synthesis.md
357
+ - conclusion.md
358
+
359
+ bibliography: references.bib
360
+
361
+ crossref:
362
+ figureTitle: Figure
363
+ tableTitle: Table
364
+ figPrefix: [Fig., Figs.]
365
+ tblPrefix: [Table, Tables]
366
+ `,
367
+ 'introduction.md': `# Introduction
368
+
369
+ Scope and objectives of the review.
370
+
371
+ `,
372
+ 'section1.md': `# Theme One
373
+
374
+ First major theme or topic.
375
+
376
+ `,
377
+ 'section2.md': `# Theme Two
378
+
379
+ Second major theme.
380
+
381
+ `,
382
+ 'section3.md': `# Theme Three
383
+
384
+ Third major theme.
385
+
386
+ `,
387
+ 'synthesis.md': `# Synthesis
388
+
389
+ Integration of themes and emerging patterns.
390
+
391
+ `,
392
+ 'conclusion.md': `# Conclusion and Future Directions
393
+
394
+ Key takeaways and research gaps.
395
+
396
+ `,
397
+ 'references.bib': ``,
398
+ '.gitignore': `*.pdf
399
+ *.docx
400
+ *.tex
401
+ paper.md
402
+ .paper-*.md
403
+ .DS_Store
404
+ `,
405
+ },
406
+ directories: ['figures'],
407
+ },
408
+ };
409
+ /**
410
+ * Get template by name
411
+ */
412
+ export function getTemplate(name) {
413
+ return TEMPLATES[name.toLowerCase()] || null;
414
+ }
415
+ /**
416
+ * List available templates
417
+ */
418
+ export function listTemplates() {
419
+ return Object.entries(TEMPLATES).map(([id, template]) => ({
420
+ id,
421
+ name: template.name,
422
+ description: template.description,
423
+ }));
424
+ }
425
+ /**
426
+ * Convert string to title case for headers
427
+ */
428
+ function titleCase(str) {
429
+ return str
430
+ .split(/[-_\s]+/)
431
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
432
+ .join(' ');
433
+ }
434
+ /**
435
+ * Generate a custom template with specified sections
436
+ */
437
+ export function generateCustomTemplate(sections, baseTemplate) {
438
+ const base = baseTemplate || TEMPLATES.paper;
439
+ const files = {};
440
+ // Generate rev.yaml with custom sections
441
+ const sectionsList = sections.map((s) => ` - ${s}.md`).join('\n');
442
+ files['rev.yaml'] = `# Paper configuration
443
+ title: "Your Paper Title"
444
+ authors:
445
+ - name: First Author
446
+ affiliation: Institution
447
+ email: author@example.com
448
+
449
+ # Section files in order
450
+ sections:
451
+ ${sectionsList}
452
+
453
+ # Bibliography (optional)
454
+ bibliography: references.bib
455
+ csl: null # uses default CSL
456
+
457
+ # Cross-reference settings
458
+ crossref:
459
+ figureTitle: Figure
460
+ tableTitle: Table
461
+ figPrefix: [Fig., Figs.]
462
+ tblPrefix: [Table, Tables]
463
+ linkReferences: true
464
+
465
+ # PDF output settings
466
+ pdf:
467
+ documentclass: article
468
+ fontsize: 12pt
469
+ geometry: margin=1in
470
+ linestretch: 1.5
471
+ numbersections: false
472
+
473
+ # Word output settings
474
+ docx:
475
+ reference: null # path to reference.docx template
476
+ keepComments: true
477
+ `;
478
+ // Generate section files
479
+ for (const section of sections) {
480
+ const header = titleCase(section);
481
+ files[`${section}.md`] = `# ${header}
482
+
483
+ `;
484
+ }
485
+ // Add common files
486
+ files['references.bib'] = base.files['references.bib'] || '';
487
+ files['.gitignore'] = base.files['.gitignore'] || `# Build outputs
488
+ *.pdf
489
+ *.docx
490
+ *.tex
491
+ paper.md
492
+ .paper-*.md
493
+
494
+ # System
495
+ .DS_Store
496
+ `;
497
+ return {
498
+ name: 'Custom',
499
+ description: 'Custom sections',
500
+ files,
501
+ directories: base.directories || ['figures'],
502
+ };
503
+ }
504
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":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AAW,IAAI,CAAC,SAAS,CAAC;KAC7C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Slide Themes for Beamer and PPTX
3
+ *
4
+ * 20 professionally designed themes based on modern design principles:
5
+ * - Bold, confident typography (2025-2026 trend)
6
+ * - Curated color palettes (monochrome, earth tones, neo-mint, dark mode)
7
+ * - Clean sans-serif fonts for readability
8
+ * - Consistent visual hierarchy
9
+ *
10
+ * Each theme includes:
11
+ * - Primary, secondary, accent colors
12
+ * - Background and text colors
13
+ * - Font recommendations
14
+ * - Beamer configuration
15
+ */
16
+ /**
17
+ * Theme colors
18
+ */
19
+ interface ThemeColors {
20
+ primary: string;
21
+ secondary: string;
22
+ accent: string;
23
+ background: string;
24
+ backgroundDark: string;
25
+ text: string;
26
+ textLight: string;
27
+ }
28
+ /**
29
+ * Theme fonts
30
+ */
31
+ interface ThemeFonts {
32
+ heading: string;
33
+ body: string;
34
+ mono: string;
35
+ }
36
+ /**
37
+ * Beamer settings
38
+ */
39
+ interface BeamerSettings {
40
+ theme: string;
41
+ colortheme: string | null;
42
+ fonttheme: string | null;
43
+ }
44
+ /**
45
+ * Complete theme definition
46
+ */
47
+ interface Theme {
48
+ name: string;
49
+ displayName: string;
50
+ description: string;
51
+ colors: ThemeColors;
52
+ fonts: ThemeFonts;
53
+ beamer: BeamerSettings;
54
+ }
55
+ export declare const THEMES: Record<string, Theme>;
56
+ /**
57
+ * Get theme by name
58
+ */
59
+ export declare function getTheme(name: string): Theme | null;
60
+ /**
61
+ * Get all theme names
62
+ */
63
+ export declare function getThemeNames(): string[];
64
+ /**
65
+ * Get themes by category
66
+ */
67
+ export declare function getThemesByCategory(category: string): Theme[];
68
+ /**
69
+ * Generate Beamer color definitions for a theme
70
+ */
71
+ export declare function generateBeamerColors(theme: Theme): string;
72
+ /**
73
+ * Generate CSS for PPTX reference doc
74
+ */
75
+ export declare function generatePptxCSS(theme: Theme): string;
76
+ /**
77
+ * Format theme info for display
78
+ */
79
+ export declare function formatThemeInfo(theme: Theme): string;
80
+ /**
81
+ * List all themes with descriptions
82
+ */
83
+ export declare function listThemes(): string;
84
+ export {};
85
+ //# sourceMappingURL=themes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../lib/themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;CACxB;AAWD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAwgBxC,CAAC;AAEF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAEnD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QA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