Files

246 lines
7.1 KiB
OpenEdge ABL
Raw Permalink Normal View History

2021-01-22 19:23:04 +05:30
%% comcv.cls
2024-02-28 13:28:30 +00:00
%% Copyright 2024 Avinal Kumar
2024-10-19 01:29:03 -04:00
% This work may be distributed and/or modified under the conditions of the LaTeX Project Public License,
% either version 1.3 of this license or any later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX
2021-01-24 20:28:43 +05:30
% version 2005/12/01 or later.
2021-01-22 19:23:04 +05:30
% class options
2021-01-23 00:00:11 +05:30
\NeedsTeXFormat{LaTeX2e}
2024-10-19 01:29:03 -04:00
\ProvidesClass{comcv}[2024/10/19 Compact CV]
2021-01-22 19:23:04 +05:30
2021-01-24 12:09:56 +05:30
\newif\ifextended
\extendedfalse
\DeclareOption{extended}{
\extendedtrue
}
2021-01-22 19:23:04 +05:30
\DeclareOption*{
\PassOptionsToClass{\CurrentOption}{article}
}
\ProcessOptions\relax
\LoadClass{article}
% required packages - put more packages here
2024-10-19 01:29:03 -04:00
\RequirePackage[top=0.5cm,left=1cm,right=1cm,bottom=1.2cm]{geometry} % change horizontal and vertical margins
2021-01-24 12:09:56 +05:30
\RequirePackage{fontawesome} % fontawesome icons
2021-01-24 17:05:28 +05:30
\RequirePackage[usenames,dvipsnames]{xcolor} % custom colors
2021-01-22 20:54:41 +05:30
\RequirePackage{fontspec} % custom fonts
\RequirePackage{array}
\RequirePackage{totpages} % counts total pages
2021-01-24 17:05:28 +05:30
\RequirePackage{fancyhdr} % fancy header, footer
\RequirePackage{titlesec} % formating sections, subsections
2021-01-24 12:09:56 +05:30
\RequirePackage{hyperref} % for links and, please keep it as last package, add more packages above it
2021-01-24 17:05:28 +05:30
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{naturalnames}{hyperref}
2024-10-19 01:29:03 -04:00
2021-01-22 19:23:04 +05:30
% define your colors here
\definecolor{white}{HTML}{FFFFFF} % color white
\definecolor{gray}{HTML}{555555} % color gray
2021-01-24 12:09:56 +05:30
\definecolor{lightgray}{HTML}{999999} % color light gray, a shade of gray
\definecolor{black}{HTML}{000000} % color black, also gray just deeper
2021-01-23 00:00:11 +05:30
\definecolor{coralpink}{HTML}{FF706C} % color coral pink, ever seen a real coral, huh
2021-01-22 19:23:04 +05:30
% provide colors to your elements
2021-01-24 12:09:56 +05:30
\colorlet{defaulttext}{black} % default text color
\colorlet{regulartext}{gray} % regular text color
\colorlet{headertext}{gray} % header text color
\colorlet{linktext}{coralpink} % link text volor
\colorlet{lighttext}{lightgray} % light text color
2021-01-22 19:23:04 +05:30
2021-01-22 20:54:41 +05:30
% hyperref options for generating pdf, metadata
\hypersetup{
colorlinks=true,
allcolors=linktext
}
% font options
\setmainfont[
Path=fonts/,
BoldFont=Roboto-Bold.ttf,
ItalicFont=Roboto-Italic.ttf,
BoldItalicFont=Roboto-BoldItalic.ttf,
Color=regulartext
]{Roboto-Light.ttf}
\newfontfamily\regular[
Path = fonts/,
Color=regulartext
]{Roboto-Regular.ttf}
\newfontfamily\light[
Path = fonts/,
Color=regulartext
]{Roboto-Light.ttf}
\newfontfamily\thin[
Path = fonts/,
2021-01-24 12:09:56 +05:30
Color=defaulttext
2021-01-22 20:54:41 +05:30
]{Roboto-Thin.ttf}
\newfontfamily\regularheader[
Path = fonts/,
Color=headertext
]{Roboto-Regular.ttf}
2021-01-22 19:23:04 +05:30
2021-01-22 20:54:41 +05:30
\newfontfamily\thinheader[
Path = fonts/,
Color=headertext
]{Roboto-Thin.ttf}
2021-01-22 19:23:04 +05:30
2021-01-24 12:09:56 +05:30
\newfontfamily\mediumheader[
Path = fonts/,
Color=headertext
]{Roboto-Medium.ttf}
2024-10-19 01:29:03 -04:00
% define document commands and variables
2021-01-24 12:09:56 +05:30
\newcommand*{\fullname}[3]{\def\comcv@firstname{#1}\def\comcv@lastname{#2}\def\comcv@degree{#3}} % full name and degree
2021-01-22 20:54:41 +05:30
\newcommand*{\cvtitle}[1]{\def\comcv@title{#1}} % title of the document
2021-01-24 12:09:56 +05:30
2021-01-22 20:54:41 +05:30
\newcommand*{\email}[1]{\def\comcv@mailid{#1}} % email id and email text
\newcommand*{\website}[2]{\def\comcv@websiteurl{#1}\def\comcv@websitetext{#2}} % website and website text
\newcommand*{\github}[2]{\def\comcv@githuburl{#1}\def\comcv@githubtext{#2}} % github
\newcommand*{\linkedin}[2]{\def\comcv@linkedinurl{#1}\def\comcv@linkedintext{#2}} % linkedin
2021-01-23 00:00:11 +05:30
2024-02-28 13:28:30 +00:00
\newcommand*{\phonenumber}[1]{\def\comcv@phone{#1}} % phone number
2021-01-24 12:09:56 +05:30
\newcommand\horbar[1][]{\noindent\makebox[\linewidth]{\color{gray}\rule{\paperwidth}{0.4pt}}} % unindented horizontal line
% link colors
\def\HyColor@@@@UseColor#1\@nil{\addfontfeatures{Color=linktext}}
2021-01-24 02:57:58 +05:30
2021-01-22 20:54:41 +05:30
% redefining some commands
2021-01-24 02:57:58 +05:30
\titlespacing{\section}{0pt}{0pt}{0pt} % remove space around sections
\titleformat{\section}{
2021-01-24 17:05:28 +05:30
\fontsize{14pt}{16pt}\thinheader\bfseries\uppercase
2021-01-24 02:57:58 +05:30
}{}{0pt}{}
\titlespacing{\subsection}{0pt}{0pt}{0pt} % remove space around subsection
2021-01-24 12:09:56 +05:30
\titleformat{\subsection}[runin]{ % runin option let you put text side of section or subsection
2021-01-24 17:05:28 +05:30
\fontsize{12pt}{12pt}\mediumheader\bfseries
2021-01-24 02:57:58 +05:30
}{}{0pt}{}
% new command for writing subsection and descriptions
2021-01-24 22:56:05 +05:30
\newcommand{\combosection}[4]{
2021-01-24 12:09:56 +05:30
\subsection{\textbf{#1}}
2021-01-24 17:05:28 +05:30
\ifx&#2&
\else
\Large\addfontfeatures{Color=linktext}{~|}
\light\large{#2}
\fi
2021-01-24 02:57:58 +05:30
\hfill{#3}
2021-01-24 17:05:28 +05:30
\linebreak
\normalsize{#4}
2021-01-24 02:57:58 +05:30
}
2021-01-22 20:54:41 +05:30
2021-01-24 02:57:58 +05:30
% header
2021-01-23 00:00:11 +05:30
\AtBeginDocument{
2021-01-24 02:57:58 +05:30
% hyperref options
2021-01-23 00:00:11 +05:30
\hypersetup{
2024-10-19 01:29:03 -04:00
pdfauthor={\comcv@firstname~\comcv@lastname}, % author of file
pdftitle={\comcv@firstname~\comcv@lastname's Résumé}, % title for generated pdf
2021-01-23 00:00:11 +05:30
}
2021-01-22 20:54:41 +05:30
2021-01-23 00:00:11 +05:30
\def\comcv@email{\faEnvelope~\href{mailto:\comcv@mailid}{\comcv@mailid}}
\ifdefined\comcv@linkedinurl
\ifx\comcv@linkedinurl\empty
\def\comcv@linkedin{}
\else
\def\comcv@linkedin{\faLinkedin~\href{\comcv@linkedinurl}{\comcv@linkedintext}}
\fi
\else
\def\comcv@linkedin{}
\fi
\ifdefined\comcv@githuburl
\ifx\comcv@githuburl\empty
\def\comcv@github{}
\else
\def\comcv@github{\faGithub~\href{\comcv@githuburl}{\comcv@githubtext}}
\fi
\else
\def\comcv@github{}
\fi
\ifdefined\comcv@websiteurl
\ifx\comcv@websiteurl\empty
\def\comcv@website{}
\else
\def\comcv@website{\faGlobe~\href{\comcv@websiteurl}{\comcv@websitetext}}
\fi
\else
\def\comcv@website{}
\fi
2021-01-24 02:57:58 +05:30
2024-02-28 13:28:30 +00:00
\ifdefined\comcv@phone
\ifx\comcv@phone\empty
\def\comcv@phonenumber{}
\else
\def\comcv@phonenumber{\faPhone~\href{tel:\comcv@phone}{\comcv@phone}}
\fi
\else
\def\comcv@phonenumber{}
\fi
2021-01-23 00:00:11 +05:30
\begin{center}
2021-01-24 02:57:58 +05:30
% define your header text size, color and format
\fontsize{35pt}{45pt}\thinheader\comcv@firstname~\regularheader\comcv@lastname
2024-10-19 01:29:03 -04:00
\ifx\comcv@degree\empty % do nothing in case of empty degree
2021-01-24 02:57:58 +05:30
\else
\thinheader,~\comcv@degree
\fi
2021-01-24 12:09:56 +05:30
\ifdefined\comcv@title
\ifx\comcv@title\empty
2024-02-28 13:28:30 +00:00
\large\light\comcv@email~~\comcv@website~~\comcv@github~~\comcv@linkedin~~\comcv@phonenumber
2021-01-24 17:05:28 +05:30
\vspace{-\topsep}
2021-01-24 12:09:56 +05:30
\horbar
2021-01-24 17:05:28 +05:30
\vspace{-\topsep}
2021-01-24 12:09:56 +05:30
\else
\large\light\comcv@title
2021-01-24 17:05:28 +05:30
\vspace{-\topsep}
2021-01-24 12:09:56 +05:30
\horbar
2021-01-24 02:57:58 +05:30
2024-02-28 13:28:30 +00:00
\comcv@email~~\comcv@website~~\comcv@github~~\comcv@linkedin~~\comcv@phonenumber
2021-01-24 17:05:28 +05:30
\vspace{-\topsep}
2021-01-24 12:09:56 +05:30
\fi
\else
2024-02-28 13:28:30 +00:00
\large\light\comcv@email~~\comcv@website~~\comcv@github~~\comcv@linkedin~~\comcv@phonenumber
2021-01-24 17:05:28 +05:30
\vspace{-\topsep}
2021-01-24 12:09:56 +05:30
\horbar
2021-01-24 17:05:28 +05:30
\vspace{-\topsep}
2021-01-24 12:09:56 +05:30
\fi
2021-01-24 02:57:58 +05:30
2021-01-24 12:09:56 +05:30
\end{center}
2021-01-23 00:00:11 +05:30
}
2021-01-22 20:54:41 +05:30
% footer
2021-01-24 02:57:58 +05:30
\newcommand*{\currentdate}[1]{\def\comcv@date{#1}}
\def\comcv@totpages{~/~\regular\ref{TotPages}}
\def\comcv@page{\light{Page~}\thepage\comcv@totpages}
2021-01-22 20:54:41 +05:30
\AtBeginDocument{
\pagestyle{fancy}
\fancyhead{}
2021-01-24 12:09:56 +05:30
\fancyfoot[C]{\footnotesize\light\comcv@firstname's Résumé, \comcv@date, \comcv@email} % footer text
\fancyfoot[R]{\raggedleft\footnotesize\comcv@page} % page number and page link
2021-01-22 20:54:41 +05:30
\renewcommand{\headrulewidth}{0em}
\setlength\footskip{\baselineskip}
}
2021-01-24 17:05:28 +05:30
\newenvironment{tightlist}{
\vspace{-6mm}
\begin{itemize}
\itemsep1pt
\parskip0pt
\parsep0pt
}{
\end{itemize}
}