-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreamble.sty
More file actions
210 lines (182 loc) · 6.36 KB
/
preamble.sty
File metadata and controls
210 lines (182 loc) · 6.36 KB
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
% we use the 'tcolorbox' package to create most of the formatting
\usepackage[most]{tcolorbox}
% we use 'geometry' package so that we can set the margins to be exactly we eant. In this case, 2.54 cm all around, to match those that MS word uses by default. Note that we set different margins at the top and bottom to take account of the custom header and footer that we are using.
\usepackage{geometry}
\geometry{
a4paper,
left=0.1cm,
right=0.6cm,
top=0.1cm,
bottom=0.1cm
}
% Fonts
\usepackage[TU]{fontenc}
\usepackage{fourier-otf}
% to have awesome icon
\usepackage{fontawesome}
%\usepackage{fontawesome5}
\usepackage{academicons}
% advanced drawing
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{smartdiagram}
\usepackage{float}
\usepackage{array}
\usetikzlibrary{decorations.text}
\usetikzlibrary{fadings}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.misc,positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shadings}
\usetikzlibrary{calendar}
\usetikzlibrary{er}
\usetikzlibrary{patterns}
\usetikzlibrary{shapes}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{decorations}
\usetikzlibrary{topaths}
\usepackage{graphicx}
% set TikZ styles
\tikzset{
contactIcon/.style={%
minimum height=\baselineskip,
}
}
% pictures
\usepackage{graphicx}
% loads graphicx, provides align=c option for vertical alignment w.r.t. text
\RequirePackage{graphbox}
% more advanced expressions in \setlength
\usepackage{calc}
% links
\usepackage{hyperref}
% Define Colors
\RequirePackage{xcolor}
\definecolor{titleBackColor}{RGB}{0,0,0}
\definecolor{sideBarColor}{RGB}{0,0,0}
% Define Lengths
\newlength\cvPictureWidth
\setlength\cvPictureWidth{4cm}
% avoid line overflow
% \setlength{\emergencystretch}{2pt}
% CV tag for skills
\newcommand{\cvtag}[1]{%
\tikz[baseline]\node[anchor=base,draw=black!30,rounded corners,inner xsep=1ex,inner ysep =0.75ex,text height=1.5ex,text depth=.25ex]{\footnotesize #1};
}
% top box with simple header
\newcommand{\simpleheader}[5]{
\tikz[remember picture,overlay] {%
\node[rectangle, fill=#1, anchor=north, minimum width=\paperwidth, minimum height=3.5cm](header) at (current page.north){};%
\node[draw=none, align=left](name) at (header) {%
{\Huge \color{#5} #2 \textbf{#3} }%
};%
\node[draw=none, below](description) at (name.south) {\color{white}#4};%
}\vspace{-0.7cm}%
}
% Command Example:
% \simpleheader{titleBackColor}{Name}{Surname}{Job}{textColor}
% Next page header
\newcommand{\newpageheader}[5]{
\tikz[remember picture,overlay] {%
\node[rectangle, fill=#1, anchor=north, minimum width=\paperwidth, minimum height=1.4cm](header) at (current page.north){};%
}\vspace{0cm}%
\begin{tcolorbox}[colback=mitgray,boxrule=0pt,frame empty]
\large \textcolor{#5}{\textbf{#2 #3}}
\hspace*{0.2\textwidth}{\large \textcolor{#5}{#4}}
\hspace*{\fill}{\large \textcolor{#5}{\textbf{Curriculum Vitae}}}
\end{tcolorbox}
}
% SideBar
\newcommand{\sidebar}[1]{
\tikz[remember picture,overlay] {%
\node[rectangle, fill=#1, anchor=north west, minimum width=8.4cm, minimum height=\paperheight](header) at (current page.north west){};%
}\vspace{-0.7cm}%
}
% Flag for Languages section and for all small personal icons
\newcommand{\flag}[1]{\includegraphics[align=c, width=1em]{#1}}
% Command for Education and Works
\newcommand{\MySection}[7]{ % input: years, logo, title, university, city, specialization, description
\adjustbox{valign=t}{\begin{minipage}{2cm}
\begin{center}
{\small \bfseries #1} \\
\vspace*{0.1cm}
\includegraphics[width=1.2cm]{#2}
\end{center}
\end{minipage}}
\hfill \vline \hfill
\adjustbox{valign=t}{\begin{minipage}{8.5cm}
{\normalsize\bfseries #3}
\hfill {\footnotesize \faMapMarker ~ #5}
\newline
{\small\bfseries #4}
\newline
\small {\emph{#6}}
\newline
\footnotesize {#7}
\end{minipage}}
}
\newcommand{\MySectionNoPic}[5]{ % input: years, logo, title, university, city, specialization, description
\adjustbox{valign=t}{\begin{minipage}{2cm}
\begin{center}
{\small \bfseries #1} \\
\vspace*{0.1cm}
\end{center}
\end{minipage}}
\hfill \vline \hfill
\adjustbox{valign=t}{\begin{minipage}{8.5cm}
{\normalsize \bfseries #2}
\hfill {\footnotesize\faMapMarker ~ #3}
\newline
%{\small \bfseries #3} \\
\small {\emph{#4}} \\
\footnotesize {#5}
\end{minipage}}
}
% Publication Section
\newcommand{\publication}[6]{ % Article/Conference, year, name, authors, journal, DOI
\adjustbox{valign=t}{\begin{minipage}{2.5cm}
{\small \textbf{#1} \\ \footnotesize #2} \\
\end{minipage}}
\hfill
\adjustbox{valign=t}{\begin{minipage}{8cm}
{\footnotesize \textbf{#3}, #4, \textit{#5}, \aiDoi \hspace{0.1mm} \href{https://www.doi.org/#6}{#6}}
\end{minipage}}
}
% ITC section
\newcommand{\ITCcompetence}[2]{ % input: Branch, description
\adjustbox{valign=t}{\begin{minipage}{2cm}
\begin{center}
{\footnotesize \bfseries #1} \\
\vspace*{0.1cm}
\end{center}
\end{minipage}}
\hfill \vline \hfill
\adjustbox{valign=t}{\begin{minipage}{8.5cm}
{\footnotesize #2}
\end{minipage}}
}
\usepackage{lipsum} % dummy text
\usepackage{adjustbox} % to a better alignement of text
% Format of the title section in the side column
% based on https://tex.stackexchange.com/questions/65731
\makeatletter
\def\cv@hrulefill{{\color{titleBackColor}\leavevmode\leaders\hrule height 1pt\hfill\kern\z@}}
% line before and after text (some tweaking is required here)
% based on https://tex.stackexchange.com/questions/15119
\NewDocumentCommand{\ruleline}{m}{\par\noindent\raisebox{\baselineskip/4}{\makebox[\linewidth]{\cv@hrulefill\hspace{1ex}\raisebox{-\baselineskip/4}{\large #1}\hspace{1ex}\cv@hrulefill}}\vspace*{0.05cm}}
\makeatother
\usepackage{titlesec} % Allows creating custom \sections
% Format of the section titles
\titleformat{\section}{
\bf \Large\raggedright}{}{0em}{}[\titlerule] % smallcaps, Large, continuous line - looks better if two columns, might look a bit too dramatic if just one ;)
\titlespacing{\section}{0pt}{12pt}{5pt} % Spacing around titles {<left spacing>}{<before spacing>}{<after spacing>}
% Multiple Column Package
\usepackage{multicol}
% Generate QR Code from a link
\usepackage{qrcode}
% Info
\title{My CV}
\date{03/10/2022}
\author{pietro.dileo}