This repository has been archived by the owner on Sep 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
barmby_cv.sty
193 lines (161 loc) · 5.75 KB
/
barmby_cv.sty
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
186
187
188
189
190
191
192
193
%% Curriculum Vitae style file
%% Pauline Barmby, last updated 28 Aug 2014
%% modification of original file by Rob J Hyndman available at http://robjhyndman.com/research/cv.sty
%% This file may be modified, copied and redistributed without any further permission.
%% However, if you modify it, please add a note indicating it is a modification of the original.
\usepackage{paralist,ragged2e,datetime}
\usepackage{hyperref,fancyhdr,enumitem,color}
\usepackage[text={7.5in,9.5in},centering]{geometry}
\usepackage[compact,small,sf,bf]{titlesec}
\RaggedRight
\sloppy
% Header and footer
\pagestyle{fancy}
\lhead{\sf \@name, \today}
\rhead{\sf\thepage}
\cfoot{}
% Date format
\newdateformat{rjh}{\monthname~\THEYEAR}
\rjh
% Header box
\def\name#1{\def\@name{#1}}
\def\info#1{\def\@info{#1}}
\newcommand{\shadebox}[3][.9]{\fcolorbox[gray]{0}{#1}{\parbox{#2}{#3}}}
\def\maketitle{
\thispagestyle{plain}
\vspace*{-1.4cm}
\shadebox[0.9]{17.3cm}{\sf\color[rgb]{0,0,0}
\hbox to 7.25in{\begin{tabular}{p{7.4cm}}
\Large\textbf{\@name}\\[0.3cm]
%\Large\textbf{Curriculum Vitae}\\[0.6cm]
\normalsize\today
\end{tabular}
\hfill\hbox{\fontsize{9}{12}\sf
\begin{tabular}{@{}rp{7.2cm}@{}}
\@info
\end{tabular}}}
}
\vspace*{0.2cm}}
% Section headings
\titlelabel{}
\titlespacing{\section}{0pt}{2ex}{1ex}
\titleformat*{\section}{\color[rgb]{0.0,0,0}\large\sf\bfseries}
\titlespacing{\subsection}{0pt}{1ex}{0.5ex}
% Miscellaneous dimensions
\setlength{\parskip}{0ex}
\setlength{\parindent}{0em}
\setlength{\headheight}{15pt}
\setlength{\tabcolsep}{0.15cm}
\clubpenalty = 10000
\widowpenalty = 10000
\setlist{itemsep=1pt}
\setdescription{labelwidth=1.2cm,leftmargin=1.5cm,labelindent=1.5cm,font=\rm}
% Bibliography formatting
\usepackage[sorting=ydnt,bibstyle=authoryear-comp,defernumbers=true,maxnames=20,giveninits=true, uniquename=init,dashed=false,doi=true,isbn=false,eprint=false,backend=biber]{biblatex}
% formatting things that are not yet working:
%\DeclareFieldFormat[article]{journal}{\mkbibnorm{#1}} % no italics
%\DeclareFieldFormat[article]{year}{{#1},} no brackets, just "2013,"
% this makes all the names show up as last, first.
\DeclareNameAlias{sortname}{last-first}
\DeclareFieldFormat{url}{\url{#1}}
% articles
\DeclareFieldFormat[article]{pages}{#1}
\DeclareFieldFormat[article]{number}{\mkbibparens{#1}}
\DeclareFieldFormat[article]{title}{\MakeCapital{#1}}
\DeclareFieldFormat[article]{title}{\mkbibquote{#1}}
\DeclareFieldFormat[article]{journaltitle}{#1}
\DeclareFieldFormat[article]{year}{#1}
\DeclareFieldFormat[article]{url}{}
\DeclareFieldFormat[article]{eid}{}
% conf proc
\DeclareFieldFormat[inproceedings]{pages}{#1}
\DeclareFieldFormat[inproceedings]{title}{\mkbibquote{#1}}
\DeclareFieldFormat[inproceedings]{booktitle}{#1}
%
\DeclareFieldFormat[incollection]{pages}{\lowercase{pp.}#1}
\DeclareFieldFormat{shorthandwidth}{#1}
\DeclareFieldFormat{extrayear}{}
% from http://tex.stackexchange.com/questions/46868/biblatex-sorting-by-date
% doesn't work at present
%\DeclareSortingScheme{dymnt}{
% \sort{
% \field{presort}
% }
% \sort[final]{
% \field{sortkey}
% }
% \sort[direction=descending]{
% \field{sortyear}
% \field{year}
% \literal{9999}
% }
% \sort[direction=descending]{
% \field[padside=left,padwidth=2,padchar=0]{month}
% \literal{99}
% }
% \sort{
% \name{sortname}
% \name{author}
% \name{editor}
% \name{translator}
% \field{sorttitle}
% \field{title}
% }
%
% \sort[direction=descending]{
% \field[padside=left,padwidth=4,padchar=0]{volume}
% \literal{9999}
% }
% \sort{
% \field{sorttitle}
% }
%}
% complete hack to make "(2012)" become "2012,"
% attempted to put year after title rather than before -- but too much work
\renewcommand{\bibopenparen}{\addcomma\addspace}
\renewcommand{\bibcloseparen}{\addcomma\addspace}
% No dot before number of articles (no idea what this does - PB)
\usepackage{xpatch}
\xpatchbibmacro{volume+number+eid}{\setunit*{\adddot}}{}{}{}
% Remove In: for an article. Couldn't figure out how to change to "at"
% for conferences, gave up.
\renewbibmacro{in:}{%
\ifentrytype{article}{}{%
\printtext{\bibstring{in}\intitlepunct}}}
% Bibliography categories
\def\makebibcategory#1#2{\DeclareBibliographyCategory{#1}\defbibheading{#1}{\section*{#2}}}
\makebibcategory{books}{Books}
\makebibcategory{papers}{Refereed research papers}
\makebibcategory{chapters}{Book chapters}
\makebibcategory{conferences}{Papers in conference proceedings}
\makebibcategory{techreports}{Unpublished working papers}
\makebibcategory{bookreviews}{Book reviews}
\makebibcategory{editorials}{Editorials}
\makebibcategory{phd}{PhD thesis}
\makebibcategory{subpapers}{Submitted papers}
\makebibcategory{curpapers}{Current projects}
\setlength{\bibitemsep}{2.5pt}
\setlength{\bibhang}{.8cm}
%\renewcommand{\bibfont}{\fontsize{12}{14}}
\renewcommand*{\bibitem}{\addtocounter{papers}{1}\item \mbox{}\hskip-0.85cm\hbox to 0.85cm{\hfill\arabic{papers}.~~}}
\defbibenvironment{bibliography}
{\list{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\bibitem}
\newenvironment{publications}{\section{\LARGE Publications}\label{papersstart}
\textbf{Author names in italics are Western University trainees.}
{\tt DOIs are linked to papers.}
\vspace*{0.2cm}
\titlespacing{\section}{0pt}{1.5ex}{1ex}\itemsep=0.00cm
}{\label{papersend}\addtocounter{sumpapers}{-1}\refstepcounter{sumpapers}\label{sumpapers}}
\def\printbib#1{\printbibliography[category=#1,heading=#1]\lastref{sumpapers}}
\renewcommand{\bibfont}{\normalfont\fontsize{11}{13.4}\rmfamily}
% Counters for keeping track of papers
\newcounter{papers}\setcounter{papers}{0}
\newcounter{sumpapers}\setcounter{sumpapers}{0}
\def\lastref#1{\addtocounter{#1}{\value{papers}}\setcounter{papers}{0}}
% Add all papers in the bib file.
\nocite{*}