markdown-pdf-export 0.0.0-stage → 2.0.0

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.
@@ -0,0 +1,768 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://matinfo.github.io/markdown-pdf-export/schema/settings.schema.json",
4
+ "title": "markdown-pdf-export settings",
5
+ "description": "User settings (~/.config/markdown-pdf-export/settings.json) or project settings (.markdown-pdf.json).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "$schema": {
10
+ "type": "string",
11
+ "description": "JSON Schema URL (for editor autocomplete)."
12
+ },
13
+ "stylesheet_path": {
14
+ "type": "string",
15
+ "description": "CSS file applied after the built-in stylesheet (relative to this settings file)."
16
+ },
17
+ "open_after_export": {
18
+ "type": "boolean",
19
+ "description": "Open the PDF after export."
20
+ },
21
+ "page_format": {
22
+ "type": "string",
23
+ "enum": [
24
+ "A4",
25
+ "Letter",
26
+ "Legal",
27
+ "Tabloid",
28
+ "Ledger",
29
+ "A0",
30
+ "A1",
31
+ "A2",
32
+ "A3",
33
+ "A5",
34
+ "A6"
35
+ ],
36
+ "description": "Paper format."
37
+ },
38
+ "print_background": {
39
+ "type": "boolean",
40
+ "description": "Whether to print background colours and images."
41
+ },
42
+ "margin": {
43
+ "type": "object",
44
+ "description": "Page margins.",
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "top": {
48
+ "type": "string",
49
+ "description": "Top margin, for example '10mm' or '0.5in'."
50
+ },
51
+ "right": {
52
+ "type": "string",
53
+ "description": "Right margin, for example '10mm' or '0.5in'."
54
+ },
55
+ "bottom": {
56
+ "type": "string",
57
+ "description": "Bottom margin, for example '10mm' or '0.5in'."
58
+ },
59
+ "left": {
60
+ "type": "string",
61
+ "description": "Left margin, for example '10mm' or '0.5in'."
62
+ }
63
+ }
64
+ },
65
+ "orientation": {
66
+ "type": "string",
67
+ "enum": [
68
+ "portrait",
69
+ "landscape"
70
+ ],
71
+ "description": "Paper orientation."
72
+ },
73
+ "scale": {
74
+ "type": "number",
75
+ "description": "Scale of the page rendering (default 1)."
76
+ },
77
+ "page_ranges": {
78
+ "type": "string",
79
+ "description": "Paper ranges to print, e.g. '1-5, 8, 11-13'. Empty means all pages."
80
+ },
81
+ "include_default_styles": {
82
+ "type": "boolean",
83
+ "description": "Include the built-in default CSS stylesheet."
84
+ },
85
+ "highlight": {
86
+ "type": "boolean",
87
+ "description": "Enable syntax highlighting for code blocks."
88
+ },
89
+ "highlight_style": {
90
+ "type": "string",
91
+ "enum": [
92
+ "1c-light.css",
93
+ "a11y-dark.css",
94
+ "a11y-light.css",
95
+ "agate.css",
96
+ "an-old-hope.css",
97
+ "androidstudio.css",
98
+ "arduino-light.css",
99
+ "arta.css",
100
+ "ascetic.css",
101
+ "atom-one-dark-reasonable.css",
102
+ "atom-one-dark.css",
103
+ "atom-one-light.css",
104
+ "brown-paper.css",
105
+ "codepen-embed.css",
106
+ "color-brewer.css",
107
+ "cybertopia-cherry.css",
108
+ "cybertopia-dimmer.css",
109
+ "cybertopia-icecap.css",
110
+ "cybertopia-saturated.css",
111
+ "dark.css",
112
+ "default.css",
113
+ "devibeans.css",
114
+ "docco.css",
115
+ "far.css",
116
+ "felipec.css",
117
+ "foundation.css",
118
+ "github-dark-dimmed.css",
119
+ "github-dark.css",
120
+ "github.css",
121
+ "gml.css",
122
+ "googlecode.css",
123
+ "gradient-dark.css",
124
+ "gradient-light.css",
125
+ "grayscale.css",
126
+ "hybrid.css",
127
+ "idea.css",
128
+ "intellij-light.css",
129
+ "ir-black.css",
130
+ "isbl-editor-dark.css",
131
+ "isbl-editor-light.css",
132
+ "kimbie-dark.css",
133
+ "kimbie-light.css",
134
+ "lightfair.css",
135
+ "lioshi.css",
136
+ "magula.css",
137
+ "mono-blue.css",
138
+ "monokai-sublime.css",
139
+ "monokai.css",
140
+ "night-owl.css",
141
+ "nnfx-dark.css",
142
+ "nnfx-light.css",
143
+ "nord.css",
144
+ "obsidian.css",
145
+ "panda-syntax-dark.css",
146
+ "panda-syntax-light.css",
147
+ "paraiso-dark.css",
148
+ "paraiso-light.css",
149
+ "pojoaque.css",
150
+ "purebasic.css",
151
+ "qtcreator-dark.css",
152
+ "qtcreator-light.css",
153
+ "rainbow.css",
154
+ "rose-pine-dawn.css",
155
+ "rose-pine-moon.css",
156
+ "rose-pine.css",
157
+ "routeros.css",
158
+ "school-book.css",
159
+ "shades-of-purple.css",
160
+ "srcery.css",
161
+ "stackoverflow-dark.css",
162
+ "stackoverflow-light.css",
163
+ "sunburst.css",
164
+ "tokyo-night-dark.css",
165
+ "tokyo-night-light.css",
166
+ "tomorrow-night-blue.css",
167
+ "tomorrow-night-bright.css",
168
+ "vs.css",
169
+ "vs2015.css",
170
+ "xcode.css",
171
+ "xt256.css"
172
+ ],
173
+ "description": "Highlight.js style filename to use (e.g. 'github.css', 'monokai.css')."
174
+ },
175
+ "breaks": {
176
+ "type": "boolean",
177
+ "description": "Enable hard line breaks in the Markdown renderer."
178
+ },
179
+ "emoji": {
180
+ "type": "boolean",
181
+ "description": "Render :emoji: shortcodes as Unicode characters."
182
+ },
183
+ "math": {
184
+ "type": "boolean",
185
+ "description": "Render LaTeX math via KaTeX. Use $inline$ and $$display$$ syntax."
186
+ },
187
+ "math_options": {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "description": "KaTeX rendering options.",
191
+ "properties": {
192
+ "throw_on_error": {
193
+ "type": "boolean",
194
+ "description": "If true, abort rendering on a LaTeX error. Default false (renders error inline)."
195
+ },
196
+ "error_color": {
197
+ "type": "string",
198
+ "description": "CSS color used for inline error messages."
199
+ },
200
+ "macros": {
201
+ "type": "object",
202
+ "additionalProperties": {
203
+ "type": "string"
204
+ },
205
+ "description": "User-defined LaTeX macros, e.g. {\"\\\\RR\": \"\\\\mathbb{R}\"}."
206
+ }
207
+ }
208
+ },
209
+ "heading_anchors": {
210
+ "type": "boolean",
211
+ "description": "Add id slugs to headings (required infrastructure for TOC links)."
212
+ },
213
+ "toc": {
214
+ "type": "boolean",
215
+ "description": "Render a [[toc]] marker as an auto-generated table of contents (also enables heading anchors)."
216
+ },
217
+ "toc_options": {
218
+ "type": "object",
219
+ "additionalProperties": false,
220
+ "description": "Table-of-contents rendering options.",
221
+ "properties": {
222
+ "level": {
223
+ "type": "array",
224
+ "items": {
225
+ "type": "number"
226
+ },
227
+ "description": "Heading levels to include, e.g. [1, 2, 3]."
228
+ },
229
+ "list_type": {
230
+ "type": "string",
231
+ "enum": [
232
+ "ul",
233
+ "ol"
234
+ ],
235
+ "description": "List type for the TOC."
236
+ }
237
+ }
238
+ },
239
+ "display_header_footer": {
240
+ "type": "boolean",
241
+ "default": false,
242
+ "description": "Display header and footer on each page. Content comes from `header` / `footer` (here, in settings or in front matter); without them the header and footer are empty. Enabled automatically when `header` or `footer` is given."
243
+ },
244
+ "header": {
245
+ "$ref": "#/definitions/header_footer",
246
+ "description": "Page header."
247
+ },
248
+ "footer": {
249
+ "$ref": "#/definitions/header_footer",
250
+ "description": "Page footer."
251
+ },
252
+ "font_family": {
253
+ "type": "string",
254
+ "description": "CSS font-family value for the document body and header/footer. Overrides the default system font stack. Example: \"Georgia, 'Times New Roman', serif\"."
255
+ },
256
+ "heading_font_family": {
257
+ "type": "string",
258
+ "description": "CSS font-family value for headings (h1-h6). Default: same as the body text."
259
+ },
260
+ "look": {
261
+ "type": "string",
262
+ "enum": [
263
+ "clean",
264
+ "report",
265
+ "academic",
266
+ "compact",
267
+ "technical"
268
+ ],
269
+ "description": "Page style preset: clean (Default. GitHub-style, neutral.) report (Serif headings, strong title rule. Business reports.) academic (Serif body, justified, minimal colour. Papers and theses.) compact (Dense and small. More text per page.) technical (For documents with code: framed code blocks, blue accents.) Explicit keys in this file override it."
270
+ },
271
+ "font": {
272
+ "type": "string",
273
+ "enum": [
274
+ "sans",
275
+ "serif",
276
+ "book",
277
+ "humanist",
278
+ "geometric",
279
+ "mono",
280
+ "system"
281
+ ],
282
+ "description": "Font preset for the text. Use font_family for a custom stack."
283
+ },
284
+ "heading_font": {
285
+ "type": "string",
286
+ "enum": [
287
+ "sans",
288
+ "serif",
289
+ "book",
290
+ "humanist",
291
+ "geometric",
292
+ "mono",
293
+ "system"
294
+ ],
295
+ "description": "Font preset for titles (h1-h6). Use heading_font_family for a custom stack."
296
+ },
297
+ "template": {
298
+ "type": "string",
299
+ "enum": [
300
+ "minimal",
301
+ "simple",
302
+ "corporate",
303
+ "academic",
304
+ "two-logo"
305
+ ],
306
+ "description": "Header/footer preset. Explicit header/footer keys in this file override it."
307
+ },
308
+ "output_directory": {
309
+ "type": "string",
310
+ "description": "Folder for the PDFs, relative to each Markdown file. Default: next to it."
311
+ },
312
+ "assets_directory": {
313
+ "type": "string",
314
+ "description": "Folder for \"@/name.svg\" image references (relative to this settings file)."
315
+ }
316
+ },
317
+ "definitions": {
318
+ "header_footer": {
319
+ "type": [
320
+ "object",
321
+ "null"
322
+ ],
323
+ "additionalProperties": false,
324
+ "properties": {
325
+ "height": {
326
+ "type": "string",
327
+ "description": "Height of the area.",
328
+ "examples": [
329
+ "15mm"
330
+ ]
331
+ },
332
+ "padding": {
333
+ "type": "string",
334
+ "description": "CSS padding.",
335
+ "examples": [
336
+ "0 15mm"
337
+ ]
338
+ },
339
+ "font_family": {
340
+ "type": "string"
341
+ },
342
+ "font_size": {
343
+ "type": "string",
344
+ "description": "Default font-size.",
345
+ "examples": [
346
+ "9px"
347
+ ]
348
+ },
349
+ "font_style": {
350
+ "type": "string",
351
+ "enum": [
352
+ "normal",
353
+ "italic",
354
+ "oblique"
355
+ ]
356
+ },
357
+ "font_weight": {
358
+ "type": [
359
+ "string",
360
+ "number"
361
+ ]
362
+ },
363
+ "color": {
364
+ "type": "string",
365
+ "description": "Default text color.",
366
+ "examples": [
367
+ "#666"
368
+ ]
369
+ },
370
+ "background": {
371
+ "type": "string"
372
+ },
373
+ "border_bottom": {
374
+ "type": "string",
375
+ "description": "Header only.",
376
+ "examples": [
377
+ "1px solid #ddd"
378
+ ]
379
+ },
380
+ "border_top": {
381
+ "type": "string",
382
+ "description": "Footer only.",
383
+ "examples": [
384
+ "1px solid #eee"
385
+ ]
386
+ },
387
+ "style": {
388
+ "type": "string",
389
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
390
+ },
391
+ "left": {
392
+ "description": "Element, array of elements, or null to clear the zone.",
393
+ "anyOf": [
394
+ {
395
+ "$ref": "#/definitions/element"
396
+ },
397
+ {
398
+ "type": "array",
399
+ "items": {
400
+ "$ref": "#/definitions/element"
401
+ }
402
+ },
403
+ {
404
+ "type": "null"
405
+ }
406
+ ]
407
+ },
408
+ "center": {
409
+ "description": "Element, array of elements, or null to clear the zone.",
410
+ "anyOf": [
411
+ {
412
+ "$ref": "#/definitions/element"
413
+ },
414
+ {
415
+ "type": "array",
416
+ "items": {
417
+ "$ref": "#/definitions/element"
418
+ }
419
+ },
420
+ {
421
+ "type": "null"
422
+ }
423
+ ]
424
+ },
425
+ "right": {
426
+ "description": "Element, array of elements, or null to clear the zone.",
427
+ "anyOf": [
428
+ {
429
+ "$ref": "#/definitions/element"
430
+ },
431
+ {
432
+ "type": "array",
433
+ "items": {
434
+ "$ref": "#/definitions/element"
435
+ }
436
+ },
437
+ {
438
+ "type": "null"
439
+ }
440
+ ]
441
+ },
442
+ "left_text": {
443
+ "type": "string",
444
+ "description": "Shorthand: text in the left zone; placeholders allowed, e.g. \"Page {page} of {pages}\"."
445
+ },
446
+ "left_image": {
447
+ "type": "string",
448
+ "description": "Shorthand: image in the left zone (relative to the settings file, or \"@/name.svg\")."
449
+ },
450
+ "left_image_height": {
451
+ "type": "string",
452
+ "description": "Shorthand: height of the left image.",
453
+ "examples": [
454
+ "12mm"
455
+ ]
456
+ },
457
+ "center_text": {
458
+ "type": "string",
459
+ "description": "Shorthand: text in the center zone; placeholders allowed, e.g. \"Page {page} of {pages}\"."
460
+ },
461
+ "center_image": {
462
+ "type": "string",
463
+ "description": "Shorthand: image in the center zone (relative to the settings file, or \"@/name.svg\")."
464
+ },
465
+ "center_image_height": {
466
+ "type": "string",
467
+ "description": "Shorthand: height of the center image.",
468
+ "examples": [
469
+ "12mm"
470
+ ]
471
+ },
472
+ "right_text": {
473
+ "type": "string",
474
+ "description": "Shorthand: text in the right zone; placeholders allowed, e.g. \"Page {page} of {pages}\"."
475
+ },
476
+ "right_image": {
477
+ "type": "string",
478
+ "description": "Shorthand: image in the right zone (relative to the settings file, or \"@/name.svg\")."
479
+ },
480
+ "right_image_height": {
481
+ "type": "string",
482
+ "description": "Shorthand: height of the right image.",
483
+ "examples": [
484
+ "12mm"
485
+ ]
486
+ }
487
+ }
488
+ },
489
+ "element": {
490
+ "oneOf": [
491
+ {
492
+ "$ref": "#/definitions/element_text"
493
+ },
494
+ {
495
+ "$ref": "#/definitions/element_image"
496
+ },
497
+ {
498
+ "$ref": "#/definitions/element_page_number"
499
+ },
500
+ {
501
+ "$ref": "#/definitions/element_total_pages"
502
+ },
503
+ {
504
+ "$ref": "#/definitions/element_date"
505
+ },
506
+ {
507
+ "$ref": "#/definitions/element_title"
508
+ },
509
+ {
510
+ "$ref": "#/definitions/element_spacer"
511
+ }
512
+ ]
513
+ },
514
+ "element_text": {
515
+ "type": "object",
516
+ "additionalProperties": false,
517
+ "required": [
518
+ "type",
519
+ "content"
520
+ ],
521
+ "properties": {
522
+ "type": {
523
+ "const": "text"
524
+ },
525
+ "content": {
526
+ "type": "string",
527
+ "description": "Text; supports placeholders {page}, {pages}, {date}, {time}, {datetime}, {title}, {filename}, {author}."
528
+ },
529
+ "font_weight": {
530
+ "type": [
531
+ "string",
532
+ "number"
533
+ ],
534
+ "description": "CSS font-weight."
535
+ },
536
+ "font_style": {
537
+ "type": "string",
538
+ "enum": [
539
+ "normal",
540
+ "italic",
541
+ "oblique"
542
+ ]
543
+ },
544
+ "font_size": {
545
+ "type": "string",
546
+ "description": "CSS font-size.",
547
+ "examples": [
548
+ "9px",
549
+ "10pt"
550
+ ]
551
+ },
552
+ "color": {
553
+ "type": "string",
554
+ "description": "CSS color.",
555
+ "examples": [
556
+ "#666",
557
+ "gray"
558
+ ]
559
+ },
560
+ "style": {
561
+ "type": "string",
562
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
563
+ }
564
+ }
565
+ },
566
+ "element_image": {
567
+ "type": "object",
568
+ "additionalProperties": false,
569
+ "required": [
570
+ "type",
571
+ "src"
572
+ ],
573
+ "properties": {
574
+ "type": {
575
+ "const": "image"
576
+ },
577
+ "src": {
578
+ "type": "string",
579
+ "description": "SVG, PNG or JPG. Relative to the settings file; \"@/name.svg\" looks in assets_directory."
580
+ },
581
+ "height": {
582
+ "type": "string",
583
+ "description": "CSS height.",
584
+ "examples": [
585
+ "12mm"
586
+ ]
587
+ },
588
+ "width": {
589
+ "type": "string",
590
+ "description": "CSS width (omit to keep the aspect ratio)."
591
+ },
592
+ "alt": {
593
+ "type": "string"
594
+ },
595
+ "style": {
596
+ "type": "string",
597
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
598
+ }
599
+ }
600
+ },
601
+ "element_page_number": {
602
+ "type": "object",
603
+ "additionalProperties": false,
604
+ "required": [
605
+ "type"
606
+ ],
607
+ "properties": {
608
+ "type": {
609
+ "const": "page_number"
610
+ },
611
+ "format": {
612
+ "type": "string",
613
+ "description": "e.g. \"Page {page}\"."
614
+ },
615
+ "font_size": {
616
+ "type": "string",
617
+ "description": "CSS font-size.",
618
+ "examples": [
619
+ "9px",
620
+ "10pt"
621
+ ]
622
+ },
623
+ "color": {
624
+ "type": "string",
625
+ "description": "CSS color.",
626
+ "examples": [
627
+ "#666",
628
+ "gray"
629
+ ]
630
+ },
631
+ "style": {
632
+ "type": "string",
633
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
634
+ }
635
+ }
636
+ },
637
+ "element_total_pages": {
638
+ "type": "object",
639
+ "additionalProperties": false,
640
+ "required": [
641
+ "type"
642
+ ],
643
+ "properties": {
644
+ "type": {
645
+ "const": "total_pages"
646
+ },
647
+ "format": {
648
+ "type": "string",
649
+ "description": "e.g. \"{pages} pages\"."
650
+ },
651
+ "font_size": {
652
+ "type": "string",
653
+ "description": "CSS font-size.",
654
+ "examples": [
655
+ "9px",
656
+ "10pt"
657
+ ]
658
+ },
659
+ "color": {
660
+ "type": "string",
661
+ "description": "CSS color.",
662
+ "examples": [
663
+ "#666",
664
+ "gray"
665
+ ]
666
+ },
667
+ "style": {
668
+ "type": "string",
669
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
670
+ }
671
+ }
672
+ },
673
+ "element_date": {
674
+ "type": "object",
675
+ "additionalProperties": false,
676
+ "required": [
677
+ "type"
678
+ ],
679
+ "properties": {
680
+ "type": {
681
+ "const": "date"
682
+ },
683
+ "format": {
684
+ "type": "string",
685
+ "description": "date-fns format, e.g. \"yyyy-MM-dd\"."
686
+ },
687
+ "font_size": {
688
+ "type": "string",
689
+ "description": "CSS font-size.",
690
+ "examples": [
691
+ "9px",
692
+ "10pt"
693
+ ]
694
+ },
695
+ "color": {
696
+ "type": "string",
697
+ "description": "CSS color.",
698
+ "examples": [
699
+ "#666",
700
+ "gray"
701
+ ]
702
+ },
703
+ "style": {
704
+ "type": "string",
705
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
706
+ }
707
+ }
708
+ },
709
+ "element_title": {
710
+ "type": "object",
711
+ "additionalProperties": false,
712
+ "required": [
713
+ "type"
714
+ ],
715
+ "properties": {
716
+ "type": {
717
+ "const": "title"
718
+ },
719
+ "font_weight": {
720
+ "type": [
721
+ "string",
722
+ "number"
723
+ ]
724
+ },
725
+ "fallback": {
726
+ "type": "string",
727
+ "description": "Used when the document has no title."
728
+ },
729
+ "font_size": {
730
+ "type": "string",
731
+ "description": "CSS font-size.",
732
+ "examples": [
733
+ "9px",
734
+ "10pt"
735
+ ]
736
+ },
737
+ "color": {
738
+ "type": "string",
739
+ "description": "CSS color.",
740
+ "examples": [
741
+ "#666",
742
+ "gray"
743
+ ]
744
+ },
745
+ "style": {
746
+ "type": "string",
747
+ "description": "Extra inline CSS, e.g. \"letter-spacing: 1px\"."
748
+ }
749
+ }
750
+ },
751
+ "element_spacer": {
752
+ "type": "object",
753
+ "additionalProperties": false,
754
+ "required": [
755
+ "type"
756
+ ],
757
+ "properties": {
758
+ "type": {
759
+ "const": "spacer"
760
+ },
761
+ "width": {
762
+ "type": "string",
763
+ "description": "Fixed width; omitted = flexible."
764
+ }
765
+ }
766
+ }
767
+ }
768
+ }