-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_styling.sty
185 lines (154 loc) · 4.78 KB
/
custom_styling.sty
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{TLCresume}[11/19/21 resume package]
\usepackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
% Assuming using "article" document class and letter sized paper.
% FONT STUFF
% \RequirePackage[T1]{fontenc} % Font encoding https://texfaq.org/FAQ-why-inp-font
% % \RequirePackage[default,regular]{sourcesanspro}
% \RequirePackage[10pt]{moresize}
\usepackage{anyfontsize}
\RequirePackage{csquotes}
% % Change the fonts if you want
% \ifxetexorluatex % If you're using XeLaTeX or LuaLaTeX
% \usepackage{fontspec}
% %% You can use \setmainfont etc; I'm just using these font packages here because they provide OpenType fonts for use by XeLaTeX/LuaLaTeX anyway
% \usepackage[p,osf,swashQ]{cochineal}
% \usepackage[medium,bold]{cabin}
% \usepackage[varqu,varl,scale=0.9]{zi4}
% \else % If you're using pdfLaTeX or latex
% \usepackage[T1]{fontenc}
% \usepackage[p,osf,swashQ]{cochineal}
% \usepackage{cabin}
% \usepackage[varqu,varl,scale=0.9]{zi4}
% \fi
% MARGINS AND SPACING
\RequirePackage[margin=.6in, top=.4in, bottom=1.4in]{geometry} % Set Margins
% \usepackage[a4paper, top=1in, bottom=2in]{geometry}
% \raggedright % left align no indent
% \raggedbottom % top align no indent
% COLOR
\RequirePackage{xcolor}
% CHANGE THIS TO YOUR FAV COLOR https://g.co/kgs/aoqdi7
\definecolor{highlight}{RGB}{61, 90, 128}
\definecolor{barely-visible}{RGB}{206, 209, 219}
% BULLET POINTS
\RequirePackage[inline]{enumitem}
\setlength{\tabcolsep}{0in}
% SECTION FORMATTING
\RequirePackage[nostruts]{titlesec}
\titlespacing*{\section}{0em}{.5em}{0em}
\titleformat{\section}{\color{highlight} \raggedright \Large}{}{0em}{}[\vspace{-0.75em}\hrulefill]
% SUBSECTION FORMATTING
\titlespacing*{\subsection}{0em}{0em}{0em}
\titleformat{\subsection}{\bfseries}{}{0em}{}[]
% BOLD COMMAND
\newcommand{\skills}[1]{ {\raggedleft \bfseries #1}}
% funny remark
\newcommand{\funnyRemark}[1]{\scriptsize \color{barely-visible} \texttt{#1}}
% SUBTEXT
\newcommand{\subtext}[1]{\textit{#1}\par}
% tighter spacing than itemize
\setlist[itemize]{align=parleft,left=0pt..1em}
\newenvironment{zitemize}
{\begin{itemize} \vspace{-.6em} \itemsep 0pt \parskip 2pt \parsep 0pt}
{\end{itemize} \vspace{0em}}
\newenvironment{xitemize}
{\begin{itemize} \itemsep .1em \parskip 2pt \parsep 0pt}
{\end{itemize} \vspace{0em}}
% NO PAGE NUMBER
\pagenumbering{arabic}
% SUBFILES IMPORTING
\RequirePackage{standalone}
% FOR TEMPLATE FILLER
\RequirePackage{blindtext}% Filler Text
% \RequirePackage[english]{babel}
\RequirePackage[
bibstyle=authoryear,
maxbibnames=99,
sorting=ymdnt,
uniquename=init,
defernumbers=true,
backend=biber
]{biblatex}
% Added 17 Jan 2018 from https://tex.stackexchange.com/a/140641/226 and https://tex.stackexchange.com/a/46879/226
\DeclareSortingTemplate{ymdnt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{00}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\newcounter{bibitem}
\AtBeginBibliography{\setcounter{bibitem}{1}}
\AtEveryBibitem{\makebox[2.5em][l]{{\thebibitem}\stepcounter{bibitem}}}
\renewcommand{\bibfont}{\small}
\setlength{\bibitemsep}{1.5ex}
\setlength{\bibhang}{2.5em}
\RequirePackage{xpatch}
\xpretofieldformat{doi}
{\textcolor{MarkerColour!80!black}{\scriptsize\faLink}}
{}{}
\xpretofieldformat{url}
{\textcolor{MarkerColour!80!black}{\scriptsize\faLink}}
{}{}
\newcommand{\bibname}[2]{%
\def\@mylastname{#1}%
\def\@myfirstname{#2}%
}
\renewcommand*{\mkbibnamefamily}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartfamily}{\@mylastname}}
and
test {\ifdefstrequal{\namepartgiven}{\@myfirstname}}}
{\textbf{#1}}%
{#1}%
}
\renewcommand*{\mkbibnamegiven}[1]{%
\ifboolexpr{ test {\ifdefstrequal{\namepartfamily}{\@mylastname}}
and
test {\ifdefstrequal{\namepartgiven}{\@myfirstname}}}
{\textbf{#1}}%
{#1}%
}
% LINKS
\RequirePackage[colorlinks=true,allcolors=black,breaklinks=true]{hyperref}
\hypersetup{colorlinks=true,urlcolor=highlight}
% HEADER
\RequirePackage{fancyhdr}
% define date format as ddMMMyyyy
\newdateformat{ddMMMyyyy}{\twodigit\THEDAY-\shortmonthname-\THEYEAR}