resume.tex/tex/mycv.cls

395 lines
13 KiB
OpenEdge ABL
Raw Normal View History

2022-06-13 11:32:40 +02:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MyCV
% LaTeX Class
% Version 1.0 (13/06/22)
%
% Authors:
% Samuel ORTION
2023-07-29 13:08:45 +02:00
% From spidercv (@ROMAINPC@github.com)
2022-06-13 11:32:40 +02:00
%
% License:
% The MIT License (see included LICENSE file)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mycv}[03/01/2022]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extarticle}} % Pass through any options to the base class
\ProcessOptions\relax % Process given options
\LoadClass{extarticle} % Load the base class
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\setlength{\parindent}{0mm} % Suppress paragraph indentation
\usepackage[hidelinks]{hyperref} % Required for links but hide the default boxes around links
\usepackage{lipsum}
\pagestyle{empty} % No headers or footers
\usepackage{moresize} % Provides more font size commands (\HUGE and \ssmall)
\usepackage{fontawesome} % fontawesome
\usepackage{ifthen}
%----------------------------------------------------------------------------------------
% COLORS
%----------------------------------------------------------------------------------------
\usepackage[dvipsnames]{xcolor}
\definecolor{Black}{HTML}{212121}
\definecolor{White}{HTML}{FFFFFF}
\definecolor{GreenArmy}{HTML}{252e25}
\definecolor{GreenIT}{HTML}{4caf50}
%%%%% color macros, use it at the beginning of your cv to quickly use the enterprise colors (Pro HRD tips)
\newcommand{\DefineColorMacros}[5]{% COLORS : TextSide / TextMain / HighLight / Background /Other
\def\ColorTextSide{#1}
\def\ColorTextMain{#2}
\def\ColorHighlight{#3}
\def\ColorBackground{#4}
\def\ColorOther{#5}
\color{\ColorTextMain} % Default text color
}
\DefineColorMacros{White}{Black}{GreenIT}{Black}{GreenArmy}
%----------------------------------------------------------------------------------------
% Printable mode
%----------------------------------------------------------------------------------------
\newcommand{\PrintableMode}{
\def\PM{} % PM command used in if statements
\def\ColorTextSide{\ColorTextMain} % Use same text color everywhere
}
2022-06-13 11:32:40 +02:00
%----------------------------------------------------------------------------------------
% FONTS
%----------------------------------------------------------------------------------------
% \usepackage[utf8]{inputenc} % Required for inputting international characters
% \usepackage[T1]{fontenc} % Output font encoding for international characters
2022-06-13 11:32:40 +02:00
2022-10-03 21:22:07 +02:00
% \usepackage{roboto}
2022-06-13 11:32:40 +02:00
\usepackage[scaled]{helvet}
\renewcommand*\familydefault{\sfdefault} % Force the sans-serif version of any font used
%----------------------------------------------------------------------------------------
% GEOMETRIE
%----------------------------------------------------------------------------------------
\usepackage{calc}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,backgrounds,matrix}
\newlength\margin
\setlength\margin{0.5cm}
\usepackage[margin=\margin,noheadfoot,a4paper]{geometry}
\newlength\sidewidth
\setlength\sidewidth{0.35\paperwidth-2\margin}
2022-06-13 11:32:40 +02:00
\newlength\mainwidth
\setlength\mainwidth{\paperwidth-4\margin-\sidewidth}
\newlength\anglesize
\setlength\anglesize{0.7cm}
\newlength\topheight
\setlength\topheight{\sidewidth}
2022-06-13 11:32:40 +02:00
\newlength\profilesize
\setlength\profilesize{0.7\topheight}
%----------------------------------------------------------------------------------------
% MAIN SECTIONS
%----------------------------------------------------------------------------------------
\usepackage{ragged2e}
\usepackage[absolute,overlay]{textpos} % option needed to use absolute positionning and to have text on front
2022-09-29 23:39:21 +02:00
\newenvironment{SideBar}[2]
{% Background color, Text color
2022-06-13 11:32:40 +02:00
\begin{tikzpicture}[remember picture,overlay]% put text anywhere
\ifx\PM\undefined % side and top background
2023-07-29 13:08:45 +02:00
\fill[fill=#1, shift={(current page.north west)}]
\else
\draw[draw=#1, shift={(current page.north west)}, very thick]
\fi
2023-07-29 13:08:45 +02:00
(0,-\paperheight) --
(0,-\anglesize) --
(\anglesize,0) --
(\paperwidth,0) --
(\paperwidth,-\topheight-2\margin) --
(\sidewidth+2\margin+\anglesize,-\topheight-2\margin) --
(\sidewidth+2\margin,-\topheight-2\margin-\anglesize) --
(\sidewidth+2\margin,-\paperheight) --
cycle;
2022-06-13 11:32:40 +02:00
\draw [draw=#1, shift={(current page.north west)}, very thick]
2023-07-29 13:08:45 +02:00
(\paperwidth-0.5\margin,-\topheight-3\margin) --
(\paperwidth-0.5\margin,-\paperheight+0.5\margin+0.5\anglesize) --
(\paperwidth-0.5\margin-0.5\anglesize,-\paperheight+0.5\margin) --
(\sidewidth+3\margin,-\paperheight+0.5\margin);
2022-06-13 11:32:40 +02:00
\end{tikzpicture}%
%%%%%%%%%%%%%
% \TPmargin{}{}
\begin{textblock*}{\sidewidth}(\margin,\topheight + 3\margin -0.4cm)
2023-07-29 13:08:45 +02:00
\begin{center}
\color{#2}
% Please use vspace to verticaly align manually your content
}
{
\end{center}
2022-06-13 11:32:40 +02:00
\end{textblock*}
}
\newenvironment{TopBar}[1]{ % Text color
\begin{textblock*}{\mainwidth}(\sidewidth+3\margin,\margin-0.4cm)
2023-07-29 13:08:45 +02:00
\begin{center}
\color{#1}
}{
\end{center}
2022-06-13 11:32:40 +02:00
\end{textblock*}
}
\newenvironment{MainPart}{
\begin{textblock*}{\mainwidth}(\sidewidth+3\margin,\topheight + 3\margin-0.4cm)
2023-07-29 13:08:45 +02:00
\begin{center}
}{
\end{center}
2022-06-13 11:32:40 +02:00
\end{textblock*}
}
\usetikzlibrary{shapes,decorations}
%%%%%%% Picture
\newcommand{\DefineProfile}[3]% Background color, Highlight color, Img path
2023-07-29 13:08:45 +02:00
{
2022-06-13 11:32:40 +02:00
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, draw=#2, rounded corners=0.5mm, very thick,
2023-07-29 13:08:45 +02:00
shift={(current page.north west)}, xshift=\anglesize, yshift=-\anglesize,
2022-06-13 11:32:40 +02:00
](s1){};
\node [rectangle, draw=#2, rounded corners=0.5mm, very thick,
2023-07-29 13:08:45 +02:00
shift={(current page.north west)}, xshift=(\sidewidth+2\margin), yshift=-(\sidewidth+2\margin),
2022-06-13 11:32:40 +02:00
](s2){};
\draw [draw=#2, very thick]
(s1) -- (s2);
%%%%%%%%%%%%%%%
\node[
shift={(current page.north west)},
xshift=(\sidewidth+2\margin)/2,
yshift=-(\sidewidth+2\margin)/2,
chamfered rectangle, draw=#2, very thick,
2022-09-29 23:39:21 +02:00
minimum size=\profilesize,
fill=#1,
path picture={
2023-07-29 13:08:45 +02:00
\node at (path picture bounding box.center){
\includegraphics[height=\profilesize]{#3}
};
}]
2022-09-29 23:39:21 +02:00
{};
\end{tikzpicture}
2022-06-13 11:32:40 +02:00
}
%----------------------------------------------------------------------------------------
% COMMANDS AND ENVIRONMENTS
%----------------------------------------------------------------------------------------
%%%%%%% Top bar
%%% Name
\newcommand{\Name}[4]% Highlight color, Name, Profession, Age
{
{\HUGE{\textbf{\color{#1}#2}}\\[0.5cm]
2023-07-29 13:08:45 +02:00
\Large{#3}
\hfill
\Large{#4}}
2022-06-13 11:32:40 +02:00
}
%%%%%%%%% Side bar
%%% Spider chart
\usepackage{xparse}
\newcounter{spidercount}
\ExplSyntaxOn
\NewDocumentCommand{\newList}{m}
2022-09-29 23:39:21 +02:00
{
2023-07-29 13:08:45 +02:00
\seq_new:c { l_kees_list_#1_seq }
2022-09-29 23:39:21 +02:00
}
2022-06-13 11:32:40 +02:00
\NewDocumentCommand{\addToList}{mm}
2022-09-29 23:39:21 +02:00
{
2023-07-29 13:08:45 +02:00
\seq_put_right:cn { l_kees_list_#1_seq } { #2 }
2022-09-29 23:39:21 +02:00
}
2022-06-13 11:32:40 +02:00
\NewDocumentCommand{\getFromList}{mm}
2022-09-29 23:39:21 +02:00
{
\seq_item:cn { l_kees_list_#1_seq } { #2 }
}
2022-06-13 11:32:40 +02:00
\ExplSyntaxOff
\newList{skilllist}
\newList{masterlist}
\newcommand{\addSkill}[2]{ % Skill label, Strenght
\stepcounter{spidercount}
\addToList{skilllist}{#1}
\addToList{masterlist}{#2}
}
\newcounter{var}
\newenvironment{SpiderDiagram}[2]{ % Axes color, Highlight color
\def\n{\thespidercount}
\def\N{5}
\def\nC{#1}
\def\hC{#2}
\vspace*{0.15cm}
}{
\begin{tikzpicture}[scale=0.35]
\foreach \x in{1,2,...,\n}{
2023-07-29 13:08:45 +02:00
\setcounter{var}{360/\n*\x}
\ifthenelse{\thevar = 180 \OR \thevar = 360}{
\draw [draw=\nC, very thick] (0,0)--(\thevar:\N) node
[shift=(\thevar-145:-15pt),
color=\hC] {\small\getFromList{skilllist}{\x}}
}
{
\draw [draw=\nC, very thick] (0,0)--(\thevar:\N) node
[shift=(\thevar:10pt),
color=\hC] {\small\getFromList{skilllist}{\x}}
}
;
2022-06-13 11:32:40 +02:00
}
\newcounter{temp}
\newcounter{tempbis}
\foreach[count=\x] \y in{2,3,...,\n}{
2023-07-29 13:08:45 +02:00
\setcounter{temp}{\getFromList{masterlist}{\x}}
\setcounter{tempbis}{\getFromList{masterlist}{\y}}
\draw [draw=\hC, very thick]
2022-06-13 11:32:40 +02:00
(360/\n*\x:\thetemp) -- (360/\n*\x+360/\n:\thetempbis);
2023-07-29 13:08:45 +02:00
}
2022-06-13 11:32:40 +02:00
\setcounter{temp}{\getFromList{masterlist}{\n}}
\setcounter{tempbis}{\getFromList{masterlist}{1}}
\draw [draw=\hC, very thick]
2023-07-29 13:08:45 +02:00
(360:\thetemp) -- (360+360/\n:\thetempbis);
2022-06-13 11:32:40 +02:00
\end{tikzpicture}
}
%%%%%%%%%%%%%% Main part
%%%%%% Section title
\newcommand{\MainTitleBis}[4]{%Background color, Highlight color, Left text, Right text
2023-07-29 13:08:45 +02:00
\begin{tikzpicture}[baseline]
2022-06-13 11:32:40 +02:00
\node[draw=#2,rounded corners,fill=#1,inner sep=3pt, very thick, anchor=west]
at (0,0) (box1)
2023-07-29 13:08:45 +02:00
{\textbf{\Large\color{#2}#3}};
2022-06-13 11:32:40 +02:00
\node[draw=#2,rounded corners,fill=#1,inner sep=3pt, very thick, anchor=east]
at (\textwidth,0) (square)
{\textbf{\Large\color{#2}#4}};
\draw [very thick, draw=#2, inner sep=0pt] (box1) -- (square);
\end{tikzpicture}\\
}
\newcommand{\MainTitle}[3]{%Background color, Highlight color, Title text
2023-07-29 13:08:45 +02:00
\begin{tikzpicture}[baseline]
\node[draw=#2,rounded corners,fill=#1,inner sep=3pt, very thick, anchor=west]
at (0,0) (box1)
{\textbf{\Large\color{#2}#3}};
\node at (\textwidth,0) [rectangle, draw=#2,rounded corners=0.5mm,fill=#1, anchor=east, very thick] (square) {};
2022-06-13 11:32:40 +02:00
\draw [very thick, draw=#2, inner sep=0pt] (box1) -- (square);
\end{tikzpicture}\\
}
\def\hrulefill{\leavevmode\leaders\hrule height 0.35mm\hfill\kern\z@} % ~ very thick
%%%%%%% Experience
\newcommand{\Experience}[5]{%Highlight color, Ttile, Left subtitle, Right subtitle, Description
\begin{flushleft}
\large{\textbf{#2\hfill{\small\color{#1}#4}}}\\\vspace{-.4ex}
\small{{\color{#1}\hrulefill}
2023-07-29 13:08:45 +02:00
\hspace{1ex}\raisebox{-.4ex}{\color{Black}\textbf{#3}}
2022-06-13 11:32:40 +02:00
}\\
2023-07-29 13:08:45 +02:00
\normalsize{#5}% Description
2022-06-13 11:32:40 +02:00
\end{flushleft}
}
%%%%%% Common tools
%%% Text separators
\newcommand{\TextSeparator}[2]% Highlight color, Text
{
\noindent\makebox[\linewidth]{{\color{#1}\hrulefill}
2023-07-29 13:08:45 +02:00
\hspace{1ex}\raisebox{-.4ex}{\textbf{\large{#2}}}
\hspace{1ex}{\color{#1}\hrulefill}}
2022-06-13 11:32:40 +02:00
}
\newcommand{\TextSeparatorBis}[3]% Highlight color, Left text, Right text
{
\noindent\makebox[\linewidth]{\raisebox{-.4ex}{\textbf{\large{#2}}}\hspace{1ex}
2023-07-29 13:08:45 +02:00
{\color{#1}\hrulefill}
\hspace{1ex}\raisebox{-.4ex}{\textbf{\large{#3}}}}
2022-06-13 11:32:40 +02:00
}
\newcommand{\SimpleSeparator}[1]% Highlight color
{
\noindent\makebox[\linewidth]{
2023-07-29 13:08:45 +02:00
{\color{#1}\hrulefill}}
2022-06-13 11:32:40 +02:00
}
%%% ItemList
\usepackage{enumerate}
\newenvironment{ItemList}[1] % Bullet color
2022-09-29 23:39:21 +02:00
{ \renewcommand{\descriptionlabel}[1]{
2023-07-29 13:08:45 +02:00
\def\temp{##1}\ifx\temp\empty
\hspace\labelsep{\textbf{\color{#1}\tiny\faSquare}}% Default bullet
\else
\hspace\labelsep{\textbf{\color{#1}##1}}
\fi
2022-06-13 11:32:40 +02:00
}%
\begin{description}}
2023-07-29 13:08:45 +02:00
{\end{description}}
2022-06-13 11:32:40 +02:00
%%% DoubleColumns
\newenvironment{DoubleColumns}{
%%%%%%%%% Use this command to split
\newcommand{\nextcolumn}{\end{center}\end{minipage}\hfill\begin{minipage}[t]{0.5\textwidth-0.5\margin}\begin{center}}
2023-07-29 13:08:45 +02:00
\begin{minipage}[t]{0.5\textwidth-0.5\margin}
\begin{center}
}{
\end{center}
\end{minipage}\\\vspace*{0.15cm}
}
%%% TripleColumns
\newenvironment{TripleColumns}{
%%%%%%%%% Use this command to split
\newcommand{\nextcolumn}{\end{center}\end{minipage}\hfill\begin{minipage}[t]{0.3333\textwidth-0.5\margin}\begin{center}}
2022-06-13 11:32:40 +02:00
\begin{minipage}[t]{0.3333\textwidth-0.5\margin}
2023-07-29 13:08:45 +02:00
\begin{center}
}{
\end{center}
2022-06-13 11:32:40 +02:00
\end{minipage}\\\vspace*{0.15cm}
}
%%% Label
\newcommand{\Label}[2]{% Highlight color, Text
\tikz[baseline]\node[anchor=base,draw=#1,rounded corners,inner xsep=1ex,inner ysep =0.75ex,text height=1.5ex,text depth=.25ex, thick]{#2};
}
%%% Skill Gauges
\newenvironment{SkillGauges}[1]{% Highlight color
\def\highlightColor{\color{#1}}
\begin{tabular}{l l}
2023-07-29 13:08:45 +02:00
}{
2022-06-13 11:32:40 +02:00
\end{tabular}
}
\newcommand{\addGauge}[3][\faSquareO]{% Optional fa symbol | Text | Number of symbols
#2 & \foreach \i in{1,...,#3}{\highlightColor#1\space} \\
}
2022-09-29 23:39:21 +02:00
%% Implements tooltip
\fboxrule=0pt