-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurriculum-vitae.sty
91 lines (89 loc) · 3.34 KB
/
curriculum-vitae.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
% Created by Huu Duc Nguyen
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{curriculum-vitae}[2022/27/04]
%----------------------------------------------------------------------------------------
% PACKAGES
%----------------------------------------------------------------------------------------
\RequirePackage[utf8]{inputenc} % Input-encoding
\RequirePackage{xstring, xifthen} % provides \isempty test
\RequirePackage{fontawesome5, moresize} % Fonts
\RequirePackage{fontenc, fontspec} % Fonts
\setmonofont{BebasKai}[
Path=./,
Extension = .otf,
UprightFont=*-Regular,
]
\setmainfont{Museo Sans}[
Path=./,
Extension = .otf,
UprightFont=*-100,
BoldFont=*-500,
]
\RequirePackage[a4paper]{geometry} % define page styles using geometry
\geometry{top=1.4cm, bottom=1.4cm, left=1cm, right=1cm} % remove all possible margins
\RequirePackage{color}
\definecolor{red}{RGB}{218, 0, 55}
\definecolor{black}{RGB}{23, 23, 23}
\definecolor{gray}{RGB}{147, 147, 147}
\RequirePackage[pdfusetitle,
hidelinks,
pdfborder ={0 0 0}, % Avoid borders in PDF
linkcolor = red, % simple internal links
filecolor = red,
colorlinks = true, % Set text color
anchorcolor = black, % Anchor text
menucolor = black, % Acrobat-menu
urlcolor = red % Reference to internet links
]{hyperref} % Hyperlink
\RequirePackage{fancyhdr, lastpage} % Paging style
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\cfoot{\textbf{\thepage \ / \pageref{LastPage}}}
\RequirePackage{setspace} % Varying line spacing
\RequirePackage[none]{hyphenat} % No word break with hyphen
% SUPPORTING FUNCTIONS
\def\hrulefill{\leavevmode\leaders\hrule height 1.4pt\hfill\kern\z@}
\def\firstLetter#1#2@{#1}
\def\secondLetter#1#2@{#2}
\newcommand\tab[1][.9cm]{\hspace*{#1}}
\newcommand{\cvContactSpace}{\quad\textcolor{red}{$\bullet$}\quad}
\newcommand{\cvContactSep}{\textcolor{red}{\textbf{|}} }
%============================================================================%
% CV COMMANDS
%============================================================================%
% SETTING UP INFO
\newcommand*{\setname}[2]{\def\@firstname{#1}\def\@lastname{#2}}
\newcommand*{\setaddress}[1]{\def\@address{#1}}
\newcommand*{\setmobile}[1]{\def\@mobile{#1}}
\newcommand*{\setposition}[1]{\def\@position{#1}}
\newcommand*{\setmail}[1]{\def\@mail{#1}}
\newcommand*{\setlinkedin}[1]{\def\@linkedin{#1}}
\newcommand*{\setgithub}[1]{\def\@github{#1}}
% CV TITLE
\newcommand{\cvtitle}[1]{
\begin{center}
{\fontsize{27}{0}\selectfont
\texttt{\@firstname \ {\color{gray}{\@lastname}} }
\textcolor{red}{\cvContactSep \textbf{#1}}}\\
{\fontsize{12}{0}\selectfont
\href{\@mail}{\faIcon{envelope} \@mail}
\cvContactSpace \@address
\cvContactSpace \faIcon{phone} \@mobile\\
\href{\@github}{\faIcon{github} \@github}
\cvContactSpace \href{\@linkedin}{\faIcon{linkedin} \@linkedin}\\~{\Large \\~\\}
}
\end{center}
}
% CV SECTION
\newcommand{\cvSection}[1]{
{\textcolor{red}{\texttt{\Huge{\firstLetter#1@}\LARGE{\secondLetter#1@}} \hrulefill}}\\~\\
}
% CV Block with date/time
\newcommand{\CVBlockWithTime}[5]{
\tab \texttt{\Large \textbf{#1}} \hfill \textbf{\large #2}\\
\tab \textbf{#3} \hfill #4\\
\ifthenelse{\isempty{#5}}{\\}{\tab \begin{minipage}{14cm}#5\end{minipage}\\~\\}
}
% CV Text block
\newcommand{\CVTextBlock}[1]{\tab {\large \begin{minipage}{18cm}#1\end{minipage}}\\~\\}