forked from ttzztztz/uniquecv
-
Notifications
You must be signed in to change notification settings - Fork 4
/
uniquecv.cls
100 lines (78 loc) · 2.24 KB
/
uniquecv.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
% use default configure of article
\LoadClass{article}
% package name
\ProvidesClass{uniquecv}
% Chinese support
\RequirePackage{ctex}
% customize section/subsection title
\RequirePackage{titlesec}
% define some colors
\RequirePackage{color}
% customize sep of items
\RequirePackage{enumitem}
\setitemize[1]{
itemsep=0.3ex, % space between item
partopsep=0.0ex, %
parsep=\parskip,
topsep=0.3ex % space before text
}
% set margin
\RequirePackage[
a4paper,
left=0.8in,
right=0.8in,
top=0.70in,
bottom=0.55in,
nohead
]{geometry}
% do not need indent in resume
\setlength\parindent{0pt}
% disable the page number
\pagenumbering{gobble}
% ----------------------------------------------------------------------------- %
% name of candidate
\newcommand{\name}[1]{
\centerline{\Huge{#1}} % in the center & Huge font size
}
% basic information under the name
\newcommand{\basicinfo}[1]{
\centerline{\sffamily\large{#1}}
}
% define color gray for date
\definecolor{gray}{rgb}{.5,0.5,0.5}
% define color blue for section title
\definecolor{cvblue}{rgb}{.22,0.45,0.75}
% ----------------------------------------------------------------------------- %
\titleformat{\section}
% format: to be applied to the whole title -- label and text
{\color{cvblue}\Large\bf\raggedright}
% label: prefix the title body
{}
% sep: space between label and title body
{0em}
% before: code preceding the title body
{}
% after: code following the title body
% insert a horizontal line after the heading
[\titlerule]
% adjust the vertical space before and after the heading
\titlespacing*{\section}{0cm}{*1.6}{*1.2}
% similar above
\titleformat{\subsection}
{\normalsize\raggedright}
{}{0em}{}
\titlespacing*{\subsection}{0cm}{*1.6}{0.0ex}
% ----------------------------------------------------------------------------- %
\newcommand{\dateditem}[2]{
% set the date text gray
\subsection[#1]{#1 \hfill \textcolor{gray}{#2}}
}
\newcommand{\datedaward}[3]{
% use the box to align text#2,
% set text#1, text#2 bf
\subsection[#1]{\makebox[13em][l]{\textbf{#1}} ~ \textbf{#2} \hfill \textcolor{gray}{#3}}%
}
% same as \datedaward
\newcommand{\datedproject}[3]{
\subsection[#1]{\makebox[13em][l]{\textbf{#1}} ~ \textbf{#2} \hfill \textcolor{gray}{#3}}%
}