-
Notifications
You must be signed in to change notification settings - Fork 1
/
cv.cls
82 lines (76 loc) · 1.76 KB
/
cv.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cv}[6/6/2013 custom CV class]
\LoadClass{article}
\RequirePackage{titlesec}
\usepackage{array}
\titleformat{\section} % Customise the \section command
{\Large\scshape\raggedright} % Make the \section headers large (\Large),
% small capitals (\scshape) and left aligned (\raggedright)
{}{0em} % Can be used to give a prefix to all sections, like 'Section ...'
{} % Can be used to insert code before the heading
[\titlerule] % Inserts a horizontal line after the heading
\titleformat{\subsection}
{\large\scshape\raggedright}
{}{0em}
{}
\newcommand{\datedsection}[2]{
\section[#1]{#1 \hfill #2}
}
\newcommand{\datedtitledsubsection}[3]{
\subsection[#1]{\textbf{#1} --- #2 \hfill #3}
}
\newcommand{\datedsubsection}[2]{
\subsection[#1]{#1 \hfill #2}
}
\newcommand{\name}[1]{
\centerline{\Huge{#1}}
}
\newcommand{\contact}[6]{
\ifx&
\else
\vspace*{5.75pt}
\centerline{\huge{#1}}
\fi
\vspace{5mm}
\begin{minipage}{0.45\linewidth}
\ifx&
\else
#2
\fi
\ifx&
\else
\ifx& %if there was a first line, add a return
\else
\\
\fi
#3
\fi
\ifx&
\else
\ifx& % if there was no previous argument,
\ifx& % add a new line
\else
\\
\fi
\else
\\
\fi
#4
\fi
\end{minipage}
\begin{minipage}{0.45\linewidth}
\begin{tabular}{ll}
\ifx&
\else
& \href{mailto:#5}{\tt #5} \\
\fi
\ifx&
\else
& #6
\fi
\end{tabular}
\end{minipage}
}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.8\textwidth}}
\newcommand\VRule{\vrule width 0.5pt}