-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdf.tmac
40 lines (34 loc) · 839 Bytes
/
pdf.tmac
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
\# -*- nroff -*-
\# Module pdf - Easy pdf outlines & metadata
.Macro Meta
\# Usage: .Meta Type Data
. pdfmark /\\$1 (\\$2) /DOCINFO
..
.Macro Subject
. ds doc*subject \\$1
..
.Macro Keywords
. ds doc*keywords \\$1
. shift 1
. while (\\n[.$] > 0) \{\
. ds doc*keywords \\*[doc*keywords] \\$1
. shift 1
. \}
..
.Macro LinkColor
. ds PDFHREF.COLOUR \\$1 \\$2 \\$3
. defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR]
..
.Macro @pdf*Heading
. nr @pdf*level \\$1
. ds @pdf*text \\$2
. pdfhref O \\n[@pdf*level] \\*[@pdf*text]
..
.Macro @pdf*Init
. Meta Title "\\*[doc*title]"
. if d doc*author .Meta Author "\\*[doc*author]"
. if d doc*subject .Meta Subject "\\*[doc*subject]"
. if d doc*keywords .Meta Keywords "\\*[doc*keywords]"
\# Takes care of incorporating the whole outline at the end of input.
. em pdfsync
..