-
Notifications
You must be signed in to change notification settings - Fork 1
/
mymacros.tex
293 lines (249 loc) · 8.51 KB
/
mymacros.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
%--------------------------------%
% Author : Gajanan Choudhary %
% License : MIT %
% About file : LaTeX Resume %
%--------------------------------%
%----------------------------------------------%
% Edit the following -- Put your details below %
%----------------------------------------------%
\def\Author{Gajanan Choudhary}
\def\AuthorEmail{gajananchoudhary91@gmail.com}
\def\AuthorAddress{Austin, TX, USA}
\def\AuthorPhoneText{\smallplus{}1 (512) 657-3030}
\def\AuthorPhoneLink{tel:15126573030}
% You need to escape special characters in website link.
% See: https://stackoverflow.com/questions/2894710/how-to-write-urls-in-latex
\def\AuthorWebsiteText{https://gajanan-choudhary.github.io/}
\def\AuthorWebsiteLink{https://gajanan-choudhary.github.io/}
%%%----------------------------------------------------------%%%
%%%----------------------------------------------------------%%%
%%% Most likely, you will not need to edit things below this %%%
%%%----------------------------------------------------------%%%
%%%----------------------------------------------------------%%%
%------------------%
% Utility commands %
%------------------%
%---------------------%
% Use sans-serif font %
%---------------------%
%\renewcommand{\familydefault}{\sfdefault}
%--------------%
% Line spacing %
%--------------%
\linespread{1.2}
%-------%
% Dates %
%-------%
\newcommand{\dates}[2]{#1 -- #2}
%---------------------------%
% For underlining hyperlink %
%---------------------------%
\renewcommand{\ULdepth}{1.8pt}
\contourlength{0.8pt}
\newcommand{\myuline}[1]{%
\uline{\phantom{#1}}%
\llap{\contour{white}{#1}}%
}
%-----------%
% Wordcloud %
%-----------%
\definecolor{uto}{RGB}{191, 87, 0}
\definecolor{utg}{RGB}{51, 63, 72}
% The following is needed for properly scaling text in the wordcloud. See:
% https://tex.stackexchange.com/questions/328228/appearance-of-tiny-or-scriptsize-fontsize-in-latex-horizontal-stretch/328237
%%% TEXT FONT FIX
\rmfamily
\DeclareFontShape{T1}{lmr}{bx}{sc}{<-> cmr10}{}% USE BOLD SCSHAPE NOT OTHERWISE DEFINED
%%% MATH FONT FIX
\DeclareFontFamily{OML}{zlmm}{}
\DeclareFontShape{OML}{zlmm}{m}{it}{<-> lmmi10}{}
\DeclareFontShape{OML}{zlmm}{b}{it}{<->ssub * zlmm/m/it}{}
\DeclareFontShape{OML}{zlmm}{bx}{it}{<->ssub * zlmm/m/it}{}
\DeclareMathVersion{Tinyb}
\SetSymbolFont{operators}{Tinyb}{T1}{lmr}{bx}{sc}
\SetSymbolFont{letters}{Tinyb}{OML}{zlmm}{m}{it}
%%%
\newenvironment{tinyb}{\bgroup\tiny\bfseries\scshape\mathversion{Tinyb}}{\egroup} % edit: now with \tiny included
%---------------%
% Writing "C++" %
%---------------%
% See: https://tex.stackexchange.com/questions/4302/prettiest-way-to-typeset-c-cplusplus
\def\CC{{C\nolinebreak[4]\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}}
% Needed for wordcloud:
\def\bigCC{{C\nolinebreak[4]\hspace{-.05em}\raisebox{.4ex}{\normalsize\bf ++}}}
%---------------------%
% Writing smaller "+" %
%---------------------%
\def\smallplus{\nolinebreak[2]\raisebox{.4ex}{\tiny\bf +}}
%---------------------------------------------------------------------------%
% Utility commands -- Borrowed from (MIT licensed) github.com/sb2nov/resume %
% Note: I have modified a few things after borrowing. %
%---------------------------------------------------------------------------%
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.25in}
\addtolength{\evensidemargin}{-0.25in}
\addtolength{\textwidth}{0.5in}
\addtolength{\topmargin}{-0.15in}
\addtolength{\textheight}{0.5in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
%---------------------------------------------------------------------------%
% Sections formatting
\titleformat{\section}{
\vspace{-19pt}\scshape\raggedright\large
}{}{0em}{\vspace{-4pt}\color{gray}\titlerule[0.5pt]\color{black}\\}[\vspace{-6pt}]
%}{}{0em}{\color{gray}\rule{\linewidth}{0.5pt}\color{black}\\}[\vspace{-6pt}]
%---------------------------------------------------------------------------%
%---- gkc Modifying ----%
%\newcommand{\resumeSubheading}[4]{ % Original
\newcommand{\resumeSubheading}[2]{
\vspace{-4pt}\item
\begin{tabularx}{\linewidth}[t]{Xr}
\textbf{#1} & #2 \\
\end{tabularx}\vspace{-13pt}
}
\newcommand{\resumeSubSubheading}[2]{
\vspace{-3pt}
\begin{tabularx}{\linewidth}{Xr}
#1 & #2 \\
\end{tabularx}\vspace{-13pt}
}
%---------------------------------------------------------------------------%
\newcommand{\resumeItem}[2]{
\item{
{\textit{#1}}{: #2 \vspace{-2.5pt}}
}
}
\newcommand{\resumeSubItem}[2]{
\item{
\textbf{#1}{: #2 \vspace{-7pt}}
% \textbf{#1}{: #2 \vspace{-9pt}} % Use this if 11pt article
}
}
\newcommand{\resumeUnlabeledItem}[1]{\item{{#1 \vspace{-2.5pt}}}}
%\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}}
%---------------------------------------------------------------------------%
% Bullet size and type
\renewcommand{\labelitemi}{\raisebox{1pt}{\footnotesize{$\bullet$}}}
\renewcommand{\labelitemii}{\raisebox{1pt}{\footnotesize{$\circ$}}}
%---------------------------------------------------------------------------%
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=0.225in]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}\vspace{-3pt}}
%---------------------------------------------------------------------------%
\newcommand{\resumeSubItemListStart}{\vspace{-2pt}\begin{itemize}[leftmargin=0.225in]}
\newcommand{\resumeSubItemListEnd}{\end{itemize}\vspace{2pt}}
%---------------------------------------------------------------------------%
\newcommand{\resumeItemListStart}{\vspace{-7pt}\begin{itemize}[leftmargin=0.225in]}
\newcommand{\resumeItemListEnd}{\end{itemize}}
%---------------------------------------------------------------------------%
% Borrowed from:
% https://github.com/btskinner/tex_cv
% If you want to go the partially manual route, look at another repo:
% https://github.com/rgeirhos/academic-cv-publications
% ------------------------%
% BibLaTeX sorting scheme %
% ------------------------%
% Create a new sorting scheme that will sort in reverse chronological
% order, taking months into account correctly (i.e., in chronological
% order and not alphabetical order)
\DeclareSortingScheme{ydmdnt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field{sortyear}
\field{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{99}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{99}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
}
\sort[direction=descending]{
\field[padside=left,padwidth=4,padchar=0]{volume}
\literal{9999}
}
}
%------------------%
% BibLaTeX options %
%------------------%
% language mapping
\DeclareLanguageMapping{american}{american-apa}
% ignore addendum and note fields that are sometimes useful, but not here
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldset=addendum, null]
\step[fieldset=note, null]
}
}
}
% macro so titles are converted to doi, url, or isbn link (if available)
% h\t https://tex.stackexchange.com/a/48409
\ExecuteBibliographyOptions{doi=false,url=false,isbn=false}
\newbibmacro{string+doiurlisbn}[1]{%
\iffieldundef{doi}{%
\iffieldundef{url}{%
\iffieldundef{isbn}{%
\iffieldundef{issn}{%
#1%
}{%
\href{http://books.google.com/books?vid=ISSN\thefield{issn}}{#1}%
}%
}{%
\href{http://books.google.com/books?vid=ISBN\thefield{isbn}}{#1}%
}%
}{%
\href{\thefield{url}}{#1}%
}%
}{%
\href{http://dx.doi.org/\thefield{doi}}{#1}%
}%
}
\DeclareFieldFormat{title}{\usebibmacro{string+doiurlisbn}{\mkbibemph{#1}}}
\DeclareFieldFormat[article,incollection]{title}%
{\usebibmacro{string+doiurlisbn}{\mkbibquote{#1}}}
% no letter for same year entries
\defbibenvironment{mybib}
{\list
{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\clearfield{extradate}\item}
% filter by year (only print those after year value in \recentyear
% macro above)
\defbibcheck{recent}{
\iffieldint{year}
{\ifnumless{\thefield{year}}{\recentyear}
{\skipentry}
{}}
{\skipentry}
}