Clean up the cv class

This commit is contained in:
Sameer Rahmani 2022-03-27 19:20:02 +01:00
parent 74eb854b61
commit 5a688c2f29
3 changed files with 39 additions and 100 deletions

View File

@ -3,3 +3,9 @@ cv.pdf:
.PHONY: build .PHONY: build
build: cv.pdf build: cv.pdf
.PHONY: clean
clean:
rm -rf build
rm -f *~
all: build

36
cv.tex
View File

@ -1,3 +1,22 @@
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% Lxsameer's CV Latex class
% Copyright (C) 2022 Sameer Rahmani <lxsameer@gnu.org>
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\documentclass{lxsameer_cv} \documentclass{lxsameer_cv}
\setname{Sameer}{Rahmani} \setname{Sameer}{Rahmani}
@ -7,22 +26,17 @@
\setmail{lxsameer@lxsameer.com} \setmail{lxsameer@lxsameer.com}
\setwebsite{https://lxsameer.com} \setwebsite{https://lxsameer.com}
\setposition{Senior Software Engineer} \setposition{Senior Software Engineer}
%you can play with color of the template (red is also nice..)
\setlinkedinaccount{https://www.linkedin.com/in/lxsameer/} \setlinkedinaccount{https://www.linkedin.com/in/lxsameer/}
\setgithubaccount{https://devheroes.codes/lxsameer} \setgit{https://devheroes.codes/lxsameer}
\definecolor{AlmostBlack}{HTML}{090907}
% Set the global font color
\definecolor{AlmostBlack}{HTML}{090907}
\AtBeginDocument{\globalcolor{AlmostBlack}} \AtBeginDocument{\globalcolor{AlmostBlack}}
\begin{document} \begin{document}
%Set variables % Draw the avatar and personal detainls
%You can add sections, texts, explanations just by copying the style below.
%Create header
\headerview{} \headerview{}
\vspace{1ex} \vspace{1ex}
%Sections %Sections
\begin{multicols}{2}[] \begin{multicols}{2}[]
\vbox{ \vbox{
@ -175,8 +189,6 @@
{\href{https://devheroes.codes/lxsameer}{\faIcon{link}~https://devheroes.codes/lxsameer}} \\ {\href{https://devheroes.codes/lxsameer}{\faIcon{link}~https://devheroes.codes/lxsameer}} \\
{\href{https://devheroes.codes/Serene}{\faIcon{link}~https://devheroes.codes/Serene}} \\ {\href{https://devheroes.codes/Serene}{\faIcon{link}~https://devheroes.codes/Serene}} \\
{\href{https://github.com/lxsameer}{\faIcon{link}~https://github.com/lxsameer}} (I'm not using github anymore) \\ {\href{https://github.com/lxsameer}{\faIcon{link}~https://github.com/lxsameer}} (I'm not using github anymore) \\
{\href{https://devheroes.codes/lxsameer/CV}{\faIcon{link}~https://devheroes.codes/lxsameer/CV}} (Source of my CV.\@ Yes! it is opensource)} {\href{https://devheroes.codes/lxsameer/CV}{\faIcon{link}~https://devheroes.codes/lxsameer/CV}} (The source of my CV.\@ Yes! it is opensource)}
\end{multicols} \end{multicols}
%Footnote
%\createfootnote{}
\end{document} \end{document}

View File

@ -16,17 +16,12 @@
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software % along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
% This is a work based on Murat Can Karacabey's work
\author{Sameer Rahmani} \author{Sameer Rahmani}
% moved here I guess article class causes option clash with xcolor if used after loading the class % moved here I guess article class causes option clash with xcolor if used after loading the class
\RequirePackage[dvipsnames]{xcolor} \RequirePackage[dvipsnames]{xcolor}
\LoadClass[11pt]{article} \LoadClass[11pt]{article}
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesClass{lxsameer_cv}[2022/03/22 lxsameer's CV Class] \ProvidesClass{lxsameer_cv}[2022/03/22 lxsameer's CV Class]
%\RequirePackage[sfdefault]{noto}
\RequirePackage[default,light,semibold]{sourcesanspro} \RequirePackage[default,light,semibold]{sourcesanspro}
\setsansfont{Source Sans Pro} \setsansfont{Source Sans Pro}
\RequirePackage{multicol} \RequirePackage{multicol}
@ -48,7 +43,6 @@
\restoreparindent{} \restoreparindent{}
\pagestyle{empty} \pagestyle{empty}
\makeatletter \makeatletter
\newcommand{\globalcolor}[1]{% \newcommand{\globalcolor}[1]{%
\color{#1}\global\let\default@color\current@color{} \color{#1}\global\let\default@color\current@color{}
@ -73,7 +67,6 @@
\newcommand*{\setgithubaccount}[1]{\def\@githubaccount{#1}} \newcommand*{\setgithubaccount}[1]{\def\@githubaccount{#1}}
% Color pallet % Color pallet
\definecolor{color1}{HTML}{d80032} \definecolor{color1}{HTML}{d80032}
\definecolor{color2}{HTML}{d80032} \definecolor{color2}{HTML}{d80032}
\definecolor{color3}{HTML}{ef233c} \definecolor{color3}{HTML}{ef233c}
@ -81,7 +74,6 @@
\definecolor{color5}{HTML}{edf2f4} \definecolor{color5}{HTML}{edf2f4}
\definecolor{color6}{HTML}{aaaaa5} \definecolor{color6}{HTML}{aaaaa5}
% Color aliases % Color aliases
\colorlet{headercolor}{color2} \colorlet{headercolor}{color2}
\colorlet{linkcolor}{color1} \colorlet{linkcolor}{color1}
@ -94,13 +86,8 @@
\colorlet{bulletcolor}{color1} \colorlet{bulletcolor}{color1}
\colorlet{jobtitlecolor}{gray} \colorlet{jobtitlecolor}{gray}
\colorlet{universitycolor}{gray} \colorlet{universitycolor}{gray}
%Setup for coverletter
\newcommand*{\setcompanyname}[1]{\def\@companyname{#1}}
\newcommand*{\setcontactperson}[1]{\def\@contactperson{#1}}
\newcommand*{\setclaimedposition}[1]{\def\@claimedposition{#1}}
% setup the link styles
\hypersetup{ \hypersetup{
colorlinks=true, colorlinks=true,
urlcolor=linkcolor, urlcolor=linkcolor,
@ -108,7 +95,6 @@
% View commands % View commands
% Header % Header
\newcommand\headerview{ \newcommand\headerview{
\hspace{-2.2em} \hspace{-2.2em}
\begin{minipage}{0.18\linewidth} \begin{minipage}{0.18\linewidth}
@ -124,7 +110,6 @@
} }
%profilpicture %profilpicture
\newsavebox{\picbox} \newsavebox{\picbox}
\newcommand{\profpic}[2]{% \newcommand{\profpic}[2]{%
\savebox{\picbox}{% \savebox{\picbox}{%
@ -136,8 +121,6 @@
{\usebox{\picbox}};}]% {\usebox{\picbox}};}]%
{};} {};}
%contactsubviews
\newcommand{\name}{% \newcommand{\name}{%
\begin{minipage}{0.4\linewidth} \begin{minipage}{0.4\linewidth}
{\huge \@firstname{} \@lastname{}} \\[0cm] {\huge \@firstname{} \@lastname{}} \\[0cm]
@ -151,57 +134,33 @@
{\color{headercolor} \scriptsize \faIcon{envelope} \@mail} \\ {\color{headercolor} \scriptsize \faIcon{envelope} \@mail} \\
{\color{headercolor} \scriptsize \faIcon{link} \href{\@website}{\@website}} \\ {\color{headercolor} \scriptsize \faIcon{link} \href{\@website}{\@website}} \\
} }
% ===
% Covverletterview
\newcommand\coverletter[1]{
\\ \coverlettersubview
\section{} \vspace{1ex}
\textbf{ Dear \@contactperson, \\[0.1cm]}
#1
}
\newcommand\coverlettersubview{
\begin{tabular}{>{\scshape \bfseries \color{firstcolor}}l >{\small }l}
Company: & \@companyname \\
Position: & \@claimedposition \\
\end{tabular}
}
% Helper commands % Helper commands
\newcommand\ruleafter[1]{#1~{\color{headercolor}\hrulefill}} % a trick to put the line with <before> parameter in \titleformat % ===
% a trick to put the line with <before> parameter in \titleformat
\newcommand\ruleafter[1]{#1~{\color{headercolor}\hrulefill}}
% highlight the input
\newcommand{\hl}[1]{% \newcommand{\hl}[1]{%
{\color{highlightcolor} #1} {\color{highlightcolor} #1}
} }
%colorfulpipeseperator
\newcommand{\cps}{{\color{firstcolor} \quad\textbar\quad}}
\newcommand{\cpshalf}{{\color{firstcolor} \hspace{0.2em}\textbar\hspace{0.2em}}}
\newcommand{\coloredbullet}{{\color{bulletcolor} \textbullet}} \newcommand{\coloredbullet}{{\color{bulletcolor} \textbullet}}
% Edit section styles % Edit section styles
% Customise the \section command % Customise the \section command
\titleformat{\section} \titleformat{\section}
{\large\bfseries\raggedright\color{headercolor}} % Make the \section headers large (\Large), {\large\bfseries\raggedright\color{headercolor}} % Make the \section headers large (\Large),
% small capitals (\scshape) and left aligned (\raggedright) % small capitals (\scshape) and left aligned (\raggedright)
{\color{headercolor}}{0em} % Can be used to give a prefix to all sections, like 'Section ...' {\color{headercolor}}{0em} % Can be used to give a prefix to all sections, like 'Section ...'
{\color{headercolor} \ruleafter} % Can be used to insert code before the heading {\color{headercolor} \ruleafter} % Can be used to insert code before the heading
\titlespacing*{\section}{-1pt}{0pt}{0pt} \titlespacing*{\section}{-1pt}{0pt}{0pt}
\newcommand{\volunteer}[1]{ \newcommand{\volunteer}[1]{
\begin{small} \begin{small}
\indent \coloredbullet{} \scriptsize #1 \indent \coloredbullet{} \scriptsize #1
\end{small} \end{small}
} }
% Textview commands
%% \newcommand{\experience}[2]{%
%% \mbox{\hspace{1em} \scshape \textbf{#1} }%
%% }
\newcommand{\datetext}[1]{% \newcommand{\datetext}[1]{%
{\textit{\scriptsize \mdseries \color{gray} #1 }} {\textit{\scriptsize \mdseries \color{gray} #1 }}
@ -279,15 +238,6 @@ Position: & \@claimedposition \\
\mbox{\hspace{1.2em} \scriptsize \desc{#1}}\\[0.3cm] \mbox{\hspace{1.2em} \scriptsize \desc{#1}}\\[0.3cm]
} }
\newcommand{\explanation}[1]{%
\mbox{\scshape \hspace{1.2em} \footnotesize #1}\\[0.05cm]
}
\newcommand{\explanationdetail}[1]{%
\indent \begin{minipage}{0.96\linewidth} \footnotesize #1 \end{minipage} \\[0.1cm]
}
\newcommand{\itemwithtext}[1]{% \newcommand{\itemwithtext}[1]{%
\begin{minipage}{\linewidth} \footnotesize \item #1 \end{minipage} \begin{minipage}{\linewidth} \footnotesize \item #1 \end{minipage}
} }
@ -302,30 +252,6 @@ Position: & \@claimedposition \\
\sectiondesc{#1} \sectiondesc{#1}
} }
\newcommand\createskill[2]{%
\textsc{\textbf{#1}} & #2
}
\newcommand\createtablecontent[1]{%
\foreach \x [count=\xi] in {#1} {\ifthenelse{\xi=1}{\x}{\\ \x}}
}
\newcommand\createskillsanothertry[1]{%not used
\begin{tabular}{r|l}
\createtablecontent{#1}
\end{tabular}
}
\newcommand\createskills[1]{%
\explanationdetail{
\begin{tabular}{rl}
\makeatletter
\@for\thisitem:=#1\do{\thisitem\\[0.1cm]}
\makeatother
\end{tabular}
}
}
\newcommand\createbullets[1]{% \newcommand\createbullets[1]{%
\renewcommand{\labelitemi}{\coloredbullet} \renewcommand{\labelitemi}{\coloredbullet}
\begin{itemize} \begin{itemize}
@ -334,8 +260,3 @@ Position: & \@claimedposition \\
\makeatother \makeatother
\end{itemize} \end{itemize}
} }
\newcommand\createfootnote{%
\renewcommand{\footnotesize}{\fontsize{7pt}{11pt}\selectfont}
\renewcommand\footnoterule{\rule{0.3\linewidth}{0.5pt}}
\let\thefootnote\relax\footnote{\today\ / \href{https://github.com/muratcankaracabey/latex_cv}{source code}}}