forked from latexstudio/resume-4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresume_cover_letter.cls
72 lines (58 loc) · 2.09 KB
/
resume_cover_letter.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{resume_cover_letter}
\LoadClass[11pt,a4paper,sans]{moderncv}
% Packages
\moderncvtheme[blue]{classic}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{geometry}
\RequirePackage{moderntimeline}
\RequirePackage{multicol}
\RequirePackage{fontawesome}
\moderncvicons{awesome}
\RequirePackage{tikz}
% Languages handling
\RequirePackage{kvoptions}
\SetupKeyvalOptions{%
family=ML,
prefix=ML@,
}
\DeclareStringOption{languages}
\ProcessKeyvalOptions*
\PassOptionsToPackage{\ML@languages}{babel}
\RequirePackage{babel}
% Configure page margins with geometry
\geometry{left=1.5cm, top=0.75cm, right=1.5cm, bottom=1cm, footskip=.5cm}
% Configure column width for timelines
\setlength{\hintscolumnwidth}{2cm}
% Time interval for resume entries
\tlmaxdates{2010}{2018}
% Width of the timeline
\tlwidth{0.8ex}
% Custom fonts for header
\renewcommand{\namefont}{\fontsize{50}{45}\mdseries\upshape}
\renewcommand{\titlefont}{\fontsize{18}{20}\mdseries\upshape}
\renewcommand{\addressfont}{\fontsize{10}{12}\mdseries\itshape}
%%%%%%%%%%% Thick section line %%%%%%%%%%%
% define column thickness
\newlength{\hintscolumnthickness}
\setlength{\hintscolumnthickness}{3pt}
% define column width
\newlength{\sidecolumnwidth}
\RenewDocumentCommand{\section}{sm}{%
% set column width (need to do this because title lenght is different each time)
\setlength{\sidecolumnwidth}{(\linewidth-\widthof{\sectionstyle{#2}}-\separatorcolumnwidth-\separatorcolumnwidth)/2}
\par\addvspace{3mm}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{section}{#2}%
% left
\parbox[t]{\sidecolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\sidecolumnwidth}{\hintscolumnthickness}}}%
% title
\hspace{\separatorcolumnwidth}%
\sectionstyle{#2}%
\hspace{\separatorcolumnwidth}%
% right
\parbox[t]{\sidecolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\sidecolumnwidth}{\hintscolumnthickness}}}%
\par\nobreak\addvspace{2mm}
%\@afterheading % to avoid a pagebreak after the heading
}