-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.cls
More file actions
165 lines (140 loc) · 5.46 KB
/
template.cls
File metadata and controls
165 lines (140 loc) · 5.46 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
% Created by Murat Can Karacabey
% this is inspired by Michael Pollind's Awesome CV
% Created from scratch as a much simpler alternative to it to actually learn LaTeX.
% Might be interpreted as an easier-to-edit or easier-to-understand-what-is-going-on version of it.
\author{Murat Can Karacabey}
\RequirePackage[dvipsnames]{xcolor} % moved here I guess article class causes option clash with xcolor if used after loading the class
\LoadClass[11pt]{article}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{template}[2020/04/15 Muratcan CV Class]
\RequirePackage[sfdefault]{noto}
\RequirePackage{etoolbox}
\RequirePackage{pgffor}
\RequirePackage{titlesec}
\RequirePackage{tikz}
\RequirePackage{fontspec}
\RequirePackage{graphicx}
\RequirePackage[left=0.5in,top=0.1in,right=0.5in,bottom=0.1in]{geometry} % DOCUMENT MARGINS
\RequirePackage{hyperref}
\RequirePackage{hyperxmp}
\RequirePackage{fontawesome}
\RequirePackage{mfirstuc}
\RequirePackage{ifthen}
\RequirePackage{lipsum}
\RequirePackage{array}
\pagestyle{empty}
\usepackage{comment}
%Setup
\newcommand*{\setname}[2]{\def\@firstname{#1}\def\@lastname{#2}}
\newcommand*{\setaddress}[1]{\def\@address{#1}}
\newcommand*{\setmobile}[1]{\def\@mobile{#1}}
\newcommand*{\setposition}[1]{\def\@position{#1}}
\newcommand*{\setmail}[1]{\def\@mail{#1}}
\newcommand*{\setbirthday}[1]{\def\@birthday{#1}}
\newcommand*{\setcitizenship}[1]{\def\@citizenship{#1}}
\newcommand*{\setthemecolor}[1]{\def\@themecolor{#1}}
\newcommand*{\setlinkedinaccount}[1]{\def\@linkedinaccount{#1}}
\newcommand*{\setprojects}[1]{\def\@projects{#1}}
\newcommand*{\sethomepage}[1]{\def\@homepage{#1}}
\newcommand*{\setgithubaccount}[1]{\def\@githubaccount{#1}}
\newcommand*{\setprofilepic}[1]{\def\@profilepic{#1}}
\newcommand*{\setprofilepicsize}[1]{\def\@profilepicsize{#1}}
\providecommand*{\@birthday}{}
\providecommand*{\@profilepic}{}
\providecommand*{\@profilepicsize}{2.5cm}
\hypersetup{
colorlinks=true,
urlcolor=NavyBlue, % URL COLOR!
}
% Header
\newcommand\headerview{%
\ifstrempty{\@profilepic}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north east,inner sep=0pt] at ([xshift=-0.5in,yshift=-0.1in]current page.north east) {%
\includegraphics[width=\@profilepicsize]{\@profilepic}%
};
\end{tikzpicture}%
}%
\noindent%
\hbox to \linewidth{%
\hfill%
\begin{minipage}[t]{0.55\linewidth} % extend header length here
\vspace{0pt}%
\centering \name\par\vspace{0.05cm}
\contact % address \ mobile \\ mail
\end{minipage}%
\hfill%
}%
\par%
}
\newcommand{\homepageview}{\href{\@homepage}{\faHome\ \footnotesize Homepage}}
\newcommand{\githubview}{\href{\@githubaccount}{\faGithubSquare\ \footnotesize GitHub}}
\newcommand{\linkedinview}{\href{\@linkedinaccount}{\faLinkedinSquare\ \footnotesize LinkedIn}}
\newcommand{\projectsview}{\href{\@projects}{\faCode\ \footnotesize Projects}}
\newcommand{\projectslinkicon}{\href{\@projects}{{\normalsize\textcolor{NavyBlue}{{\normalfont\mdseries\upshape\raisebox{0.15ex}{\faLink}}}}}}
\newcommand{\birthdayview}{{\normalsize \color{black!60}\@birthday}}
\newcommand{\name}{%
{\LARGE \color{\@themecolor} \@firstname \ \textsc{\@lastname}}%
\ifstrempty{\@birthday}{}{\\[0.1cm] \birthdayview}%
}
\newcommand{\contact}{%
{\small \@mail%
\sbox0{\@mobile}%
\ifdim\wd0=0pt\else \cpshalf \@mobile \fi%
\\%
\homepageview \cpshalf \linkedinview \cpshalf \projectsview \cpshalf \githubview%
} %
}
% Helper commands
\newcommand\ruleafter[1]{#1~{\color{black!60!\@themecolor}\hrulefill}} % a trick to put the line with <before> parameter in \titleformat
%colorful pipe separator
\newcommand{\cps}{{\color{\@themecolor} \quad\textbar\quad}}
\newcommand{\cpshalf}{{\color{\@themecolor} \textbar\hspace{0.2em}}}
\newcommand{\coloredbullet}{{\color{\@themecolor} \textbullet}}
% Edit section styles
\titleformat{\section} % Customise the \section command
{\large\bfseries\scshape\raggedright\color{\@themecolor}} % 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 ...'
{\ruleafter} % Can be used to insert code before the heading
\titlespacing*{\section}{-1pt}{-10pt}{0pt}
% Textview commands
\newcommand{\experience}[2]{%
\mbox { \hspace{1em} \scshape \textbf{#1} }%
}
\newcommand{\datetext}[1]{%
{\itshape \footnotesize \mdseries \color{black} #1 }
}
\newcommand{\datetextbold}[1]{%
{\footnotesize \mdseries \color{black} \textbf{#1} }
}
\newcommand{\datedexperience}[2]{%
\begin{small} \mbox { \hspace{1em} \textbf{#1} } \end{small} \hfill \datetextbold{#2}\\[0.01cm] %
}
\newcommand{\explanation}[2]{%
\mbox { \hspace{1.2em} \footnotesize \emph{#1}} \hfill \datetext{#2}\\[0.01cm] %
}
\newcommand{\explanationdetail}[1]{%
\indent \begin{minipage}{0.87\linewidth} \footnotesize #1 \end{minipage} \\[0.1cm]
}
\newcommand\createskill[2]{%
\textbf{#1} & #2
}
\newcommand\createskills[1]{%
\explanationdetail{
\begin{tabular}{rl}
\makeatletter
\@for\thisitem:=#1\do{\thisitem\\[0.1cm]}
\makeatother
\end{tabular}
}
}
\usepackage{catchfile}
\newcommand{\getenv}[2][]{%
\CatchFileEdef{\temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\temp\else\let#1\temp\fi}
\getenv[\PHONE]{PHONE_NUMBER}
% \usepackage{stringstrings} % removed dependency
\newcommand{\getPhone}{%
\ifdefempty{\PHONE}{}{Phone: \PHONE}%
}