| 1 |
% !TEX TS-program = xelatex |
| 2 |
% !TEX encoding = UTF-8 Unicode |
| 3 |
% -*- coding: UTF-8; -*- |
| 4 |
% vim: set fenc=utf-8 |
| 5 |
|
| 6 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 7 |
%% simpleresumecv.cls |
| 8 |
%% <https://github.com/zachscrivena/simple-resume-cv> |
| 9 |
%% This is free and unencumbered software released into the |
| 10 |
%% public domain; see <http://unlicense.org> for details. |
| 11 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 12 |
|
| 13 |
\NeedsTeXFormat{LaTeX2e} |
| 14 |
|
| 15 |
\ProvidesClass{simpleresumecv}[2016/12/25 Simple Resume CV https://github.com/zachscrivena/simple-resume-cv] |
| 16 |
|
| 17 |
\DeclareOption{a4paper}{\PassOptionsToClass{\CurrentOption}{article}} |
| 18 |
\DeclareOption{letterpaper}{\PassOptionsToClass{\CurrentOption}{article}} |
| 19 |
|
| 20 |
% Run in non-stop mode. |
| 21 |
\DeclareOption{nonstopmode}{\nonstopmode} |
| 22 |
|
| 23 |
% Draft mode. |
| 24 |
\newcommand{\TypesetInDraftMode}{0} |
| 25 |
\DeclareOption{draftmode}{\renewcommand{\TypesetInDraftMode}{1}} |
| 26 |
|
| 27 |
% Datestamp format (default): {yyyy}{MM}{dd} ---> MMM yyyy (e.g., Jan 2008). |
| 28 |
\newcommand{\DatestampYMD}[3]{\mbox{\ShortMonth{#2} #1}} |
| 29 |
\newcommand{\DatestampYM}[2]{\mbox{\ShortMonth{#2} #1}} |
| 30 |
\newcommand{\DatestampY}[1]{#1} |
| 31 |
\DeclareOption{MMMyyyy}{} % default |
| 32 |
|
| 33 |
% Datestamp format: {yyyy}{MM}{dd} ---> dd MMM yyyy (e.g., 15 Jan 2008). |
| 34 |
\DeclareOption{ddMMMyyyy}{% |
| 35 |
\renewcommand{\DatestampYMD}[3]{\mbox{#3 \ShortMonth{#2} #1}} |
| 36 |
\renewcommand{\DatestampYM}[2]{\mbox{\ShortMonth{#2} #1}} |
| 37 |
\renewcommand{\DatestampY}[1]{#1}} |
| 38 |
|
| 39 |
% Datestamp format: {yyyy}{MM}{dd} ---> MMMM yyyy (e.g., January 2008). |
| 40 |
\DeclareOption{MMMMyyyy}{% |
| 41 |
\renewcommand{\DatestampYMD}[3]{\mbox{\LongMonth{#2} #1}} |
| 42 |
\renewcommand{\DatestampYM}[2]{\mbox{\LongMonth{#2} #1}} |
| 43 |
\renewcommand{\DatestampY}[1]{#1}} |
| 44 |
|
| 45 |
% Datestamp format: {yyyy}{MM}{dd} ---> dd MMMM yyyy (e.g., 15 January 2008). |
| 46 |
\DeclareOption{ddMMMMyyyy}{% |
| 47 |
\renewcommand{\DatestampYMD}[3]{\mbox{#3 \LongMonth{#2} #1}} |
| 48 |
\renewcommand{\DatestampYM}[2]{\mbox{\LongMonth{#2} #1}} |
| 49 |
\renewcommand{\DatestampY}[1]{#1}} |
| 50 |
|
| 51 |
% Datestamp format: {yyyy}{MM}{dd} ---> yyyy-MM-dd (e.g., 2008-01-15). |
| 52 |
\DeclareOption{yyyyMMdd}{% |
| 53 |
\renewcommand{\DatestampYMD}[3]{\mbox{#1-#2-#3}} |
| 54 |
\renewcommand{\DatestampYM}[2]{\mbox{#1-#2}} |
| 55 |
\renewcommand{\DatestampY}[1]{#1}} |
| 56 |
|
| 57 |
% Datestamp format: {yyyy}{MM}{dd} ---> yyyy-MM (e.g., 2008-01). |
| 58 |
\DeclareOption{yyyyMM}{% |
| 59 |
\renewcommand{\DatestampYMD}[3]{\mbox{#1-#2}} |
| 60 |
\renewcommand{\DatestampYM}[2]{\mbox{#1-#2}} |
| 61 |
\renewcommand{\DatestampY}[1]{#1}} |
| 62 |
|
| 63 |
% Datestamp format: {yyyy}{MM}{dd} ---> yyyy (e.g., 2008). |
| 64 |
\DeclareOption{yyyy}{% |
| 65 |
\renewcommand{\DatestampYMD}[3]{#1} |
| 66 |
\renewcommand{\DatestampYM}[2]{#1} |
| 67 |
\renewcommand{\DatestampY}[1]{#1}} |
| 68 |
|
| 69 |
\ProcessOptions\relax |
| 70 |
|
| 71 |
% Use article class as the base class. |
| 72 |
\LoadClass[10pt,oneside]{article} |
| 73 |
|
| 74 |
% Geometry package for page margins. |
| 75 |
\RequirePackage[ |
| 76 |
left=0.70in, |
| 77 |
right=0.70in, |
| 78 |
top=0.60in, |
| 79 |
bottom=0.45in, |
| 80 |
nohead, |
| 81 |
includefoot]{geometry} |
| 82 |
|
| 83 |
% PDF settings and properties. |
| 84 |
\RequirePackage{hyperref} |
| 85 |
|
| 86 |
% Hyphenation: Disabled. |
| 87 |
\RequirePackage[none]{hyphenat} |
| 88 |
|
| 89 |
% Colors. |
| 90 |
\RequirePackage[usenames]{color} |
| 91 |
% \definecolor{MyDarkBlue}{RGB}{0,90,160} |
| 92 |
% {\color{MyDarkBlue}This text is dark blue} |
| 93 |
|
| 94 |
% Current date and time. |
| 95 |
\RequirePackage{datetime2} |
| 96 |
|
| 97 |
% Timestamp. |
| 98 |
\newcommand{\Timestamp}{{\DTMnow}} |
| 99 |
|
| 100 |
% Abbreviations for months. |
| 101 |
\newcommand{\LongMonth}[1]{% |
| 102 |
\ifcase#1\relax |
| 103 |
\or January% |
| 104 |
\or February% |
| 105 |
\or March% |
| 106 |
\or April% |
| 107 |
\or May% |
| 108 |
\or June% |
| 109 |
\or July% |
| 110 |
\or August% |
| 111 |
\or September% |
| 112 |
\or October% |
| 113 |
\or November% |
| 114 |
\or December% |
| 115 |
\fi} |
| 116 |
\newcommand{\ShortMonth}[1]{% |
| 117 |
\ifcase#1\relax |
| 118 |
\or Jan% |
| 119 |
\or Feb% |
| 120 |
\or Mar% |
| 121 |
\or Apr% |
| 122 |
\or May% |
| 123 |
\or Jun% |
| 124 |
\or Jul% |
| 125 |
\or Aug% |
| 126 |
\or Sep% |
| 127 |
\or Oct% |
| 128 |
\or Nov% |
| 129 |
\or Dec% |
| 130 |
\fi} |
| 131 |
|
| 132 |
% XeLaTeX packages. |
| 133 |
\RequirePackage{fontspec} |
| 134 |
\defaultfontfeatures{Ligatures=TeX} |
| 135 |
\RequirePackage{xunicode} |
| 136 |
\RequirePackage{xltxtra} |
| 137 |
|
| 138 |
% Font: Use "Tinos" as the main typeface (\textnormal{}, \normalfont). |
| 139 |
% The "Tinos" fonts are released under the Apache License Version 2.0, |
| 140 |
% and can be downloaded for free at <http://www.fontsquirrel.com/fonts/tinos>. |
| 141 |
% Symbol table: <http://www.fileformat.info/info/unicode/font/tinos/grid.htm> |
| 142 |
\setmainfont |
| 143 |
[Path=./Fonts/Tinos/, |
| 144 |
ItalicFont=Tinos-Italic, |
| 145 |
BoldFont=Tinos-Bold, |
| 146 |
BoldItalicFont=Tinos-BoldItalic] |
| 147 |
{Tinos-Regular.ttf} |
| 148 |
|
| 149 |
% Secondary font: "GNU FreeFont". |
| 150 |
% The "GNU FreeFont" fonts are released under the |
| 151 |
% GNU General Public License Version 3, and can be downloaded |
| 152 |
% for free at <https://savannah.gnu.org/projects/freefont/>. |
| 153 |
\newcommand{\UseSecondaryFont}{\fontspec |
| 154 |
[Path=./Fonts/GNUFreeFont/, |
| 155 |
ItalicFont=FreeSerifItalic, |
| 156 |
BoldFont=FreeSerifBold, |
| 157 |
BoldItalicFont=FreeSerifBoldItalic] |
| 158 |
{FreeSerif.otf}} |
| 159 |
|
| 160 |
% Sans-serif font: Changed to "Tinos". |
| 161 |
\renewcommand{\sffamily}{\rmfamily} |
| 162 |
|
| 163 |
% Typewriter (monospace) font: Changed to "Tinos". |
| 164 |
\renewcommand{\ttfamily}{\rmfamily} |
| 165 |
|
| 166 |
% Small caps font: Changed to "Tinos". |
| 167 |
\renewcommand{\scshape}{\rmfamily} |
| 168 |
%\renewcommand{\textsc}[1]{\textbf{\MakeUppercase{#1}}} |
| 169 |
|
| 170 |
% Font styles. |
| 171 |
\newcommand{\UseHeadingFont}{\normalfont} |
| 172 |
\newcommand{\UseHeaderFooterFont}{\UseHeadingFont\fontsize{8.2pt}{9.5pt}\selectfont} |
| 173 |
\newcommand{\UseNoteFont}{\UseHeadingFont\fontsize{8pt}{9.6pt}\selectfont} |
| 174 |
\newcommand{\UseTitleFont}{\UseHeadingFont\fontsize{28pt}{33.6pt}\selectfont\bfseries} |
| 175 |
\newcommand{\UseSubTitleFont}{\normalfont\fontsize{8.6pt}{10.3pt}\selectfont} |
| 176 |
\newcommand{\UseSectionFont}{\UseHeadingFont\fontsize{9pt}{11pt}\selectfont\bfseries} |
| 177 |
\newcommand{\UseSubSectionFont}{\UseHeadingFont\fontsize{8.6pt}{10.3pt}\selectfont\bfseries} |
| 178 |
\newcommand{\UseDetailFont}{\normalfont\fontsize{8.6pt}{10.3pt}\selectfont} |
| 179 |
|
| 180 |
% Symbols (unicode). |
| 181 |
\newcommand{\BulletSymbol}{{\normalfont\fontsize{6.5}{7.8}\selectfont\raisebox{0.17em}{\char"25A0}}} |
| 182 |
\newcommand{\SubBulletSymbol}{{\normalfont\fontsize{6}{7.2}\selectfont\raisebox{0.17em}{\char"25CF}}} |
| 183 |
\newcommand{\TildeSymbol}{{\normalfont\char"007E}} |
| 184 |
|
| 185 |
% Headers and footers: Blank header, page number in footer. |
| 186 |
\AtEndDocument{\null\label{LastPage}} |
| 187 |
\newcommand{\PageKOfN}{{\UseHeaderFooterFont{Page}~\thepage~of~\pageref{LastPage}}} |
| 188 |
\newcommand{\DraftStamp}{{\UseHeaderFooterFont\color{red}DRAFT~\Timestamp}} |
| 189 |
|
| 190 |
\ifnum\TypesetInDraftMode=0 |
| 191 |
\newcommand{\HeaderText}{} |
| 192 |
\newcommand{\FooterText}{\hfill\PageKOfN\hfill} |
| 193 |
\else |
| 194 |
\newcommand{\HeaderText}{} |
| 195 |
\newcommand{\FooterText}{\null\hphantom{\DraftStamp}\hfill% |
| 196 |
\PageKOfN\hfill% |
| 197 |
\DraftStamp\null} |
| 198 |
\fi |
| 199 |
|
| 200 |
\def\ps@plain{% |
| 201 |
\def\@oddhead{\HeaderText}% |
| 202 |
\def\@evenhead{\HeaderText}% |
| 203 |
\def\@oddfoot{\FooterText}% |
| 204 |
\def\@evenfoot{\FooterText}} |
| 205 |
|
| 206 |
\pagestyle{plain} |
| 207 |
|
| 208 |
% Paragraph style. |
| 209 |
\setlength{\parindent}{0in} % No indentation at the beginning of each paragraph. |
| 210 |
\setlength{\parskip}{0in} % No vertical space between paragraphs. |
| 211 |
|
| 212 |
% Avoid bad page breaks within paragraphs. |
| 213 |
\widowpenalties 1 10000 |
| 214 |
\clubpenalties 1 10000 |
| 215 |
\raggedbottom |
| 216 |
|
| 217 |
% Avoid overfull lines. |
| 218 |
\sloppy |
| 219 |
|
| 220 |
% Footnotes: Use symbols instead of numbers for labels. |
| 221 |
\renewcommand{\thefootnote}{\fnsymbol{footnote}} |
| 222 |
|
| 223 |
% Macro: Title (name). |
| 224 |
\newcommand{\Title}[1]{% |
| 225 |
\par\pdfbookmark[1]{#1}{#1}% |
| 226 |
\begingroup\centering% |
| 227 |
\UseTitleFont{#1}% |
| 228 |
\par\endgroup\par} |
| 229 |
|
| 230 |
% Macro: SubTitle (personal information below name). |
| 231 |
\newenvironment{SubTitle} |
| 232 |
{\par\vspace{0.25\baselineskip}% |
| 233 |
\begingroup\centering% |
| 234 |
\UseSubTitleFont} |
| 235 |
{\par\endgroup\par} |
| 236 |
|
| 237 |
% Macro: Body (rest of the document). |
| 238 |
\newenvironment{Body} |
| 239 |
{% |
| 240 |
\par\vspace{1.5\baselineskip}% |
| 241 |
\begin{list} |
| 242 |
{} |
| 243 |
{\setlength\leftmargin{1.2in}% |
| 244 |
\setlength\rightmargin{0in}% |
| 245 |
\setlength\labelwidth{1.2in}% |
| 246 |
\setlength\labelsep{0in}% |
| 247 |
\setlength\listparindent{0in}% |
| 248 |
\setlength\itemindent{0in}% |
| 249 |
\setlength\parskip{0in}% |
| 250 |
\setlength\topsep{0in}% |
| 251 |
\setlength\parsep{0in}% |
| 252 |
\setlength\itemsep{0.90\baselineskip}% |
| 253 |
\setlength\partopsep{0in}% |
| 254 |
%\raggedright% |
| 255 |
}% |
| 256 |
} |
| 257 |
{% |
| 258 |
\end{list}% |
| 259 |
\par% |
| 260 |
} |
| 261 |
|
| 262 |
% Macro: Gap (vertical gap between items in the same section). |
| 263 |
\newcommand{\Gap}{\par\vspace{0.45mm}\par} |
| 264 |
|
| 265 |
% Macro: BigGap (big vertical gap between items in the same section). |
| 266 |
\newcommand{\BigGap}{\par\vspace{2.25mm}\par} |
| 267 |
|
| 268 |
% Macro: Section (new section for Education, Research Experience, etc.). |
| 269 |
\newcommand{\Section}[3] |
| 270 |
{\par\pdfbookmark[2]{#2}{#3}% |
| 271 |
\item[\smash{\parbox[t]{1.2in}{\UseSectionFont\raggedright\MakeUppercase{#1}}}]% |
| 272 |
\par} |
| 273 |
|
| 274 |
% Macro: SubSection. |
| 275 |
\newcommand{\SubSection}[3] |
| 276 |
{\par\pdfbookmark[3]{#2}{#3}% |
| 277 |
{\UseSubSectionFont\raggedright\MakeUppercase{#1}}% |
| 278 |
\par} |
| 279 |
|
| 280 |
% Macro: Detail (text in smaller font under an item). |
| 281 |
\newenvironment{Detail} |
| 282 |
{\par\begingroup\UseDetailFont} |
| 283 |
{\par\endgroup\par} |
| 284 |
|
| 285 |
% Macro: BulletItem. |
| 286 |
\newsavebox{\BulletItemIndentBox} |
| 287 |
\newlength{\BulletItemIndentWidth} |
| 288 |
% |
| 289 |
\newcommand{\BulletItem} |
| 290 |
{\par\vspace{0\baselineskip}% |
| 291 |
\savebox{\BulletItemIndentBox}{\hspace{1.5mm}\BulletSymbol\hspace{1.5mm}}% |
| 292 |
\settowidth{\BulletItemIndentWidth}{\usebox{\BulletItemIndentBox}}% |
| 293 |
\parshape 2% |
| 294 |
\labelwidth \linewidth% |
| 295 |
\dimexpr\labelwidth+\BulletItemIndentWidth\relax \dimexpr\linewidth-\BulletItemIndentWidth\relax% |
| 296 |
\usebox{\BulletItemIndentBox}% |
| 297 |
\ignorespaces% |
| 298 |
} |
| 299 |
|
| 300 |
% Macro: SubBulletItem. |
| 301 |
\newsavebox{\SubBulletItemIndentBox} |
| 302 |
\newlength{\SubBulletItemIndentWidth} |
| 303 |
% |
| 304 |
\newcommand{\SubBulletItem} |
| 305 |
{\par\vspace{0\baselineskip}% |
| 306 |
\savebox{\SubBulletItemIndentBox}{\hspace{5.6mm}\SubBulletSymbol\hspace{1.5mm}}% |
| 307 |
\settowidth{\SubBulletItemIndentWidth}{\usebox{\SubBulletItemIndentBox}}% |
| 308 |
\parshape 2% |
| 309 |
\labelwidth \linewidth% |
| 310 |
\dimexpr\labelwidth+\SubBulletItemIndentWidth\relax \dimexpr\linewidth-\SubBulletItemIndentWidth\relax% |
| 311 |
\usebox{\SubBulletItemIndentBox}% |
| 312 |
\ignorespaces% |
| 313 |
} |
| 314 |
|
| 315 |
% Macro: Entry. |
| 316 |
\newcommand{\Entry} |
| 317 |
{\par\vspace{0\baselineskip}% |
| 318 |
\parshape 1% |
| 319 |
\labelwidth \linewidth% |
| 320 |
\ignorespaces% |
| 321 |
} |
| 322 |
|
| 323 |
% Macro: Item (aligns horizontally with BulletItem). |
| 324 |
\newcommand{\Item} |
| 325 |
{\par\vspace{0\baselineskip}% |
| 326 |
\savebox{\BulletItemIndentBox}{\hphantom{\hspace{1.5mm}\BulletSymbol\hspace{1.5mm}}}% |
| 327 |
\settowidth{\BulletItemIndentWidth}{\usebox{\BulletItemIndentBox}}% |
| 328 |
\parshape 2% |
| 329 |
\labelwidth \linewidth% |
| 330 |
\dimexpr\labelwidth+\BulletItemIndentWidth\relax \dimexpr\linewidth-\BulletItemIndentWidth\relax% |
| 331 |
\usebox{\BulletItemIndentBox}% |
| 332 |
\ignorespaces% |
| 333 |
} |
| 334 |
|
| 335 |
% Macro: SubItem (aligns horizontally with SubBulletItem). |
| 336 |
\newcommand{\SubItem} |
| 337 |
{\par\vspace{0\baselineskip}% |
| 338 |
\savebox{\SubBulletItemIndentBox}{\hphantom{\hspace{5.6mm}\SubBulletSymbol\hspace{1.5mm}}}% |
| 339 |
\settowidth{\SubBulletItemIndentWidth}{\usebox{\SubBulletItemIndentBox}}% |
| 340 |
\parshape 2% |
| 341 |
\labelwidth \linewidth% |
| 342 |
\dimexpr\labelwidth+\SubBulletItemIndentWidth\relax \dimexpr\linewidth-\SubBulletItemIndentWidth\relax% |
| 343 |
\usebox{\SubBulletItemIndentBox}% |
| 344 |
\ignorespaces% |
| 345 |
} |
| 346 |
|
| 347 |
% Macro: NumberedItem. |
| 348 |
\newcommand{\MaxNumberedItem}{[88]} |
| 349 |
% |
| 350 |
\newsavebox{\MaxNumberedItemIndentBox} |
| 351 |
\newlength{\MaxNumberedItemIndentWidth} |
| 352 |
\newsavebox{\NumberedItemIndentBox} |
| 353 |
\newlength{\NumberedItemIndentWidth} |
| 354 |
% |
| 355 |
\newcommand{\NumberedItem}[1] |
| 356 |
{\par\vspace{0\baselineskip}% |
| 357 |
\savebox{\MaxNumberedItemIndentBox}{\hspace{1.5mm}{\MaxNumberedItem}\hspace{2.5mm}}% |
| 358 |
\settowidth{\MaxNumberedItemIndentWidth}{\usebox{\MaxNumberedItemIndentBox}}% |
| 359 |
\savebox{\NumberedItemIndentBox}{\hspace{1.5mm}{#1}\hspace{2.5mm}}% |
| 360 |
\settowidth{\NumberedItemIndentWidth}{\usebox{\NumberedItemIndentBox}}% |
| 361 |
\parshape 2% |
| 362 |
\labelwidth \linewidth% |
| 363 |
\dimexpr\labelwidth+\MaxNumberedItemIndentWidth\relax \dimexpr\linewidth-\MaxNumberedItemIndentWidth\relax% |
| 364 |
\hspace{\dimexpr\MaxNumberedItemIndentWidth-\NumberedItemIndentWidth\relax}% |
| 365 |
\usebox{\NumberedItemIndentBox}% |
| 366 |
\ignorespaces% |
| 367 |
} |
| 368 |
|
| 369 |
% Macro: Hide. |
| 370 |
\newcommand{\Hide}[1]{} |
| 371 |
|
| 372 |
% End of class file. |
| 373 |
\endinput |