arthur-cv-en.cls 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. \NeedsTeXFormat{LaTeX2e}
  2. \LoadClass{article}
  3. \ProvidesClass{arthur-cv-en}[2019/06/28 Custom english 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} % Set hyperlink
  13. \RequirePackage[absolute,overlay]{textpos} % Set text boxes
  14. \RequirePackage{titlesec} % Structure
  15. \RequirePackage{tikz} % Graphic
  16. \RequirePackage{xcolor} % Colors
  17. \RequirePackage{multirow} % Join rows in tabular
  18. \RequirePackage{xargs} % Multiple optional args
  19. \RequirePackage{tcolorbox} % Colored box
  20. \RequirePackage{enumitem} % Customize item
  21. \RequirePackage{ifthen} % Conditions
  22. %%%%%%%%%%%%%%%%%%
  23. %% Set colors %%
  24. %%%%%%%%%%%%%%%%%%
  25. \definecolor{sidecolor}{HTML}{E7E7E7}
  26. \definecolor{yt}{HTML}{c71610}
  27. \definecolor{test}{HTML}{0077be}
  28. \definecolor{mainblue}{HTML}{0E5484}
  29. \definecolor{linkedin}{HTML}{0085AE}
  30. \colorlet{headercolor}{gray}
  31. %%%%%%%%%%%%%%%%%%%
  32. %% Information %%
  33. %%%%%%%%%%%%%%%%%%%
  34. % Set linkedin, github, mail, phone, site, name and tilte commands
  35. \newcommand{\cvlinkedin}[1]{\renewcommand{\cvlinkedin}{#1}}
  36. \newcommand{\cvgithub}[1]{\renewcommand{\cvgithub}{#1}}
  37. \newcommand{\cvmail}[1]{\renewcommand{\cvmail}{#1}}
  38. \newcommand{\cvnumberphone}[1]{\renewcommand{\cvnumberphone}{#1}}
  39. \newcommand{\cvsite}[1]{\renewcommand{\cvsite}{#1}}
  40. \newcommand{\cvname}[1]{\renewcommand{\cvname}{#1}}
  41. \newcommand{\cvjobtitle}[1]{\renewcommand{\cvjobtitle}{#1}}
  42. %%%%%%%%%%%%%%
  43. %% Header %%
  44. %%%%%%%%%%%%%%
  45. % Set unit
  46. \setlength{\TPHorizModule}{1cm}
  47. \setlength{\TPVertModule}{1cm}
  48. % TODO : Clean makeprofile command
  49. \newcommand{\makeprofile}{
  50. % Set left color band
  51. \begin{tikzpicture}[remember picture,overlay]
  52. \node [rectangle, anchor=north west, fill=sidecolor, minimum width=8cm, minimum height=27cm] at (0cm, -3.2cm) {};{};
  53. \end{tikzpicture}
  54. % Set header
  55. \begin{textblock}{20.5}(0.25, 0.25)
  56. \begin{minipage}[t]{0.39\textwidth}
  57. % Set info
  58. \vspace{3mm}
  59. \renewcommand{\arraystretch}{1.4}
  60. \begin{tabular}{p{1.1cm} @{\hskip 0.3cm}p{6.3cm}}
  61. % Set phone
  62. \ifthenelse{\equal{\cvnumberphone}{}}{}{
  63. {$
  64. \begin{array}{l}
  65. \hspace{4mm} \textnormal{\LARGE \faMobile}
  66. \end{array}
  67. $} & \large\cvnumberphone\\
  68. }
  69. % Set site
  70. \ifthenelse{\equal{\cvsite}{}}{}{
  71. {$
  72. \begin{array}{l}
  73. \hspace{2.8mm} \textnormal{\textcolor{test}{\Large \faGlobe}}
  74. \end{array}
  75. $} & \href{http://\cvsite}{\large\cvsite} \\
  76. }
  77. % Set eMail
  78. \ifthenelse{\equal{\cvmail}{}}{}{
  79. {$
  80. \begin{array}{l}
  81. \hspace{2.5mm} \textnormal{\Large \textcolor{yt}{\faEnvelopeO}}
  82. \end{array}
  83. $} & \href{mailto:\cvmail}{\large\cvmail} \\
  84. }
  85. % Set Linkedin
  86. \ifthenelse{\equal{\cvlinkedin}{}}{}{
  87. {$
  88. \begin{array}{l}
  89. \hspace{3mm} \textnormal{\Large \textcolor{linkedin}{\faLinkedin}}
  90. \end{array}
  91. $} & \href{https://www.linkedin.com\cvlinkedin}{\large\cvlinkedin} \\
  92. }
  93. % Set GitHub
  94. \ifthenelse{\equal{\cvgithub}{}}{}{
  95. {$
  96. \begin{array}{l}
  97. \hspace{3mm} \textnormal{\Large \faGithub}
  98. \end{array}
  99. $} & \href{https://www.github.com/\cvgithub}{\large\cvgithub} \\
  100. }
  101. \end{tabular}
  102. \end{minipage}
  103. \begin{minipage}[t]{0.60\textwidth}
  104. % Set name and title
  105. \vspace{3mm}
  106. {\hspace{0mm}\Huge\color{mainblue}\cvname}
  107. \vspace{7mm}
  108. {\hspace{0mm}\Large\color{black!80}\cvjobtitle}
  109. \end{minipage}
  110. \end{textblock}
  111. }
  112. %%%%%%%%%%%%%%%%%%%%%%%
  113. %% Left side block %%
  114. %%%%%%%%%%%%%%%%%%%%%%%
  115. \tcbuselibrary{most}
  116. \tcbset{enhanced}
  117. % Set section at the left side
  118. \newcommand{\sectionleft}[1]{
  119. \par\vspace{3.5mm}
  120. {%
  121. \begin{tcolorbox}[colframe=mainblue, colback=blue!10!white, shadow={0.7mm}{-1mm}{0mm}{black!50!white}, sharpish corners, boxrule=0.8mm]
  122. \centering\LARGE\textbf{#1}
  123. \end{tcolorbox}
  124. }
  125. \par\vspace{2mm}
  126. }
  127. % Set subsection left side
  128. \newcommand{\subsectionleft}[2]{
  129. \par
  130. {%
  131. \begin{sloppypar}
  132. \begin{itemize}[font=\Large, leftmargin=7mm]
  133. \item \large#1 #2%
  134. \end{itemize}
  135. \end{sloppypar}
  136. }
  137. \par\vspace{2mm}
  138. }
  139. %%%%%%%%%%%%%%%%%%%%%%%%
  140. %% Right side block %%
  141. %%%%%%%%%%%%%%%%%%%%%%%%
  142. % Color of title section
  143. \def\@sectioncolor#1#2#3{%
  144. {%
  145. \color{mainblue} #1#2#3%
  146. }%
  147. }
  148. % Set section right
  149. \renewcommand{\section}[1]{
  150. \par\vspace{3.5mm}
  151. \textbf{%
  152. \huge\color{headercolor}%
  153. \@sectioncolor #1%
  154. }
  155. \par\vspace{2mm}
  156. }
  157. % Set environnement
  158. \setlength{\tabcolsep}{2pt}
  159. \newenvironment{rightenv}{%
  160. \begin{sloppypar}\begin{tabular}{@{\extracolsep{\fill}}p{2.1cm} l}
  161. }{%
  162. \end{tabular}\end{sloppypar}
  163. }
  164. % Set item right
  165. \newcommandx{\subsectionright}[6][2= ,4= ,5= ]{%
  166. #1 & \parbox[t]{10.1cm}{%
  167. \ifblank{#2}{}{#2 in }\textbf{\large\color{mainblue}#3}%
  168. \hfill%
  169. \ifblank{#4}{}{\footnotesize at \textit{#4}}\ifblank{#5}{}{\footnotesize, #5}\\%
  170. \ifblank{#6}{\vspace{0mm}}{\normalsize#6\vspace{\parsep}}%
  171. }\\%
  172. }
  173. %%%%%%%%%%%%%%%%%%%%
  174. %% Page setting %%
  175. %%%%%%%%%%%%%%%%%%%%
  176. \RequirePackage[left=0.cm,top=0.cm,right=0.cm,bottom=0.cm,nohead,nofoot]{geometry}