pdfmd-cli 3.15.0__tar.gz → 3.18.0__tar.gz
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.
- {pdfmd_cli-3.15.0/pdfmd_cli.egg-info → pdfmd_cli-3.18.0}/PKG-INFO +59 -1
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/README.md +58 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pdfmd.py +1211 -43
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0/pdfmd_cli.egg-info}/PKG-INFO +59 -1
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/LICENSE +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pdfmd_cli.egg-info/SOURCES.txt +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pdfmd_cli.egg-info/dependency_links.txt +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pdfmd_cli.egg-info/entry_points.txt +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pdfmd_cli.egg-info/requires.txt +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pdfmd_cli.egg-info/top_level.txt +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/pyproject.toml +0 -0
- {pdfmd_cli-3.15.0 → pdfmd_cli-3.18.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdfmd-cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.18.0
|
|
4
4
|
Summary: One command from Markdown to a good-looking PDF: a Pandoc wrapper with smart defaults, project-file discovery and a multi-engine fallback chain
|
|
5
5
|
Author: Ali Perdekhan
|
|
6
6
|
License-Expression: MIT
|
|
@@ -213,6 +213,64 @@ into a single PDF, in the order of each file's `chapter:` front-matter
|
|
|
213
213
|
field. See [`examples/book/`](https://github.com/aliperdehan/pdfmd/tree/main/examples/book/). `-i FILE` leaves one file
|
|
214
214
|
out, and `--exclude-unnumbered` skips files without a `chapter:`.
|
|
215
215
|
|
|
216
|
+
### One long document in several files
|
|
217
|
+
|
|
218
|
+
For an article-style document that has grown too long to edit as one file
|
|
219
|
+
(and unlike `-r`, one that should read as a single document, not a
|
|
220
|
+
sequence of chapters), keep a *scaffold* with the front matter, and the
|
|
221
|
+
text in a `parts/` folder beside it, one file per section, each starting with
|
|
222
|
+
its own heading:
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
report.md front matter only (title, author, ...)
|
|
226
|
+
parts/10-introduction.md
|
|
227
|
+
parts/20-methods.md
|
|
228
|
+
parts/30-discussion.md
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Switch it on once, in a `metadata.yaml` shared by your documents, so the
|
|
232
|
+
content files carry no typesetting:
|
|
233
|
+
|
|
234
|
+
```yaml
|
|
235
|
+
pdfmd-options:
|
|
236
|
+
parts: auto # a document is a scaffold only if parts/ or sections/ exists
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```console
|
|
240
|
+
$ pdfmd report # the whole document, report.pdf
|
|
241
|
+
$ pdfmd report#methods # just that part, report.methods.pdf
|
|
242
|
+
$ pdfmd report#discussion+appendix # several: always in report order
|
|
243
|
+
$ pdfmd parts/20-methods.md # same as report#methods
|
|
244
|
+
$ pdfmd report --list-parts
|
|
245
|
+
$ pdfmd old-report.md --split new-folder # cut an existing single file into parts
|
|
246
|
+
$ pdfmd old-report.md --split new-folder --split-depth 2 # ...and subsections too
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
The parts are joined in filename order into one Pandoc run, so the result is
|
|
250
|
+
identical to the same text in a single file: labels, citations and numbering
|
|
251
|
+
work across parts, and paths are written relative to the scaffold's folder
|
|
252
|
+
whichever part they are in. A part rebuilt alone is much faster to compile
|
|
253
|
+
but cannot see the others, so references to them print as `??`. See
|
|
254
|
+
[`examples/parts/`](https://github.com/aliperdehan/pdfmd/tree/main/examples/parts/).
|
|
255
|
+
|
|
256
|
+
#### Faster rebuilds: the cache
|
|
257
|
+
|
|
258
|
+
```yaml
|
|
259
|
+
pdfmd-options:
|
|
260
|
+
cache: {aux: true} # or: pdfmd report --cache
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
keeps LaTeX's cross-reference files between builds (in `~/.cache/pdfmd`), so
|
|
264
|
+
an unchanged document is typeset once instead of two or three times, and a
|
|
265
|
+
part built on its own shows the real numbers of the parts left out (taken
|
|
266
|
+
from the last full build) instead of `??`. It never skips a build: Pandoc and
|
|
267
|
+
LaTeX still process the whole document from the current sources and package
|
|
268
|
+
every time, so a change shows in the next build. `cache: {plots: true}` (or
|
|
269
|
+
`--cache-plots`, with nulabreport >= 1.26.0) additionally stores each plot as a
|
|
270
|
+
PDF and reuses it until the package, the preamble, the engine or the plot's
|
|
271
|
+
data file changes. Off by default; `--no-cache` for one build; `pdfmd --clear-cache`
|
|
272
|
+
(or deleting the folder) is always safe.
|
|
273
|
+
|
|
216
274
|
### Tables straight from a CSV file
|
|
217
275
|
|
|
218
276
|
```markdown
|
|
@@ -193,6 +193,64 @@ into a single PDF, in the order of each file's `chapter:` front-matter
|
|
|
193
193
|
field. See [`examples/book/`](https://github.com/aliperdehan/pdfmd/tree/main/examples/book/). `-i FILE` leaves one file
|
|
194
194
|
out, and `--exclude-unnumbered` skips files without a `chapter:`.
|
|
195
195
|
|
|
196
|
+
### One long document in several files
|
|
197
|
+
|
|
198
|
+
For an article-style document that has grown too long to edit as one file
|
|
199
|
+
(and unlike `-r`, one that should read as a single document, not a
|
|
200
|
+
sequence of chapters), keep a *scaffold* with the front matter, and the
|
|
201
|
+
text in a `parts/` folder beside it, one file per section, each starting with
|
|
202
|
+
its own heading:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
report.md front matter only (title, author, ...)
|
|
206
|
+
parts/10-introduction.md
|
|
207
|
+
parts/20-methods.md
|
|
208
|
+
parts/30-discussion.md
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Switch it on once, in a `metadata.yaml` shared by your documents, so the
|
|
212
|
+
content files carry no typesetting:
|
|
213
|
+
|
|
214
|
+
```yaml
|
|
215
|
+
pdfmd-options:
|
|
216
|
+
parts: auto # a document is a scaffold only if parts/ or sections/ exists
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
```console
|
|
220
|
+
$ pdfmd report # the whole document, report.pdf
|
|
221
|
+
$ pdfmd report#methods # just that part, report.methods.pdf
|
|
222
|
+
$ pdfmd report#discussion+appendix # several: always in report order
|
|
223
|
+
$ pdfmd parts/20-methods.md # same as report#methods
|
|
224
|
+
$ pdfmd report --list-parts
|
|
225
|
+
$ pdfmd old-report.md --split new-folder # cut an existing single file into parts
|
|
226
|
+
$ pdfmd old-report.md --split new-folder --split-depth 2 # ...and subsections too
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The parts are joined in filename order into one Pandoc run, so the result is
|
|
230
|
+
identical to the same text in a single file: labels, citations and numbering
|
|
231
|
+
work across parts, and paths are written relative to the scaffold's folder
|
|
232
|
+
whichever part they are in. A part rebuilt alone is much faster to compile
|
|
233
|
+
but cannot see the others, so references to them print as `??`. See
|
|
234
|
+
[`examples/parts/`](https://github.com/aliperdehan/pdfmd/tree/main/examples/parts/).
|
|
235
|
+
|
|
236
|
+
#### Faster rebuilds: the cache
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
pdfmd-options:
|
|
240
|
+
cache: {aux: true} # or: pdfmd report --cache
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
keeps LaTeX's cross-reference files between builds (in `~/.cache/pdfmd`), so
|
|
244
|
+
an unchanged document is typeset once instead of two or three times, and a
|
|
245
|
+
part built on its own shows the real numbers of the parts left out (taken
|
|
246
|
+
from the last full build) instead of `??`. It never skips a build: Pandoc and
|
|
247
|
+
LaTeX still process the whole document from the current sources and package
|
|
248
|
+
every time, so a change shows in the next build. `cache: {plots: true}` (or
|
|
249
|
+
`--cache-plots`, with nulabreport >= 1.26.0) additionally stores each plot as a
|
|
250
|
+
PDF and reuses it until the package, the preamble, the engine or the plot's
|
|
251
|
+
data file changes. Off by default; `--no-cache` for one build; `pdfmd --clear-cache`
|
|
252
|
+
(or deleting the folder) is always safe.
|
|
253
|
+
|
|
196
254
|
### Tables straight from a CSV file
|
|
197
255
|
|
|
198
256
|
```markdown
|