annotate cv.sty @ 24:49001fa5195c

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