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
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}
\setname{Sameer}{Rahmani}
@ -7,22 +26,17 @@
\setmail{lxsameer@lxsameer.com}
\setwebsite{https://lxsameer.com}
\setposition{Senior Software Engineer}
%you can play with color of the template (red is also nice..)
\setlinkedinaccount{https://www.linkedin.com/in/lxsameer/}
\setgithubaccount{https://devheroes.codes/lxsameer}
\definecolor{AlmostBlack}{HTML}{090907}
\setgit{https://devheroes.codes/lxsameer}
% Set the global font color
\definecolor{AlmostBlack}{HTML}{090907}
\AtBeginDocument{\globalcolor{AlmostBlack}}
\begin{document}
%Set variables
%You can add sections, texts, explanations just by copying the style below.
%Create header
% Draw the avatar and personal detainls
\headerview{}
\vspace{1ex}
%Sections
\begin{multicols}{2}[]
\vbox{
@ -175,8 +189,6 @@
{\href{https://devheroes.codes/lxsameer}{\faIcon{link}~https://devheroes.codes/lxsameer}} \\
{\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://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}
%Footnote
%\createfootnote{}
\end{document}

View File

@ -16,17 +16,12 @@
% 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.
% This is a work based on Murat Can Karacabey's work
\author{Sameer Rahmani}
% moved here I guess article class causes option clash with xcolor if used after loading the class
\RequirePackage[dvipsnames]{xcolor}
\LoadClass[11pt]{article}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{lxsameer_cv}[2022/03/22 lxsameer's CV Class]
%\RequirePackage[sfdefault]{noto}
\RequirePackage[default,light,semibold]{sourcesanspro}
\setsansfont{Source Sans Pro}
\RequirePackage{multicol}
@ -48,7 +43,6 @@
\restoreparindent{}
\pagestyle{empty}
\makeatletter
\newcommand{\globalcolor}[1]{%
\color{#1}\global\let\default@color\current@color{}
@ -73,7 +67,6 @@
\newcommand*{\setgithubaccount}[1]{\def\@githubaccount{#1}}
% Color pallet
\definecolor{color1}{HTML}{d80032}
\definecolor{color2}{HTML}{d80032}
\definecolor{color3}{HTML}{ef233c}
@ -81,7 +74,6 @@
\definecolor{color5}{HTML}{edf2f4}
\definecolor{color6}{HTML}{aaaaa5}
% Color aliases
\colorlet{headercolor}{color2}
\colorlet{linkcolor}{color1}
@ -94,13 +86,8 @@
\colorlet{bulletcolor}{color1}
\colorlet{jobtitlecolor}{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{
colorlinks=true,
urlcolor=linkcolor,
@ -108,7 +95,6 @@
% View commands
% Header
\newcommand\headerview{
\hspace{-2.2em}
\begin{minipage}{0.18\linewidth}
@ -124,7 +110,6 @@
}
%profilpicture
\newsavebox{\picbox}
\newcommand{\profpic}[2]{%
\savebox{\picbox}{%
@ -136,8 +121,6 @@
{\usebox{\picbox}};}]%
{};}
%contactsubviews
\newcommand{\name}{%
\begin{minipage}{0.4\linewidth}
{\huge \@firstname{} \@lastname{}} \\[0cm]
@ -151,57 +134,33 @@
{\color{headercolor} \scriptsize \faIcon{envelope} \@mail} \\
{\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
\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]{%
{\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}}
% Edit section styles
% Customise the \section command
\titleformat{\section}
{\large\bfseries\raggedright\color{headercolor}} % Make the \section headers large (\Large),
% small capitals (\scshape) and left aligned (\raggedright)
{\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}}{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
\titlespacing*{\section}{-1pt}{0pt}{0pt}
\titlespacing*{\section}{-1pt}{0pt}{0pt}
\newcommand{\volunteer}[1]{
\begin{small}
\indent \coloredbullet{} \scriptsize #1
\end{small}
}
% Textview commands
%% \newcommand{\experience}[2]{%
%% \mbox{\hspace{1em} \scshape \textbf{#1} }%
%% }
\newcommand{\datetext}[1]{%
{\textit{\scriptsize \mdseries \color{gray} #1 }}
@ -279,15 +238,6 @@ Position: & \@claimedposition \\
\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]{%
\begin{minipage}{\linewidth} \footnotesize \item #1 \end{minipage}
}
@ -302,30 +252,6 @@ Position: & \@claimedposition \\
\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]{%
\renewcommand{\labelitemi}{\coloredbullet}
\begin{itemize}
@ -334,8 +260,3 @@ Position: & \@claimedposition \\
\makeatother
\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}}}