arthur-cv-fr.cls 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. \NeedsTeXFormat{LaTeX2e}
  2. \LoadClass{article}
  3. \ProvidesClass{arthur-cv-fr}[2019/06/28 Custom french CV class]
  4. %%%%%%%%%%%%%%%%%%%%%
  5. %% Load packages %%
  6. %%%%%%%%%%%%%%%%%%%%%
  7. \RequirePackage[quiet]{fontspec}
  8. \RequirePackage[sfdefault]{ClearSans} % Police
  9. \usepackage{fontawesome} % Icons
  10. \RequirePackage{ragged2e}
  11. \RequirePackage{parskip}
  12. \RequirePackage[hidelinks]{hyperref} % Hyperlink
  13. \RequirePackage[absolute,overlay]{textpos} % showboxes % Set text boxes
  14. \RequirePackage{titlesec} % Structure
  15. \RequirePackage{marvosym} % Icone
  16. \RequirePackage{tikz} % Graphic
  17. \RequirePackage{xcolor} % Colors
  18. \RequirePackage{multirow} % Join rows in tabular
  19. \RequirePackage{xargs} % Multiple optional args
  20. \RequirePackage{tcolorbox} % Colored box
  21. \RequirePackage{enumitem} % Customize item
  22. \RequirePackage{ifthen} % Conditions
  23. %%%%%%%%%%%%%%%%%%
  24. %% Set colors %%
  25. %%%%%%%%%%%%%%%%%%
  26. % TODO
  27. \definecolor{sidecolor}{HTML}{E7E7E7}
  28. %\definecolor{pblue}{HTML}{0395DE}
  29. \definecolor{yt}{HTML}{c71610}
  30. \definecolor{test}{HTML}{0077be}
  31. \definecolor{mainblue}{HTML}{0E5484}
  32. %\definecolor{maingray}{HTML}{B9B9B9}
  33. \definecolor{linkedin}{HTML}{0085AE}
  34. \colorlet{headercolor}{gray}
  35. %%%%%%%%%%%%%%%%%%%
  36. %% Information %%
  37. %%%%%%%%%%%%%%%%%%%
  38. % TODO : Clean new commands
  39. \newcommand{\cvlinkedin}[1]{\renewcommand{\cvlinkedin}{#1}}
  40. \newcommand{\cvgithub}[1]{\renewcommand{\cvgithub}{#1}}
  41. \newcommand{\cvmail}[1]{\renewcommand{\cvmail}{#1}}
  42. \newcommand{\cvnumberphone}[1]{\renewcommand{\cvnumberphone}{#1}}
  43. \newcommand{\cvaddress}[1]{\renewcommand{\cvaddress}{#1}}
  44. \newcommand{\cvsite}[1]{\renewcommand{\cvsite}{#1}}
  45. % \newcommand{\aboutme}[1]{\renewcommand{\aboutme}{#1}}
  46. \newcommand{\profilepic}[1]{\renewcommand{\profilepic}{#1}}
  47. \newcommand{\cvname}[1]{\renewcommand{\cvname}{#1}}
  48. \newcommand{\cvjobtitle}[1]{\renewcommand{\cvjobtitle}{#1}}
  49. \newcommand{\cvage}[1]{\renewcommand{\cvage}{#1}}
  50. %%%%%%%%%%%%%%%%%
  51. %% To debugg %%
  52. %%%%%%%%%%%%%%%%%
  53. %\pretolerance=1500
  54. %\setlength{\emergencystretch}{3em}
  55. %\overfullrule=1mm
  56. %%%%%%%%%%%%%%
  57. %% Header %%
  58. %%%%%%%%%%%%%%
  59. % Set unit
  60. \setlength{\TPHorizModule}{1cm}
  61. \setlength{\TPVertModule}{1cm}
  62. % Set image size
  63. \newcommand{\imsize}{\linewidth}
  64. \newlength\imagewidth
  65. \newlength\imagescale
  66. \renewcommand{\imsize}{0.618\linewidth}
  67. \pgfmathsetlength{\imagewidth}{3cm}%
  68. \pgfmathsetlength{\imagescale}{\imagewidth/600}%
  69. % TODO : Clean makeprofile command
  70. \newcommand{\makeprofile}{
  71. % Set left color band
  72. \begin{tikzpicture}[remember picture,overlay]
  73. \node [rectangle, anchor=north west, fill=sidecolor, minimum width=8cm, minimum height=27cm] at (0cm, -3.2cm) {};{};
  74. \end{tikzpicture}
  75. % Set header
  76. \begin{textblock}{20.5}(0.25, 0.25)
  77. \begin{minipage}[t]{0.38\textwidth}
  78. % Set info
  79. \vspace{2mm}
  80. \renewcommand{\arraystretch}{1.}
  81. \begin{tabular}{p{1.1cm} @{\hskip 0.3cm}p{6.2cm}}
  82. \ifthenelse{\equal{\cvnumberphone}{}}{}{
  83. {$
  84. \begin{array}{l}
  85. \hspace{4mm} \textnormal{\Large \faMobile}
  86. \end{array}
  87. $}
  88. & \cvnumberphone\\}
  89. \ifthenelse{\equal{\cvsite}{}}{}{
  90. {$
  91. \begin{array}{l}
  92. \hspace{2.8mm} \textnormal{\textcolor{test}{\large \faGlobe}}
  93. \end{array}
  94. $}
  95. & \href{http://\cvsite}{\cvsite} \\}
  96. \ifthenelse{\equal{\cvmail}{}}{}{
  97. {$
  98. \begin{array}{l}
  99. \hspace{2.5mm} \textnormal{\large \textcolor{yt}{\faEnvelopeO}}
  100. \end{array}
  101. $}
  102. & \href{mailto:\cvmail}{\cvmail} \\}
  103. \ifthenelse{\equal{\cvlinkedin}{}}{}{
  104. {$
  105. \begin{array}{l}
  106. \hspace{3mm} \textnormal{\large \textcolor{linkedin}{\faLinkedin}}
  107. \end{array}
  108. $} & \href{https://www.linkedin.com\cvlinkedin}{\cvlinkedin} \\
  109. }
  110. \ifthenelse{\equal{\cvgithub}{}}{}{
  111. {$
  112. \begin{array}{l}
  113. \hspace{3mm} \textnormal{\large \faGithub}
  114. \end{array}
  115. $} & \href{https://www.github.com/\cvgithub}{\cvgithub} \\
  116. }
  117. \ifthenelse{\equal{\cvaddress}{}}{}{
  118. {$
  119. \begin{array}{l}
  120. \hspace{3mm} \textnormal{\large \faMapMarker}
  121. \end{array}
  122. $} & \cvaddress \\
  123. }
  124. \ifthenelse{\equal{\cvage}{}}{}{
  125. {$
  126. \begin{array}{l}
  127. \hspace{3mm}
  128. \end{array}
  129. $} & \cvage \\
  130. }
  131. \end{tabular}
  132. \end{minipage}
  133. \begin{minipage}[t]{0.5\textwidth}
  134. % Set name and title
  135. \vspace{3mm}
  136. {\hspace{0mm}\huge\color{mainblue}\cvname}
  137. \vspace{7mm}
  138. {\hspace{0mm}\Large\color{black!80}\cvjobtitle}
  139. \end{minipage}%
  140. \end{textblock}
  141. \begin{tikzpicture}[remember picture,overlay]%[x=\imagescale,y=-\imagescale]
  142. %\clip (600/2, 567/2) rectangle ; %(567/2);
  143. %\clip (10, 10);
  144. %, anchor=north east, inner sep=0pt, outer sep=0pt
  145. \node[rectangle, anchor=north west] at (17.4cm, 0.2cm) {\includegraphics[width=\imagewidth]{\profilepic}};
  146. %\node[rectangle, draw=black, anchor=north west] at (17.2cm, -0.2cm) {};
  147. %\draw (17.2cm, 0.2cm) -- (20.6cm, 0.2cm) -- (20.6cm, -3.2cm) -- (17.2cm, -3.2cm);
  148. \draw[line width=0.5mm, mainblue] (17.45cm, 0.15cm) -- + (3.15cm, 0) -- + (3.15cm, -3.15cm) -- + (0,-3.15cm) -- cycle; %+ (0,0);
  149. \end{tikzpicture}
  150. }
  151. %%%%%%%%%%%%%%%%%%%%%%%
  152. %% Left side block %%
  153. %%%%%%%%%%%%%%%%%%%%%%%
  154. % TODO : Finish left side
  155. \tcbuselibrary{most}
  156. \tcbset{enhanced}
  157. \newcommand{\sectionleft}[1]{
  158. \par\vspace{3mm}
  159. {%
  160. \begin{tcolorbox}[colframe=mainblue, colback=blue!10!white, shadow={0.7mm}{-1mm}{0mm}{black!50!white}, sharpish corners, boxrule=0.8mm]% , show bounding box
  161. \centering\LARGE\textbf{#1}
  162. \end{tcolorbox}
  163. }
  164. \par\vspace{0mm}
  165. }
  166. \newcommand{\subsectionleft}[2]{
  167. \par
  168. {%
  169. \begin{sloppypar}
  170. \begin{itemize}[label=\textbullet, font=\Large, leftmargin=7mm]
  171. \item \large#1 #2%
  172. \end{itemize}
  173. \end{sloppypar}
  174. }%\par\vspace{1mm}
  175. }
  176. %%%%%%%%%%%%%%%%%%%%%%%%
  177. %% Right side block %%
  178. %%%%%%%%%%%%%%%%%%%%%%%%
  179. % Color of title section
  180. \def\@sectioncolor#1#2#3{%
  181. {%
  182. \color{mainblue} #1#2#3%
  183. }%
  184. }
  185. % Set section
  186. \renewcommand{\section}[1]{
  187. \par\vspace{2mm}
  188. \textbf{%
  189. \huge\color{headercolor}%
  190. \@sectioncolor #1%
  191. }
  192. \par\vspace{1mm}
  193. }
  194. % Set environnement
  195. \setlength{\tabcolsep}{2pt}
  196. \newenvironment{rightenv}{%
  197. \begin{sloppypar}\begin{tabular}{@{\extracolsep{\fill}}p{2.0cm} l}
  198. }{%
  199. \end{tabular}\end{sloppypar}
  200. }
  201. % Set item
  202. \newcommandx{\subsectionright}[6][2= ,4= ,5= ]{%
  203. #1 & \parbox[t]{10.1cm}{%
  204. \ifblank{#2}{}{#2 en }\textbf{\large\color{mainblue}#3}%
  205. \hfill%
  206. \ifblank{#4}{}{\footnotesize à \textit{#4}}\ifblank{#5}{}{\footnotesize, #5}\\%
  207. \ifblank{#6}{\vspace{0mm}}{\normalsize#6\vspace{\parsep}}%
  208. }\\%
  209. }
  210. %%%%%%%%%%%%%%%%%%%%
  211. %% Page setting %%
  212. %%%%%%%%%%%%%%%%%%%%
  213. % TODO : clean setting
  214. \RequirePackage[left=0.cm,top=0.cm,right=0.cm,bottom=0.cm,nohead,nofoot]{geometry}
  215. \RequirePackage{hyperref}