-
Notifications
You must be signed in to change notification settings - Fork 2
/
cv.template
185 lines (151 loc) · 6.49 KB
/
cv.template
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
% !TEX TS-program = xelatex
% !TEX encoding = UTF-8 Unicode
% Adam Altmejd's CV template for use with XeLaTeX
% Inspired by
% Kieran Healy's <https://github.com/kjhealy> pandoc-templates and Vita
% ModernCV <https://www.ctan.org/pkg/moderncv>
\documentclass[a4paper,11pt,article,oneside,openany]{memoir}
\usepackage{fontspec}
\usepackage{polyglossia}\setmainlanguage[variant=american]{english}
\usepackage[sf,compact]{titlesec}
$if(vc-git)$
\input{vc}
$endif$
\usepackage{unicode-math,amsmath}
\usepackage{upquote} % for straight quotes in verbatim
\usepackage[english=american]{csquotes}
\usepackage{microtype} % Only protrusion available in XeTeX (https://tex.stackexchange.com/questions/118713/is-microtype-fully-supported-now-by-xelatex-if-not-how-can-i-keep-myself-up-to)
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
\usepackage[hyperref,svgnames]{xcolor}
\usepackage{url}
\usepackage{fontawesome5} % for fontawesome fonts
\usepackage{enumitem} % for layout of description envs
\usepackage{hyperref}
% =============================================================================
% ============================ LAYOUT =========================================
% =============================================================================
% ============================ GEOMETRY, SKIPS, ETC. ==========================
\setlrmarginsandblock{30mm}{25mm}{*} % left right margins
\setulmarginsandblock{18mm}{23mm}{*} % top bottom margins
\setheadfoot{\onelineskip}{2\onelineskip} % {headheight}{footskip}
\setheaderspaces{20mm}{*}{*} % {headdrop}{headsep}{ratio}
\setlength{\parindent}{0pt}
\setlength{\parskip}{2pt} % small parskip (margin between paragraphs)
\raggedbottom % allow textheight to vary somewhat between pages
\feetatbottom % to ensure footnotes are still at bottom with \raggedbottom
\checkandfixthelayout[fixed] % use "fixed" with raggedbottom
\checkandfixthelayout[fixed]
% Length of description label indent
\newlength\desclen
\setlength\desclen{1.5\marginparwidth}
% No section numbering
\setcounter{secnumdepth}{0}
\definecolor{brandprimary}{HTML}{000000} % blue: 384E91
\definecolor{brandsuccess}{HTML}{000000} % red: D0404E
% ============================ LINKS ==========================================
\hypersetup{
breaklinks=true,
colorlinks=true,
citecolor=brandprimary,
urlcolor=brandprimary,
linkcolor=brandprimary,
pdfborder={0 0 0}
plainpages=false,
pdftitle={$if(title)$$title$$endif$},
pdfauthor={$if(author)$$author$$endif$},
pdfkeywords={$if(keywords)$$keywords$$endif$}
}
\urlstyle{same}
$if(links-as-notes)$
% Make links footnotes instead of hotlinks:
\renewcommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
% ============================ FONTS ==========================================
\defaultfontfeatures{Mapping={tex-text}}
\setromanfont[Numbers={OldStyle}]{Minion Pro}
\setsansfont[Colour=brandsuccess]{Gill Sans Std Light}
\setmonofont[Scale=0.8]{Operator Mono Light}
\setmathfont[Scale=0.8]{XITS Math} % Mathfont needs to be loaded after amsmath
\newfontface\headerfont[Scale=1.7]{Gill Sans Std Condensed}
\newfontface\addressblockfont{Gill Sans Std}
\newfontface\descriptionfont[Scale=0.8]{Gill Sans Std}
% ============================ DESCRIPTION ENV ================================
\SetLabelAlign{parright}{\strut\smash{\parbox[t]{\labelwidth}{\raggedleft#1}}}
\setlist[description]{
style=multiline, % sets label in parbox in left margin
nosep, % kills vspacing
mode=boxed,
labelsep=0.05\desclen,
leftmargin=0pt,
labelindent=-\desclen,
itemsep=1ex,
align=parright,
font=\descriptionfont
}
% ============================ MEMOIR STYLES ==================================
% Footer style
\makepagestyle{cv}
\makeevenfoot{cv}{}{}{\thepage}
\makeoddfoot{cv}{}{}{\thepage}
\pagestyle{cv}
\thispagestyle{empty} % empty first page
$if(vc-git)$
\makepagestyle{gitstyle}
\makeevenfoot{gitstyle}{}{\texttt{\footnotesize Commit \VCRevisionMod\ on \VCDateTEX}}{}
\makeoddfoot{gitstyle}{}{\texttt{\footnotesize Commit \VCRevisionMod\ on \VCDateTEX}}{}
\thispagestyle{gitstyle}
$endif$
% ============================ SECTIONS =======================================
% \titlespacing{command}{left spacing}{before spacing}{after spacing}[right]
% spacing: how to read {12pt plus 4pt minus 2pt}
% 12pt is what we would like the spacing to be
% plus 4pt means that TeX can stretch it by at most 4pt
% minus 2pt means that TeX can shrink it by at most 2pt
% SECTIONS (e.g. "Education", "Research")
\titleformat{\section}[block]{\Large\sffamily}%\bfseries
{\thesection}{0 pt}%
{\hspace*{-0.6\desclen}%
\color{brandsuccess}{\rule[0 pt]{0.55\desclen}{0.10 cm}}%
\hspace*{0.05\desclen}}
\titlespacing*{\section}{0pt}{*3}{-\parskip}
% SUBSECTIONS
\titleformat{\subsection}[block]{\large\sffamily}{\thesection}{0pt}{}
%\titlespacing*{\subsection}{0pt}{*2}{-\parskip}
\titlespacing*{\subsection}{0pt}{0pt}{-\parskip}
% SUBSUBSECTIONS
\titlespacing{\subsubsection}{0pt}{0pt}{-\parskip}
% =============================================================================
% ============================ BEGIN DOCUMENT =================================
% =============================================================================
\begin{document}
% ============================ HEADER =========================================
\begin{minipage}[b]{0.4\textwidth}
{\huge\headerfont $author$}\\%[1em]
{\LARGE\headerfont $title$}
\end{minipage}%
\hfill%
\begin{minipage}[b]{0.33\textwidth}
\raggedleft\footnotesize\addressblockfont
\href{$address.online$}{$address.affiliation$}\\
$address.main$\\
$address.city$ \\
$address.country$
\end{minipage}%
\hfill%
\begin{minipage}[b]{0.25\textwidth}
\raggedleft\footnotesize\addressblockfont%
$mobile$ \, \faPhone \\
\href{mailto:$email$}{$email$} \, \faEnvelope \\
\href{https://$homepage$}{$homepage$} \, \faGlobe \\
\href{https://twitter.com/$twitter$}{@$twitter$} \, \faTwitter \\
%\href{https://linkedin.com/in/$linkedin$}{$linkedin$} \, \faLinkedin \\
%\href{https://github.com/$github$}{$github$} \, \faGithub
\end{minipage}
\bigskip
% ============================ BODY ===========================================
$body$
% ============================ FOOTER =========================================
$for(include-after)$
$include-after$
$endfor$
\end{document}