Repository navigation
Expand file tree
/
Copy pathmain.tex
More file actions
153 lines (123 loc) · 4.62 KB
/
Copy pathmain.tex
File metadata and controls
153 lines (123 loc) · 4.62 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
%-------------------------------------------
% Resume in LuaLaTeX
% Author: Sheikh Usman Ali
% Build: `make resume` (needs lualatex + latexmk; run from the repo root)
% Data: _data/*.json, printed by dev/lua/parser.lua (pure Lua, no lualibs/luacode needed)
%-------------------------------------------
\documentclass[letterpaper,10pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{ifthen}
\usepackage{needspace}
% Fonts: Type1 + T1 so no fontspec/luaotfload is needed. Alegreya when installed
% (texlive-fonts-extra), else TeX Gyre Pagella. dev/lua/parser.lua maps UTF-8 to T1 macros.
\usepackage[T1]{fontenc}
\IfFileExists{Alegreya.sty}{\usepackage{Alegreya}}{\usepackage{tgpagella}}
\usepackage[hidelinks]{hyperref}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
%-------------------------------------------
\addtolength{\oddsidemargin}{-0.475in}
\addtolength{\evensidemargin}{-0.375in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\urlstyle{same}
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
%-------------------------------------------
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{\Needspace{6\baselineskip}}[\color{black}\titlerule \vspace{-5pt}]
% Custom commands
%-------------------------------------------
\definecolor{light-gray}{gray}{0.3}
% one spacing rule for every list; every list gets the same right margin
\setlist[itemize]{itemsep=2pt,topsep=1pt,parsep=0pt,partopsep=0pt}
\newcommand{\resumeItem}[3]{
\item{
\textbf{#1}\ifthenelse{\equal{#3}{}}{}{ \textcolor{light-gray}{\scriptsize\texttt{#3}}}{: \small #2}
}
}
\newcommand{\resumePlainItem}[1]{\item{\small #1}}
\newcommand{\resumePubItem}[3]{\item{\small #1. \textbf{#2}. #3}}
% entry headers keep together with their first line: never a header alone at a page end
\newcommand{\resumeEduEntry}[4]{
\Needspace{4\baselineskip}\item
\begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small\textcolor{light-gray}{#3}} & \textit{\small\textcolor{light-gray}{#4}} \\
\end{tabular*}\vspace{-3pt}
}
\newcommand{\resumeExpEntry}[5]{
\Needspace{6\baselineskip}\item
\begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small\textcolor{light-gray}{#3 $\cdot$ #4}} & \textit{\small\textcolor{light-gray}{#5}} \\
\end{tabular*}\vspace{-3pt}
}
\newcommand{\resumeSubItem}[3]{\resumeItem{#1}{#2}{#3}}
\renewcommand{\labelitemii}{$\circ$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*,rightmargin=10pt,label={},itemsep=5pt]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}}
\begin{document}
% Load the Lua data printer
%-------------------------------------------
\directlua{dofile("dev/lua/parser.lua")}
% Print Heading
%-------------------------------------------
\directlua{printHeading("_data/personal.json")}
% Print Education
%-------------------------------------------
\section{Education}
\resumeSubHeadingListStart
\directlua{printEduItems("_data/edu.json")}
\resumeSubHeadingListEnd
% Print Experience
%-------------------------------------------
\section{Experience}
\resumeSubHeadingListStart
\directlua{printExpItems("_data/exp.json")}
\resumeSubHeadingListEnd
% Print Publications
%-------------------------------------------
\section{Publications}
\resumeSubHeadingListStart
\directlua{printPubItems("_data/pubs.json", "_data/personal.json")}
\resumeSubHeadingListEnd
% Print Projects
%-------------------------------------------
\section{\href{https://github.com/usmandroid}{Projects}}
\resumeSubHeadingListStart
\directlua{printProjItems("_data/proj.json")}
\resumeSubHeadingListEnd
% Print Skills
%-------------------------------------------
\section{Technical Skills}
\resumeSubHeadingListStart
\directlua{printSkillGroups("_data/personal.json")}
\resumeSubHeadingListEnd
% Print Certificates and Languages
%-------------------------------------------
\section{Certificates}
\resumeSubHeadingListStart
\directlua{printCertItems("_data/personal.json")}
\resumeSubHeadingListEnd
\section{Languages}
\resumeSubHeadingListStart
\resumePlainItem{\directlua{printSpoken("_data/personal.json")}}
\resumeSubHeadingListEnd
\end{document}