-
Notifications
You must be signed in to change notification settings - Fork 16
/
Typeset as PDF.tmCommand
38 lines (36 loc) · 1009 Bytes
/
Typeset as PDF.tmCommand
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string># Source some support functions we need.
. "${TM_SUPPORT_PATH}/lib/html.sh"
. "${TM_SUPPORT_PATH}/lib/webpreview.sh"
# Prepare output window.
html_header 'Typeset &amp; View' "$TM_FILENAME (PDF)"
# Compile.
asciidoc --backend=docbook "$TM_FILEPATH"
if [ -f ./custom.sty ] ; then
dblatex -b pdftex --texstyle ./custom.sty "${TM_FILEPATH%.*}.xml"
else
dblatex -b pdftex "${TM_FILEPATH%.*}.xml"
fi
RC=$?
html_footer
open "${TM_FILEPATH%.*}.pdf"
exit $RC
</string>
<key>input</key>
<string>none</string>
<key>name</key>
<string>Typeset as PDF</string>
<key>output</key>
<string>showAsHTML</string>
<key>scope</key>
<string>text.html.asciidoc</string>
<key>uuid</key>
<string>9F638BC7-267F-4449-ABB7-0D1B685AE16F</string>
</dict>
</plist>