Skip to content

Instantly share code, notes, and snippets.

@betaveros
Created October 6, 2021 00:49
Show Gist options
  • Save betaveros/f57e2b26a27620b7a50a79abc98cad75 to your computer and use it in GitHub Desktop.
Save betaveros/f57e2b26a27620b7a50a79abc98cad75 to your computer and use it in GitHub Desktop.
✨ my cool résumé ✨
\ProvidesClass{cvxx}[2021/10/05 betaveros's CV class]
\NeedsTeXFormat{LaTeX2e}
% Distantly based on https://www.latextemplates.com/template/friggeri-resume-cv (?)
% Requires the FontAwesome font and LaTeX package (among others)
\DeclareOption{print}{\def\@cv@print{}}
\DeclareOption{public}{\def\@cv@public{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
\LoadClass[11pt]{article}
%%%%%%%%%%
% Colors %
%%%%%%%%%%
\RequirePackage{xcolor}
\definecolor{white}{RGB}{255,255,255}
\definecolor{black}{HTML}{000000}
\definecolor{gray}{HTML}{666666}
\definecolor{lightgray}{HTML}{888888}
\definecolor{lightred}{HTML}{FF9999}
\definecolor{silverone}{HTML}{F9F9F9}
\definecolor{silvertwo}{HTML}{F2F2F2}
\definecolor{accent}{HTML}{0000CC}
\definecolor{colorheader}{HTML}{221144}
\definecolor{colorsection}{HTML}{775577}
\definecolor{colorheader2}{HTML}{110022}
\ifdefined\@cv@print
\colorlet{accent}{black}
\colorlet{lightred}{lightgray} % heart
\colorlet{fillheader}{silverone}
\colorlet{fillheader2}{silverone}
\colorlet{header}{black}
\colorlet{section}{gray}
\else
\colorlet{fillheader}{colorheader}
\colorlet{fillheader2}{colorheader2}
\colorlet{header}{white}
\colorlet{section}{colorsection}
\fi
\colorlet{textcolor}{black}
\colorlet{headercolor}{black}
%%%%%%%%%
% Fonts %
%%%%%%%%%
\RequirePackage[quiet]{fontspec}
% \RequirePackage[math-style=TeX,vargreek-shape=unicode]{unicode-math}
\RequirePackage{fontawesome}
\RequirePackage{soul}
\sodef\myso{}{.13em}{.4em}{0em}
\newfontfamily\bodyfont[]{Ubuntu}
\newfontfamily\thinfont[]{Ubuntu Light}
\newfontfamily\headingfont[]{Ubuntu Medium}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor]{Ubuntu Light}
%\setmathfont{XITS Math}
%%%%%%%%%%
% Header %
%%%%%%%%%%
\RequirePackage{tikz}
\RequirePackage{multirow}
\newcommand{\rolefont}{%
\fontsize{14pt}{24pt}\selectfont%
\thinfont%
\color{white}%
}
\newcommand{\headerstrut}{\rule[0pt]{0pt}{1.19cm}}
\newcommand{\bigname}{%
\parbox[c]{8cm}{
\fontsize{36pt}{64pt}\color{header}{\bodyfont Name}
}
}
\newcommand{\irlinfo}{%
\fontsize{14pt}{24pt}\color{header}
\begin{tabular}{@{}l@{}}
Address \\
Address \\
\faPhone~(555)~555-5555
\end{tabular}
}
\newcommand{\webinfo}{%
\fontsize{14pt}{24pt}\color{header}
\begin{tabular}{@{}l@{}}
\href{mailto:foo@example.com}{\makebox[1.8em][c]{\faEnvelope}email} \\
\href{https://example.com/}{\makebox[1.8em][c]{\faGlobe}website}\\
\href{https://example.com/}{\makebox[1.8em][c]{\faGithub}github}
\end{tabular}
}
\newcommand{\header}{%
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, left color = fillheader, right color = fillheader2, shading = axis, shading angle = 75, anchor=north, minimum width=\paperwidth, minimum height=3.3cm] (box) at (current page.north){};
% \shade[left color = fillheader, right color = fillheader2, shading = axis, shading angle = 75](current page.north west) -- +(\paperwidth, 0) -- +(\paperwidth, -5.8) to[out=180,in=180] +(0, -3.3);
\end{tikzpicture}
\vspace{-1.2cm}
\ifdefined\@cv@public
\begin{tabular*}{\textwidth}{l@{}l@{\extracolsep{\fill}}l}
\headerstrut & \bigname & \webinfo
\end{tabular*}
\else
\begin{tabular*}{\textwidth}{l@{}l@{\extracolsep{\fill}}l@{\extracolsep{\fill}}l}
\headerstrut & \bigname & \irlinfo & \webinfo
\end{tabular*}
\fi
\vspace{0.8cm}
}
%%%%%%%%%%%%%
% Structure %
%%%%%%%%%%%%%
\RequirePackage{parskip}
\def\@sectioncolor#1{%
{\color{section}#1}%
}
\newcommand{\xxsection}[1]{
\vspace{-9pt}
\par\@sectioncolor{\rule{\textwidth}{0.1pt}\vspace{-3.5pt}}
{% tweak section heading relative size here
\footnotesize\headingfont\color{headercolor}%
\@sectioncolor{#1}
}
\par\vspace{2pt}
}
\pagestyle{empty}
%%%%%%%%%%%%%%%%%%%%
% List environment %
%%%%%%%%%%%%%%%%%%%%
\setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{%
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
}{%
\end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
\parbox[t]{3cm}{\raggedleft #1}&\parbox[t]{15.5cm}{%
\textbf{#2}\hfill%
{\footnotesize\addfontfeature{Color=lightgray}#3}\\%
#4\vspace{\parsep}%
}\\}
\newcommand{\entryol}[3]{% oneline
\parbox[t]{3cm}{\raggedleft #1}&\parbox[t]{15.5cm}{%
\textbf{#2}\hfill%
{\footnotesize\addfontfeature{Color=lightgray}#3}%
}\\}
\newenvironment{sentrylist}{%
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r@{\extracolsep{\fill}}l}
}{%
\end{tabular*}
}
\newcommand{\sentry}[3]{%
#1&{\bf #2}&{#3}}
%%%%%%%%%%%%%%%%
% Other tweaks %
%%%%%%%%%%%%%%%%
\RequirePackage[margin=0.5in,nohead,nofoot]{geometry}
\RequirePackage{hyperref}
\hypersetup{
colorlinks=false,
linkcolor=accent,
citecolor=accent,
filecolor=accent,
urlcolor=accent}
% A fix for \href{}{} colors not working with fontspec
\makeatletter
\def\HyColor@@@@UseColor#1\@nil{\addfontfeatures{Color=#1}}
\makeatother
\documentclass[]{cvxx} % Add 'print' as an option into the square bracket to remove colors from this template for printing
\usepackage{eso-pic}
\AddToShipoutPictureBG{\AtPageLowerLeft{\raisebox{0.4in}{\hspace{0.5in}\makebox[0pt][l]{{\footnotesize\addfontfeature{Color=lightgray}Made with {\color{lightred} \faHeart} using \LaTeX}}}}}
\begin{document}
\header
\vspace{6pt}
\xxsection{\myso{EDUCATION}}
\begin{entrylist}
\entry{Date}{School}{Location}{\textit{Title}\\Details details details}
\entryol{Date}{School (one-line)}{Location}
\end{entrylist}
\xxsection{\myso{EXPERIENCE}}
\begin{entrylist}
\entryol{Date}{Organization}{Role}
\entry{Date}{Organization}{Role}{Details details details}
\end{entrylist}
% \clearpage
\xxsection{\myso{LEADERSHIP \& ACTIVITIES}}
\begin{entrylist}
\entryol{Date}{Organization}{Role}
\entry{Date}{Organization}{Role}{Details details details}
\end{entrylist}
\begin{minipage}[t]{14cm}
\setlength{\intextsep}{400pt}
\xxsection{\myso{AWARDS}\hfill side}
\vspace{3pt}
\begin{sentrylist}
%------------------------------------------------
\sentry{Year}{Award}{Activity}\\%
\sentry{}{Award}{Activity}\\%
[\parsep]
\sentry{Year}{Award}{Activity}\\%
\sentry{}{Award}{Activity}\\%
[\parsep]
\sentry{Year}{Award}{Activity}\\%
\sentry{}{Award}{Activity}\\%
\end{sentrylist}
\end{minipage}
\hfill
\begin{minipage}[t]{4.5cm}
%\the\parskip \the\baselineskip
\begin{flushright}
%\the\parskip \the\baselineskip
\xxsection{\myso{LANGUAGES}}
lorem\\
ipsum\\
\vspace{12pt}
\xxsection{\myso{PROGRAMMING}}
lorem, ipsum
\vspace{12pt}
\xxsection{\myso{INTERESTS}}
lorem, ipsum
\end{flushright}
\end{minipage}
\vfill
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment