Mercurial > hg > cv
annotate cv.sty @ 11:2b6d9059f270
Update
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Mon, 28 Nov 2016 11:48:11 -0700 |
parents | a74b9e0f9064 |
children | 6396966cca25 |
rev | line source |
---|---|
0 | 1 % inspired by http://robjhyndman.com/research/cv.sty |
2 | |
3 \usepackage{datetime,fancyhdr,xcolor,enumitem} | |
4 \usepackage[a4paper,text={17.5cm,25.5cm},centering]{geometry} | |
5 \usepackage[compact,small,bf]{titlesec} | |
6 | |
7 % fonts | |
8 \usepackage[charter]{mathdesign} | |
9 \usepackage{inconsolata} | |
10 | |
11 % colors | |
12 \definecolor{theblue}{rgb}{0.086,0.173,0.514} | |
13 \definecolor{thered}{rgb}{0.6,0.0,0.0} | |
14 | |
15 % fancy pdf | |
16 \usepackage[colorlinks,urlcolor=theblue,linkcolor=theblue,citecolor=theblue]{hyperref} | |
17 | |
18 % mailto command | |
19 \DeclareRobustCommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}} | |
20 | |
21 % header and footer | |
22 \pagestyle{fancy} | |
23 \lhead{\fontsize{9}{12}\sf Curriculum Vitae: \@name} | |
24 \rhead{\fontsize{9}{12}\sf\thepage} | |
25 \cfoot{} | |
26 | |
27 % date format | |
28 \newdateformat{df}{\monthname~\THEYEAR} | |
29 \df | |
30 | |
31 % header | |
32 \def\name#1{\def\@name{#1}} | |
33 \def\address#1{\def\@address{#1}} | |
34 \def\info#1{\def\@info{#1}} | |
35 \def\maketitle{ | |
36 % add pdf metadata | |
37 \hypersetup{pdftitle=\@name\ Curriculum Vitae,pdfauthor=\@name} | |
38 \thispagestyle{empty} | |
39 \vspace*{-1.4cm} | |
40 \noindent | |
41 {\color{thered}\Large\textbf{Curriculum Vitae}\\[0.5em]}% | |
42 {\LARGE\textbf{\@name}\\[0.5em]}% | |
43 \setlength{\tabcolsep}{0pt} | |
44 \begin{tabular*}{0.55\textwidth}{l} | |
45 \@address | |
46 \end{tabular*} | |
47 \setlength{\tabcolsep}{0.25em} | |
48 \begin{tabular}{rl} | |
49 \@info | |
50 \end{tabular} | |
51 \vspace*{1em} | |
52 } | |
53 | |
54 % section headings | |
55 \titlelabel{} | |
56 \titlespacing*{\section}{0pt}{2ex}{1ex} | |
57 \titleformat*{\section}{\color{thered}\large\bfseries} | |
58 \titlespacing*{\subsection}{0pt}{1ex}{0.5ex} | |
59 | |
60 % miscellaneous dimensions | |
61 \setlength{\parskip}{0pt} | |
62 \setlength{\headheight}{15pt} | |
63 \setlength{\tabcolsep}{0.15cm} | |
64 | |
65 % listings | |
66 \setlist{itemsep=0.5\itemsep} | |
67 \setdescription{leftmargin=2em,style=nextline} | |
68 | |
69 \newenvironment{dottedlist} | |
3 | 70 {\vspace{0.5ex}\list{}{\leftmargin=2em\rightmargin=2em}\item[] |
71 \def\and{{\footnotesize\textbullet\space}}} | |
72 {\endlist\vspace*{-1ex}} | |
0 | 73 |
74 % bibliography formatting | |
5
a74b9e0f9064
Switch from biblatex to biber
Daniele Nicolodi <daniele@grinta.net>
parents:
3
diff
changeset
|
75 \usepackage[backend=biber,bibstyle=authortitle,sorting=none]{biblatex} |
0 | 76 |
77 % biblatex version in texlive 2010 does not contain this definition | |
78 \defbibheading{none}{}{}{} | |
79 | |
80 \DeclareFieldFormat{url}{\url{#1}} | |
81 \DeclareFieldFormat{pages}{#1} | |
82 \DeclareFieldFormat{journaltitle}{#1} | |
83 \DeclareFieldFormat{year}{\textbf{#1}} | |
84 \DeclareFieldFormat[article]{title}{\textit{#1}} | |
85 | |
86 \DeclareFieldFormat{doi}{% | |
87 \texttt{DOI}\addcolon\space | |
88 \ifhyperref | |
89 {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}} | |
90 {\nolinkurl{#1}}} | |
91 | |
92 \renewbibmacro*{journal+issuetitle}{% | |
93 \usebibmacro{journal}% | |
94 \setunit*{\addspace}% | |
95 \iffieldundef{series} | |
96 {} | |
97 {\newunit | |
98 \printfield{series}% | |
99 \setunit{\addspace}}% | |
100 \printfield{volume}% | |
101 %\setunit*{\adddot}% | |
102 %\printfield{number}% | |
103 \setunit{\addcomma\space}% | |
104 \printfield{eid}% | |
105 \setunit{\addspace}% | |
106 %\usebibmacro{issue+date}% | |
107 %\setunit{\addcolon\space}% | |
108 \usebibmacro{issue}% | |
109 \newunit} | |
110 | |
111 \DeclareBibliographyDriver{article}{% | |
112 \usebibmacro{bibindex}% | |
113 \usebibmacro{begentry}% | |
114 \usebibmacro{author/translator+others}% | |
115 \setunit{\labelnamepunct}\newblock | |
116 \usebibmacro{title}% | |
117 \newunit | |
118 \printlist{language}% | |
119 \newunit\newblock | |
120 \usebibmacro{byauthor}% | |
121 \newunit\newblock | |
122 \usebibmacro{bytranslator+others}% | |
123 \newunit\newblock | |
124 \printfield{version}% | |
125 \newunit\newblock | |
126 %\usebibmacro{in:}% | |
127 \usebibmacro{journal+issuetitle}% | |
128 \newunit\newblock | |
129 \usebibmacro{byeditor+others}% | |
130 \newunit\newblock | |
131 \usebibmacro{note+pages}% | |
132 \newunit\newblock | |
133 \iftoggle{bbx:isbn} | |
134 {\printfield{issn}} | |
135 {}% | |
136 \newunit\newblock | |
137 \usebibmacro{addendum+pubstate}% | |
138 \newunit\newblock | |
139 \usebibmacro{pageref}% | |
140 \newunit\newblock | |
141 \setunit{\addcomma\space}% | |
142 \printfield{year}% | |
143 \newunit\newblock | |
144 \usebibmacro{doi+eprint+url}% | |
145 \newunit\newblock | |
146 \setunit{\adddot\space}% | |
147 \printfield{url} | |
148 \usebibmacro{finentry}} | |
149 | |
150 \renewcommand*{\bibitem}{\item} | |
151 \defbibenvironment{bibliography}{\begin{enumerate}}{\end{enumerate}}{\bibitem} | |
152 | |
153 % add all papers in the bib file. | |
154 \nocite{*} |