-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.tex
157 lines (137 loc) · 4.8 KB
/
template.tex
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
% SPDX-FileCopyrightText: 2019 Harish Rajagopal <harish.rajagopals@gmail.com>
%
% SPDX-License-Identifier: GPL-3.0-or-later
%chktex-file 15
\documentclass[10pt, a4paper]{article}
\usepackage[margin=8mm]{geometry} % for setting page margins
\usepackage{xcolor,colortbl} % for setting colours
\usepackage[pdfusetitle]{hyperref} % control hyperlink formatting and auto-add PDF metadata
\usepackage{titlesec} % for changing section styling
\usepackage{fontawesome5} % for icons like GitHub, email, mobile, etc.
\usepackage{tabulary} % for custom columns having auto width
\usepackage{etoolbox} % for patching tabulary and for if-else
\usepackage{booktabs} % for good-looking table lines
\usepackage{enumitem} % for changing indentation of itemize
\usepackage{multicol} % for two-column layout
\usepackage{graphicx,multirow} % for setting and aligning the photo within the header
\usepackage{fontspec} % for changing the default font
% Use the TeX Gyre Pagella font, similar to Palatino
\setmainfont{TeX Gyre Pagella}
% Define colours
\definecolor{accent}{HTML}{888888}
\definecolor{headings}{HTML}{000000}
\definecolor{text}{HTML}{444444}
\definecolor{misc}{HTML}{888888}
\definecolor{background}{HTML}{ffffff}
% Custom command for headings
\newcommand{\heading}[1]{\textcolor{headings}{\textbf{#1}}}
% Set global colours
\color{text}
\pagecolor{background}
% Patch for tabulary to have fixed width tables:
% https://tex.stackexchange.com/a/87111/147074
\makeatletter
\patchcmd\TY@checkmin%
{\def\TY@ratio{1}}
{%
\@tempdima\dimexpr\p@*\TY@linewidth/\TY@tablewidth\relax
\edef\TY@ratio{\strip@pt\@tempdima}%
}{}{}
\let\TY@@checkmin\TY@checkmin%
\makeatother
% Switch to etoolbox from pure LaTeX because the latter sucks
\newtoggle{onepage}
\ifonepage%
\toggletrue{onepage}
\else
\togglefalse{onepage}
\fi
% Custom styling for section
\titleformat{\section}{\Large\scshape\color{headings}}{\thesection}{2mm}{\vspace{-2mm}}[\vspace{-4mm}\hrulefill\vspace{-2mm}]
% Custom styling for itemize
\setlist[itemize,1]{leftmargin=0mm,label={}}
\setlist[itemize,2]{label={\footnotesize\textbullet}}
% Custom environment to be used for a single project, internship, etc.
% First argument is an OPTIONAL link
% Second argument is the name of the project
% Third argument is the date/duration
% Fourth argument is the name of the mentor(s)
\newenvironment{project}[4][] % optional link is by default empty
{
\iftoggle{onepage}
{
\href{#1}{\heading{#2}}\\
\textcolor{misc}{\textit{\small #4\hfill#3}}\\[-6mm]
\begin{itemize}[itemsep=0mm]
}
{
\heading{#2} \hfill{\small #3}\\
\textcolor{misc}{\textit{\small #4 \hfill\href{#1}{#1}}}\par
\begin{itemize}
}
}
{
\end{itemize}
}
% Custom command to be used for an empty listing for a single project, internship, etc.
% First argument is an OPTIONAL link
% Second argument is the name of the project
% Third argument is the date/duration
% Fourth argument is the name of the mentor(s)
\newcommand{\emptyproject}[4][] % optional link is by default empty
{%
\iftoggle{onepage}
{
\href{#1}{\heading{#2}}\\
\textcolor{misc}{\textit{\small #4\hfill#3}}\par
}
{
\heading{#2} \hfill{\small #3}\\
\textcolor{misc}{\textit{\small #4\hfill\href{#1}{#1}}}\par
}
}
% Custom command which uses the `project` environment in full mode, and `\emptyproject` in single-page mode.
% The first four arguments are the same as `project` and `\emptyproject`.
% The fifth argument is the body.
\newcommand{\slimproject}[5][]
{
\iftoggle{onepage}
{\emptyproject[#1]{#2}{#3}{#4}}
{
\begin{project}[#1]{#2}{#3}{#4}
#5
\end{project}
}
}
% Custom command to display its contents only in certain modes (full/single-page)
\newcommand{\iffull}[1]{\iftoggle{onepage}{}{#1}}
\newcommand{\ifsingle}[1]{\iftoggle{onepage}{#1}{}}
% Miscellaneous options
\hypersetup{%
colorlinks=true, % do not draw boxes around links, color the links themselves
urlcolor=accent,
pdfsubject={Resume},
pdfkeywords={resume, cv}
}
\pagenumbering{gobble} % hide page numbering
\setlength\extrarowheight{3pt} % add more vertical space for rows
\iftoggle{onepage}
{
\setlength{\columnsep}{8mm} % set separation between the two columns
\setitemize{leftmargin=5mm} % changing indentation for itemize
}{}
\title{R. Harish --- Resume}
\author{Harish Rajagopal}
\begin{document}
\input{sections/header.tex}
\input{sections/education.tex}
\ifsingle{\vspace{2mm}\begin{multicols}{2}}
\input{sections/relevant_experience.tex}
\input{sections/other_experience.tex}
\input{sections/skills.tex}
\input{sections/achievements.tex}
\input{sections/projects.tex}
\iffull{\input{sections/courses.tex}}
\input{sections/hobbies.tex}
\ifsingle{\end{multicols}}
\end{document}