forked from renerocksai/sublimeless_zk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_commands.json
81 lines (73 loc) · 2.7 KB
/
build_commands.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Available variables are:
// - {note_path} : path to the note
// - {note_name} : filename of the note without extension!
// - {note_ext} : extension of the note file
// - {bib} : full path to .bib file if present, else None
// - {tempfile} : full path to a temporary file you can write to
// - {new_note_id} : a timestamp based note id if you need to create a new note
// Commands have the minimum format:
// "command-name" : { "run": ["program"] },
// Arguments follow after "program", one by one like this:
// "command-name" : { "run": ["program", "argument 1", "argument 2"] },
// See the examples below for optional "on_finish" and "on_error"
{
// convert to PDF via pandoc
"PDF (pandoc)" : {
"run": [
"pandoc",
// input file: your note: full path and extension
"{note_path}{note_name}{note_ext}",
"-f", "markdown",
// use --latex-engine=engine where engine is
// pdflatex|lualatex|xelatex.
// This may need to be specified with a full path, e.g.
// on a mac with BasicTeX
//"--latex-engine=/Library/TeX/texbin/pdflatex",
"--filter=pandoc-citeproc", // for bib references
// write into a temporary file
"--output={tempfile}.pdf",
// optionally specify a template for latex
// "--template=/path/to/your/default.latex",
"--toc", // create a table of contents
"--smart",
"--normalize",
"--bibliography={bib}",
"--highlight-style=tango"
],
"on_finish": {
// only applicable if your command creates
// a file like PDF or HTML
"open": "{tempfile}.pdf",
// only applicable if your command modifies
// the note externally
"reload_note": false,
// only applicable if your command
// creates {new_note_id}*{note_ext}
"open_new_note": false
},
"on_error": {
"show_error": true
}
},
// convert to PDF via pandoc
"PDF [no-bibfile] (pandoc)" : {
"run": [
"pandoc", "{note_path}{note_name}{note_ext}",
"-f", "markdown",
"--output={tempfile}.pdf",
"--toc", // create a table of contents
"--smart",
"--normalize",
"--highlight-style=tango"
],
"on_finish": {
"open": "{tempfile}.pdf",
"reload_note": false,
"open_new_note": false
},
"on_error": {
"show_error": true
}
},
// your commands go here
}