forked from runphilrun/resume
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resume.cls
97 lines (85 loc) · 2.62 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
87
88
89
90
91
92
93
94
95
96
97
%% resume.cls
% Resume class file
%
% Philip Linden <[email protected]>
% https://github.com/runphilrun/resume
%
% This file defines the layout and typesetting of document parts.
% This file should not be edited.
%
% LaTeX Project Public License (LPPL) 1.3c
% https://www.latex-project.org/lppl
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{resume}[2018/07/23 v0.1 Resume Class]
% =======
% options
% -------
\DeclareOption*{% inherit options of article
\PassOptionsToClass{\CurrentOption}{article}%
}
% font type options
\DeclareOption{sans}{\AtBeginDocument{\renewcommand{\familydefault}{\sfdefault}}}
\DeclareOption{roman}{\AtBeginDocument{\renewcommand{\familydefault}{\rmdefault}}}
\ExecuteOptions{letterpaper,10pt,final} % execute default options
\ProcessOptions\relax
\LoadClass{article}
% -------
% ========
% packages
% --------
\RequirePackage{titlesec} % customize header styles
\RequirePackage[margin=0.75in]{geometry} % page layout
\RequirePackage[colorlinks=true,urlcolor=blue]{hyperref} % insert hyperlinks
\RequirePackage{fancyhdr} % fancy header and footer
\RequirePackage{lastpage} % reference number of pages in doc
\RequirePackage{enumitem} % fancy lists
\RequirePackage{url} % insert links
\RequirePackage[T1]{fontenc} % T1 font encoding
\RequirePackage{lmodern} % use Latin Modern Sans Serif
\RequirePackage{fontawesome5} % high quality web icons
% --------
% ======
% format
% ------
% PAGE LAYOUT
\pagestyle{fancy}
\setlength\parindent{0em}
\renewcommand{\familydefault}{\sfdefault}
% HEADER
\fancyhead{} % clear header
\renewcommand{\headrulewidth}{0pt}
% name
\def\name#1{\def\@name{#1}}
\name{% default name
Your Name Here
}
\newcommand{\printname}{\@name}
\chead{\bf\Large{\printname}}
% left contact block
\def\lcontact#1{\def\@lcontact{#1}}
\lcontact{% default left contact block
}
\newcommand{\printlcontact}{\@lcontact}
\lhead{\printlcontact}
% right contact block
\def\rcontact#1{\def\@rcontact{#1}}
\rcontact{% default right contact block
}
\newcommand{\printrcontact}{\@rcontact}
\rhead{\printrcontact}
% FOOTER
\fancyfoot{} % clear footer
\renewcommand{\footrulewidth}{0pt}
% \cfoot{\thepage~of~\pageref*{LastPage}}
% SECTION HEADERS
\titleformat{\section} % modify the \section command
{\large\raggedright}{}{0em}{}[\titlerule]
\titlespacing*{\section}{0pt}{0.5em}{0.3em}
\titleformat{\subsection} % modify the \subsection command
{\large\bf\raggedright}{}{0em}{}
\newcommand{\headerwithlabel}[3]{% bold first item, italic second, right align third
\vspace{0.3em}{{\bf #1}~{\it\normalsize #2}\hfill {\it\normalsize#3}} \\
}
% TABLES AND LISTS
\setlist[itemize]{nosep} % kill vertical spacing
\renewcommand{\labelitemi}{-~}