-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresume.cls
86 lines (71 loc) · 1.85 KB
/
resume.cls
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{resume}
\LoadClassWithOptions{article}
\renewcommand*{\familydefault}{\sfdefault}
\pagestyle{empty}
\RequirePackage{fontawesome}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{bookmark}
\RequirePackage[en-US]{datetime2}
\DTMlangsetup*{abbr, showdayofmonth=false}
% Spacing
\RequirePackage[scale = 0.9]{geometry}
\RequirePackage{calc}
% vertical
\RequirePackage{enumitem}
\setlist{nosep}
\setlist[1]{after=\endgraf\vspace*{1ex}}
% horizontal
\setlength\parindent{0em}
\newcommand*{\sidbarwidth}{9em}
% Section
\RequirePackage{titlesec}
\titleformat{\section}
{\Large\bfseries\uppercase}
{}{}
{\vspace*{-1ex}}
[\vspace*{-2ex}\rule{\columnwidth}{1pt}\vspace*{-2ex}]
% Commands
\newcommand*{\organization}[2]{
{\bfseries {\large #1} \hfill #2}
}
\newcommand*{\degree}[3]{
#1 in #2, #3
}
\newcommand*{\experience}[4]{
\textit{#1}
\hfill
\DTMDate{#2} -- \ifstrempty{#3}{Present}{\DTMDate{#3}}
\ifstrempty{#4}{}{
\begin{minipage}[t]{\columnwidth - \sidbarwidth}
#4
\end{minipage}
}
}
\newcommand*{\uhref}[2]{
\href{#1}{\underline{\smash{#2}}}
}
% Header
\newcommand*{\@newstorage}[1]{
\@namedef{#1}##1{\@namedef{@#1}{##1}}
\@nameuse{#1}{#1\ClassWarning{resume}{No #1 given}}
}
\@newstorage{name}
\@newstorage{phone}
\@newstorage{email}
\@newstorage{github}
\@newstorage{linkedin}
\renewcommand*{\maketitle}{
\begin{center}
{\Huge\bfseries\@name}
\vspace{1ex}
{\small
\begin{tabular}{l l}
\faPhone \uhref{tel:\@phone}{\@phone} &
\faEnvelope \uhref{mailto:\@email}{\@email} \\
\faGithub \uhref{https://github.com/\@github}{\@github} &
\faLinkedin \uhref{https://www.linkedin.com/in/\@linkedin}{\@linkedin} \\
\end{tabular}
}
\end{center}
}