diff --git a/comcv.cls b/comcv.cls index 4a5c8ba..2508d6e 100644 --- a/comcv.cls +++ b/comcv.cls @@ -14,7 +14,7 @@ \LoadClass{article} % required packages - put more packages here -\RequirePackage[top=2cm,left=1cm,right=1cm,bottom=1.2cm]{geometry} % Change Horizontal and Vertical margins +\RequirePackage[top=0.75cm,left=1cm,right=1cm,bottom=1.2cm]{geometry} % Change Horizontal and Vertical margins \RequirePackage{fontawesome} % fontawesomr icons \RequirePackage{xcolor} % custom colors \RequirePackage{hyperref} % for links and @@ -22,7 +22,7 @@ \RequirePackage{array} \RequirePackage{totpages} % counts total pages \RequirePackage{fancyhdr} -\RequirePackage{tikz} +\RequirePackage{titlesec} % define your colors here \definecolor{white}{HTML}{FFFFFF} % color white @@ -34,7 +34,7 @@ % provide colors to your elements \colorlet{regulartext}{gray} -\colorlet{headertext}{white} +\colorlet{headertext}{gray} \colorlet{headerfill}{paynegray} \colorlet{linktext}{coralpink} \colorlet{lighttext}{lightgray} @@ -79,11 +79,20 @@ Color=headertext ]{Roboto-Thin.ttf} +\newfontfamily\sectionheader[ + Path = fonts/, + Color=linktext +]{Roboto-Regular.ttf} + \newcommand*{\lighttext}{\addfontfeature{Color=lighttext}} \newcommand*{\linktext}{\addfontfeature{Color=linktext}} % define document commands/variables -\newcommand*{\fullname}[3]{\def\comcv@firstname{#1}\def\comcv@middlename{#2}\def\comcv@lastname{#3}} % full name +\newcommand*{\fullname}[3]{ + \def\comcv@firstname{#1} + \def\comcv@lastname{#2} + \def\comcv@degree{#3} +} % full name \newcommand*{\cvtitle}[1]{\def\comcv@title{#1}} % title of the document \newcommand*{\email}[1]{\def\comcv@mailid{#1}} % email id and email text @@ -93,36 +102,39 @@ \newcommand*{\linkedin}[2]{\def\comcv@linkedinurl{#1}\def\comcv@linkedintext{#2}} % linkedin -\newcommand*{\currentdate}[1]{\def\comcv@date{#1}} -\def\comcv@totpages{~/~\ref{TotPages}} -\def\comcv@page{Page~\thepage\comcv@totpages} + % add more variables here % redefining some commands -\def\@sectioncolor#1#2#3{{\addfontfeatures{Color=linktext}#1#2#3}} +\titlespacing{\section}{0pt}{0pt}{0pt} % remove space around sections +\titleformat{\section}{ + \fontsize{16pt}{24pt}\sectionheader\bfseries +}{}{0pt}{} -\renewcommand{\section}[1]{{\vspace{.5\baselineskip}\Large\bfseries\@sectioncolor #1}} +\titlespacing{\subsection}{0pt}{0pt}{0pt} % remove space around subsection +\titleformat{\subsection}[runin]{ + \fontsize{12pt}{12pt}\regularheader\bfseries +}{}{0pt}{} -\renewcommand{\subsection}[2]{\large\bfseries #2} +% new command for writing subsection and descriptions +\newcommand*{\combosection}[4]{ + \subsection{#1} + \sectionheader\Large{~|} + \light\large{~#2} + \hfill{#3} + \linebreak{#4} + \vspace{2mm} +} -% hyperref options + + +% header \AtBeginDocument{ + % hyperref options \hypersetup{ pdfauthor={\comcv@firstname~\comcv@lastname}, % author of the file pdftitle={\comcv@firstname~\comcv@lastname}, % title for the generated pdf } -} - -% header -\AtBeginDocument{ - \begin{tikzpicture}[remember picture, overlay] - \node [rectangle, fill=headerfill, minimum width=\paperwidth, minimum height=8em, anchor=north] (box) at (current page.north) {}; - \node [text=headertext, anchor=center] (name) at (box) {{\Huge\thinheader\comcv@firstname~\thinheader\comcv@middlename~\regularheader\comcv@lastname} - }; - \node [text=headertext, anchor=north] at (name.south) {\Large\thinheader\comcv@title}; - \end{tikzpicture} - - \vspace{\baselineskip} \def\comcv@email{\faEnvelope~\href{mailto:\comcv@mailid}{\comcv@mailid}} @@ -155,20 +167,43 @@ \else \def\comcv@website{} \fi - - - + \begin{center} - \comcv@email~~\comcv@website~~\comcv@github~~\comcv@linkedin + % define your header text size, color and format + \fontsize{35pt}{45pt}\thinheader\comcv@firstname~\regularheader\comcv@lastname + \ifx\comcv@degree\empty% do nothing in case of empty + \else + \thinheader,~\comcv@degree + \fi + + \vspace{2mm} + + \large\light\comcv@title + + \vspace{-2mm} + + \noindent\makebox[\linewidth]{\color{gray}\rule{\paperwidth}{0.4pt}} \end{center} + + \begin{center} + \vspace{-2mm} + \comcv@email~~\comcv@website~~\comcv@github~~\comcv@linkedin + \vspace{-5mm} + \end{center} + } % footer + +\newcommand*{\currentdate}[1]{\def\comcv@date{#1}} +\def\comcv@totpages{~/~\regular\ref{TotPages}} +\def\comcv@page{\light{Page~}\thepage\comcv@totpages} + \AtBeginDocument{ \pagestyle{fancy} \fancyhead{} \fancyfoot[C]{\footnotesize\light\comcv@date} - \fancyfoot[R]{\raggedleft\footnotesize\light\comcv@page} + \fancyfoot[R]{\raggedleft\footnotesize\comcv@page} \renewcommand{\headrulewidth}{0em} \setlength\footskip{\baselineskip} }