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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
.\" cv.tmac - troff/groff macros for a CV PDF document
.\" by Cian Bagshaw (2022)
.
.\" macros are documented in the format:
.\" .MA - macro description: arguments
.
.ps 12 \" text point size
.vs 13 \" vertical line spacing
.
.\" .LB - left border for content between .LB and .BE
.de LB
.nr LB \\n(nl \" record start position
.in +.5m \" indent text, yielding space for line
..
.\" .BE - left border content end, draw border/line
.de BE
.in -.5m \" reset indent
.nr LB \\n(nl-\\n(LB \" get and store area height (current-start pos)
\v'-\\n(LBu-1v'\L'\\n(LBu' \" go up to start, and draw a line back down
.sp 0 \" newline
..
.\" .HS - start heading, render title and content between .HS and .HE: name,
.\" picture.pdf (optional)
.de HS
.nr HS \\n(nl \" record start position
\X'pdf: pdfpic \\$2 -L 2i' \" gropdf pdfpic, left alligned, 2i wide
.in +2.2i \" indent text to left of image
.ps 40 \" set title size
.sp 1.3 \" newline
\\$1 \" print title name
.ps \" reset font size
.sp 0.3 \" newline
.ps +3 \" subtitle and info font size
\fICurriculum Vitae\fP \" italic subtitle
.sp 0.7 \" newline
.LB \" start left border for info text
.sp 0.3 \" newline
..
.\" .HE - end heading
.de HE
.BE \" end border
.ps \" reset font size
.in -2.2i \" reset indent
.sp \\n(HSu+2i+1v-\\n(nlu \" newline of correct size (start+2i+1v-end)
..
.\" .IN - info colon separated: label, value
.de IN
.ta T 0.7i \" set tab size
\fB\\$1:\fP\t\\$2 \" print bold label with colon, tab, value in roman
.sp 0.3 \" newline
.ta T 0.5 \" reset tab size
..
.\" .LS - list with columns: items per column, column width (ems)
.de LS
.sp .3 \" newline
.nr LC \\$1 \" record max items per column
.nr LW \\$2 \" record column width
.nr LS \\n(nl \" record top position
.nr LI 0 \" record current number of items (0)
.nr NC 0 \" record current number of columns (0)
..
.\" .LI - list item: text
.de LI
.nr CI \\n(NC*\\n(LW \" record/calculate indent (columns*width)
.nr LI \\n(LI+1 \" record/calculate item number
.nr NC \\n(LI/\\n(LC \" record/calculate number of columns (itemNumber/max)
.in \\n(CI+1.2 \" indent
\(bu \\$1\" \" print bullet and text
.sp .3 \" newline
.if !\\n(LI%\\n(LC .sp \\n(LSu-\\n(nlu \" if new column, go to top
..
.\" .LE - list end
.de LE
.in -\\n(CI+1.2 \" reset indent (-currentIndent)
.sp \\n(LSu-\\n(nlu+\\n(LCv+1 \" space to bottom of list (top-position+items+1)
..
.\" .SH - section heading: name
.de SH
.sp 1.5 \" newline
.ps 20 \" heading font-size
\v'.3m'\l'6.5i'\h'-6.5i'\v'-.3m'\\$1 \" go down, draw line, go back, go up, print title
.sp .3m \" newline
.ps \" reset font size
..
.\" .DA - date timeline, description between .DA and .DE: from, to, place,
.\" course/position (optional)
.de DA
.sp .5 \" newline
.in +1.2 \" indent
.ll -1.2 \" decrease line-length respectively
\fI\\$1 \- \\$2\fP \" print dates in bold
.in +1i \" indent text to the right of date
.sp -1 \" go up a line (indent causes newline)
.LB \" start left border
\fB\\$3\fP \" title
.sp 0 \" newline
.if \\n(.$.=4 \fB\\$4\fP: \" if course specified, print bold
..
.\" .DE - date end
.de DE
.BE \" end border
.in -1i+1.2 \" reset indent
.ll +1.2 \" reset line length
.sp -1
..
.\" .DF - draw footer and start new page
.de DF
'sp \" newline, no text break
.tl ''\s-2\\*(FO\s+2'' \" draw centered footer title, from FO string
'sp 2 \" newlines, no text break
..
.\" set trap for .DF macro, 2m from bottom of each page
.wh -2m DF
|