You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

568 lines
16KB

  1. %% Copyright 2016 Christophe Roger
  2. %
  3. % Author:
  4. % Christophe Roger (Darwiin)
  5. %
  6. % This work may be distributed and/or modified under the
  7. % conditions of the LaTeX Project Public License, either version 1.3c
  8. % of this license or (at your option) any later version.
  9. % The latest version of this license is in
  10. % https://www.latex-project.org/lppl.txt
  11. % and version 1.3 or later is part of all distributions of LaTeX
  12. % version 2005/12/01 or later.
  13. %
  14. % This work has the LPPL maintenance status `maintained'.
  15. %
  16. % The Current Maintainer of this work is M. C. Roger.
  17. %
  18. % This work consists of the files awesome-source-cv.cls
  19. \ProvidesClass{yaac-another-awesome-cv}[2020/03/24 v2.3.1 'YAAC: Another Awesome CV' Class]
  20. \def\@@ptsize{10pt}
  21. \DeclareOption{10pt}{\def\@@ptsize{10pt}}
  22. \DeclareOption{11pt}{\def\@@ptsize{11pt}}
  23. \DeclareOption{12pt}{\def\@@ptsize{12pt}}
  24. \ProcessOptions\relax
  25. \LoadClass[a4paper,\@@ptsize]{article}
  26. \newif\if@showLinks \@showLinksfalse
  27. \newif\if@isCompact \@isCompactfalse
  28. \DeclareOption{green}{
  29. \def\@green{green}
  30. }
  31. \DeclareOption{red}{
  32. \def\@red{red}
  33. }
  34. \DeclareOption{indigo}{
  35. \def\@indigo{indigo}
  36. }
  37. \DeclareOption{orange}{
  38. \def\@orange{orange}
  39. }
  40. \DeclareOption{monochrome}{
  41. \def\@monochrome{monochrome}
  42. }
  43. \DeclareOption{localFont}{
  44. \def\@local{local}
  45. }
  46. \DeclareOption{alternative}{
  47. \def\@alternative{alternate}
  48. }
  49. \DeclareOption{showLinks}{ \@showLinkstrue}
  50. \DeclareOption{compact}{ \@isCompacttrue}
  51. \ProcessOptions
  52. % Dependences
  53. %A Few Useful Packages
  54. \RequirePackage[english,french]{babel}
  55. \RequirePackage[utf8]{luainputenc}
  56. \RequirePackage{fontspec} % for loading fonts
  57. \RequirePackage{url,parskip} % other packages for formatting
  58. \RequirePackage[usenames,dvipsnames]{xcolor}
  59. \RequirePackage{fullpage}
  60. \RequirePackage[margin=1.5cm]{geometry}
  61. \RequirePackage[fixed]{fontawesome5}
  62. \RequirePackage{hyperref}
  63. \RequirePackage{titlesec}
  64. \RequirePackage{array}
  65. \RequirePackage{enumitem}
  66. \RequirePackage{longtable}
  67. \RequirePackage{etoolbox}
  68. \RequirePackage{tikz}
  69. \RequirePackage[skins]{tcolorbox}
  70. \RequirePackage{fancyhdr}
  71. \RequirePackage{ifthen}
  72. \DeclareUnicodeCharacter{00E9}{\'{e}}
  73. % Define default accent colors
  74. \definecolor{basecolor}{HTML}{000066} %BLUE
  75. \ifundef{\@green} {
  76. \ifundef{\@red} {
  77. \ifundef{\@indigo}{
  78. \ifundef{\@orange} {
  79. \ifundef{\@monochrome} {}
  80. { \definecolor{basecolor}{HTML}{000000}}
  81. }
  82. { \definecolor{basecolor}{HTML}{e68a00} }
  83. }
  84. { \definecolor{basecolor}{rgb}{0.2, 0.07, 0.48} }
  85. }
  86. { \definecolor{basecolor}{HTML}{b30000} } %RED
  87. }
  88. { \definecolor{basecolor}{rgb}{0.0, 0.62, 0.38} }
  89. \definecolor{darkGrey}{HTML}{989898}
  90. \colorlet{linkcolor}{basecolor}
  91. \colorlet{accentcolor}{linkcolor!90}
  92. \colorlet{symbolcolor}{linkcolor!85}
  93. % Setup hyperref package, and colours for links
  94. %\definecolor{linkcolour}{rgb}{0,0.2,0.6}
  95. \if@showLinks
  96. \hypersetup{%
  97. breaklinks
  98. }%
  99. \else
  100. \hypersetup{%
  101. pdfborder = {0 0 0},
  102. breaklinks
  103. }%
  104. \fi
  105. % Setup fancyhdr package
  106. \fancyhf{}
  107. \fancyhfoffset{0em}
  108. % Remove head rule
  109. \renewcommand{\headrulewidth}{0pt}
  110. %\fancyfoot[C]{\thepage}
  111. \pagestyle{fancy}
  112. %\pagestyle{empty} % non-numbered pages
  113. %\font\fb=''[cmr10]'' % for use with \LaTeX command
  114. % Setup CV sections
  115. \titleformat{\section}{\Large\raggedright}{}{0em}{}[\titlerule]
  116. \titlespacing{\section}{0pt}{2pt}{2pt}
  117. % Configure list
  118. \setlist[itemize,1]{label=\faAngleRight, nosep, leftmargin=2em}
  119. \setlist[itemize,2]{label=\faAngleRight, nosep, leftmargin=1.5em}
  120. % Setup Array : new column type
  121. \newcolumntype{R}[1]{>{\hfill}m{#1}}
  122. %Italian hyphenation for the word: ''corporations''
  123. \hyphenation{im-pre-se}
  124. % Setup fonts
  125. \defaultfontfeatures{Mapping=tex-text}
  126. %
  127. % Define font to use according to localFont option
  128. \ifundef{\@local}
  129. {
  130. %\setmainfont[BoldFont = Helvetica Neue, ItalicFont=Helvetica Neue Thin Italic ,SmallCapsFont = Helvetica Neue Light]{Helvetica Neue Thin}
  131. \setmainfont{Source Sans Pro Light}[
  132. BoldFont = SourceSansPro-Regular,
  133. ItalicFont= Source Sans Pro Light Italic]
  134. }
  135. {
  136. \setmainfont{SourceSansPro-Light}[
  137. Path = fonts/,
  138. BoldFont = SourceSansPro-Regular,
  139. ItalicFont = SourceSansPro-LightIt]
  140. }
  141. %New length definition
  142. \newlength{\fulllength}
  143. \setlength{\fulllength}{17.8cm}
  144. \newlength{\leftcolumnlength}
  145. \setlength{\leftcolumnlength}{2.5cm}
  146. \newlength{\rightcolumnlength}
  147. %\setlength{\rightcolumnlength}{15.3cm minus 1cm}
  148. %\setlength{\rightcolumnlength}{\dimexpr(\fulllength-\leftcolumnlength)\relax}
  149. \setlength{\rightcolumnlength}{\dimexpr(\fulllength-\leftcolumnlength)\relax}
  150. % Override default left column length of (2.5cm)
  151. % Usage: \setleftcolumnlength{<length>}
  152. \newcommand{\setleftcolumnlength}[1]{
  153. \setlength{\leftcolumnlength}{#1}
  154. \setlength{\rightcolumnlength}{\dimexpr(\fulllength-\leftcolumnlength)\relax}
  155. }
  156. % Font Awesome icons aliases
  157. \newcommand{\mailSymbol}{\faAt}
  158. \newcommand{\locationSymbol}{\faMapMarker*}
  159. \newcommand{\infoSymbol}{\faInfo}
  160. \newcommand{\linkedinSymbol}{\faLinkedinIn}
  161. \newcommand{\viadeoSymbol}{\faViadeo}
  162. \newcommand{\mobileSymbol}{\faMobile*}
  163. \newcommand{\githubSymbol}{\faGithub}
  164. \newcommand{\stackoverflowSymbol}{\faStackOverflow}
  165. \newcommand{\stackexchangeSymbol}{\faStackExchange}
  166. \newcommand{\mediumSymbol}{\faMedium}
  167. \newcommand{\bitbucketSymbol}{\faBitbucket}
  168. \newcommand{\websiteSymbol}{\faLink}
  169. \newcommand\link[2]{\color{linkcolor}\href{#1}{#2}\color{Black} }
  170. \newcommand\important[1]{\textbf #1}
  171. % Create a tag
  172. % Usage: \cvtag{<tag label>}
  173. \newcommand{\cvtag}[1]{%
  174. \tikz[baseline]\node[anchor=base,draw=darkGrey!70,rounded corners=0.5ex,inner xsep=1ex,inner ysep =0.55ex,text height=1.3ex,text depth=.25ex]{#1};
  175. }
  176. % Render author's name
  177. % Usage: \user{<firstanme>}{<lastname>}
  178. \newcommand\user[2]{\color{accentcolor}{\LARGE #1 \textsc{\textbf{#2}}}\color{Black}}
  179. % Render a text with its symbol
  180. % Usage; \socialtext{<icon>}{<label>}
  181. \newcommand{\socialtext}[2]{\mbox{\textcolor{symbolcolor}{#1}#2\hspace{0.8em}}}
  182. % Render a link with its symbol
  183. % Usage; \sociallink{<icon>}{<label>}
  184. \newcommand{\sociallink}[3]{\mbox{\textcolor{symbolcolor}{#1}\link{#2}{#3}\hspace{0.8em}}}
  185. % Define author's name
  186. % Usage: \name{<firstname>}{<lastname>}
  187. % Usage: \firstname{<firstname>}
  188. % Usage: \lastname{<lastname>}
  189. % Usage: \familyname{<familyname>}
  190. \newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}}
  191. \newcommand*{\firstname}[1]{\def\@firstname{#1}}
  192. \newcommand*{\lastname}[1]{\def\@lastname{#1}}
  193. \newcommand*{\familyname}[1]{\def\@lastname{#1}}
  194. \def\@familyname{\@lastname}
  195. % Define author's tagline
  196. % Usage: \tagline{<tag line>}
  197. \newcommand*{\tagline}[1]{\def\@tagline{#1}}
  198. % Define author's photo
  199. % Usage: \photo[<shape: circular, square, roundedsquare, squircle>]{<diameter>}{<photo>}
  200. % The shape of the author's photo is circular by default.
  201. \newcommand{\photo}[3][circular]{\def\@photo{#3}\def\@photodiameter{#2}\def\@photoshape{#1}}
  202. % Render author's address
  203. % Usage: \address{<address>}
  204. \newcommand*{\address}[1]{\socialtext{\locationSymbol}{#1}}
  205. % Render author's infos
  206. % Usage: \infos{<infos>}
  207. \newcommand*{\infos}[1]{\socialtext{\infoSymbol}{#1}}
  208. % Render author's linked-in (optional)
  209. % Usage: \linkedin{<linked-in-nick>}
  210. \newcommand*{\linkedin}[1]{\sociallink{\linkedinSymbol}{https://www.linkedin.com/in/#1/fr}{linkedin.com/in/#1}}
  211. % Render author's viadeo(optional)
  212. % Usage: \viadeo{<viadeo-nick>}
  213. \newcommand*{\viadeo}[1]{\sociallink{\viadeoSymbol}{https://www.viadeo.com/fr/profile/#1}{viadeo.com/fr/profile/#1}}
  214. % Render author's github (optional)
  215. % Usage: \github{<github-nick>}
  216. \newcommand*{\github}[1]{\sociallink{\githubSymbol}{https://www.github.com/#1}{github.com/#1}} % Github icon + URL
  217. % Render author's stackoverflow profile (optional)
  218. % Usage: \stackoverflow{<stackoverflow-user-id>}
  219. \newcommand*{\stackoverflow}[1]{\sociallink{\stackoverflowSymbol}{https://www.stackoverflow.com/u/#1}{stackoverflow.com/u/#1}}
  220. % Render author's stackexchange profile (optional)
  221. % Usage: \stackexchange{<stackexchange-user-id>}
  222. \newcommand*{\stackexchange}[1]{\sociallink{\stackexchangeSymbol}{https://stackexchange.com/users/#1}{stackexchange.com/users/#1}}
  223. % Render author's medium (optional)
  224. % Usage: \medium{<medium-nick>}
  225. \newcommand*{\medium}[1]{\sociallink{\mediumSymbol}{https://www.medium.com/@#1}{medium.com/#1}}
  226. % Render author's bitbucket (optional)
  227. % Usage: \bitbucket{<bitbucket-account-name>}
  228. \newcommand*{\bitbucket}[1]{\sociallink{\bitbucketSymbol}{https://bitbucket.com/#1}{bitbucket.com/#1}}
  229. % Render author's email (optional)
  230. % Usage: \email{<email adress>}
  231. \newcommand*{\email}[1]{\sociallink{\mailSymbol}{mailto:#1}{#1}}
  232. % Render a website link (optional)
  233. % Usage: \website{<website name>}{<website adress>}
  234. \newcommand*{\website}[2]{\sociallink{\websiteSymbol}{#1}{#2}}
  235. % Render author's mobile phone (optional)
  236. % Usage: \smartphone{<mobile phone number>}
  237. \newcommand*\smartphone[1]{\socialtext{\mobileSymbol}{#1}}
  238. % Render author's tagline
  239. \newcommand\resumetitle[1]{
  240. \ifundef{\@alternative}{
  241. \par{
  242. \bigskip\center{\Large \color{accentcolor}\textbf{#1}\color{Black}}\par
  243. }
  244. \bigskip
  245. }{
  246. \color{accentcolor}\textbf{\large{#1}}\color{black}
  247. }
  248. }
  249. \newcommand\idphoto{
  250. \ifthenelse{\equal{\@photoshape}{square}}{
  251. % Draw square photo
  252. \tikz\path[fill overzoom image={\@photo}]rectangle(\linewidth,\linewidth);
  253. }{
  254. \ifthenelse{\equal{\@photoshape}{roundedsquare}}{
  255. % Draw square photo with rounded corners
  256. \tikz\path[fill overzoom image={\@photo}][rounded corners=2mm]rectangle(\linewidth,\linewidth);
  257. }{
  258. \ifthenelse{\equal{\@photoshape}{squircle}}{
  259. % Draw squircle photo
  260. \tikz\path[fill overzoom image={\@photo}][rounded corners=8mm]rectangle(\linewidth,\linewidth);
  261. }{
  262. % Draw circular photo
  263. \tikz\path[fill overzoom image={\@photo}]circle[radius=0.5\linewidth];
  264. }
  265. }
  266. }
  267. }
  268. % Define social entries to print in header
  269. \newcommand{\socialinfo}[1]{\def\@socialinfo{#1}}
  270. % Render CV header
  271. % Needs \@firstname, \@lastname and \@tagline to be defined
  272. \newcommand*{\makecvheader}{
  273. \ifundef{\@alternative}{
  274. \ifundef{\@photodiameter}{
  275. \begin{minipage}{\linewidth}
  276. }{
  277. \begin{minipage}{\dimexpr\linewidth-\@photodiameter-2em}
  278. }
  279. \color{accentcolor}\user{\@firstname}{\@lastname}\color{black}\\
  280. \small{\@socialinfo}
  281. \end{minipage}
  282. \ifdef{\@photodiameter}{
  283. \begin{minipage}{\@photodiameter}
  284. \idphoto
  285. \end{minipage}
  286. }{}
  287. \resumetitle{\@tagline}
  288. }{
  289. \ifundef{\@photodiameter}{
  290. \begin{minipage}{\linewidth}
  291. }{
  292. \begin{minipage}{\dimexpr\linewidth-\@photodiameter-2em}
  293. }
  294. \user{\@firstname}{\@lastname}\\
  295. \resumetitle{\@tagline}
  296. \smallskip\\
  297. \small{\@socialinfo}
  298. \end{minipage}
  299. \ifdef{\@photodiameter}{
  300. \begin{minipage}{\@photodiameter}
  301. \idphoto
  302. \end{minipage}
  303. }{}
  304. \bigskip
  305. }
  306. }
  307. % Define a footer for CV
  308. % Usage: \makecvfooter{<left>}{<center>}{<right>}
  309. \newcommand*{\makecvfooter}[3]{%
  310. \fancyfoot{}
  311. \fancyfoot[L]{#1}
  312. \fancyfoot[C]{#2}
  313. \fancyfoot[R]{#3}
  314. }
  315. % Resume part title definition
  316. \newcommand\sectionTitle[2]{\section{\texorpdfstring{\color{accentcolor}#2\enspace \textsc{#1}}{#1}}}
  317. % Define the 'keywords' environment
  318. \newenvironment{keywords}{%
  319. \renewcommand{\arraystretch}{1.1}
  320. \begin{tabular}{>{}r>{}p{13cm}}
  321. }{%
  322. \end{tabular}
  323. }
  324. % Render a scholarshipentry in the scolarship environment
  325. % Usage: \scholarshipentry{<date>}{<description>}
  326. \newcommand\keywordsentry[2]{
  327. \textbf{#1} & #2\\
  328. }
  329. % Define a new column type for the scholarship environment
  330. \newcolumntype{Y}{>{\raggedleft}p{\leftcolumnlength}}
  331. % Define the 'scholarship' environment
  332. \newenvironment{scholarship}{%
  333. \begin{tabular}{Y p{\rightcolumnlength}}
  334. }{%
  335. \end{tabular}
  336. }
  337. % Render a scholarshipentry in the scolarship environment
  338. % Usage: \scholarshipentry{<date>}{<description>}
  339. \newcommand\scholarshipentry[2]{
  340. #1 & #2 \\
  341. }
  342. % Define the 'skills' environment
  343. \newenvironment{skills}{%
  344. \begin{longtable}{R{\leftcolumnlength}p{\rightcolumnlength}}
  345. }{%
  346. \end{longtable}
  347. }
  348. % Render a skill in the skills environment
  349. % Usage: \skill{<skill>}{<level>}
  350. \newcommand\skill[2]{
  351. \textbf{#1} & \foreach \x in {1,...,5}{{\color{accentcolor!80} \ifnumgreater{\x}{#2}{\faCircle[regular]}{\faCircle}}\enspace } \\
  352. }
  353. \newcolumntype{E}{>{\raggedright\arraybackslash}p{\rightcolumnlength}}
  354. % Define the 'experiences' environment
  355. \newenvironment{experiences}{%
  356. \begin{longtable}{R{\leftcolumnlength}|E}
  357. }{%
  358. \end{longtable}
  359. }
  360. % Render an experience in the experiences environment
  361. % Usage:
  362. % \experience
  363. % {<End date>} {<Title>}{<Enterprise>}{<Country>}
  364. % {<Start date} {
  365. % <Experience description (Could be a list)>
  366. % }
  367. % {<Technology list>}
  368. \newcommand\experience[7]{
  369. \textbf{#1} & \textbf{#2, \textsc{#3}, #4} \\*
  370. \textbf{#5} & \begin{minipage}[t]{\rightcolumnlength}
  371. #6
  372. \end{minipage} \\*
  373. & \footnotesize{\foreach \n in {#7}{\cvtag{\n}}} \\
  374. }
  375. % Render a consultant experience in the experiences environment
  376. % Usage:
  377. % \consultantexperience
  378. % {<End date>} {<Consultant title>}{<Consulting Enterprise>}{<Country>}
  379. % {<Start date} {<Client title>}{<Client business unit>}
  380. % {
  381. % <Experience description (Could be a list)>
  382. % }
  383. % {<Technology list>}
  384. \newcommand\consultantexperience[9]{
  385. \textbf{#1} & \textbf{#2, \textsc{#3}, #4} \\*
  386. \textbf{#5} & \emph{#6} pour \textsc{#7} \\*
  387. & \begin{minipage}[t]{\rightcolumnlength}
  388. #8
  389. \end{minipage} \\*
  390. & \footnotesize{\foreach \n in {#9}{\cvtag{\n}}} \\
  391. }
  392. % Define the empty separator macro with different spacing according to document class option 'compact'
  393. \if@isCompact
  394. \newcommand\emptySeparator{\multicolumn{2}{c}{}\\[-0.6em]}
  395. \else
  396. \newcommand\emptySeparator{\multicolumn{2}{c}{}\\}
  397. \fi
  398. % Define the 'projects' environment
  399. \newenvironment{projects}{%
  400. \begin{longtable}{l}
  401. }{%
  402. \end{longtable}
  403. }
  404. % Define the 'project' entry in the 'projects' environment
  405. % Usage:
  406. % \project
  407. % {<Project name>}{<dates>}
  408. % {<link1> <link2>}
  409. % {<Project description>}
  410. % {<techno1>,<techno2>}
  411. \newcommand\project[5]{
  412. \begin{minipage}[t]{\dimexpr(\linewidth) - 1.5em}
  413. \textbf{\textsc{#1}} \hfill \textsc{#2}\smallskip\\
  414. #3\\
  415. #4\smallskip\\
  416. \footnotesize{\foreach \n in {#5}{\cvtag{\n}}}\\
  417. \end{minipage}
  418. \\*
  419. }
  420. \newcommand*\twocolumnsection[2]{
  421. \begin{minipage}[t]{\dimexpr(\linewidth/2) - 3em}
  422. #1
  423. \end{minipage}
  424. \hfill
  425. \begin{minipage}[t]{\dimexpr(\linewidth/2) - 3em}
  426. #2
  427. \end{minipage}
  428. }
  429. % Define the 'referencees' environment
  430. \newenvironment{referees}{%
  431. }{%
  432. \hfill
  433. \bigskip
  434. }
  435. \newcommand*\referee[5]{
  436. \hspace{1em}
  437. \begin{minipage}[t]{\dimexpr(\linewidth/3) - 3em}
  438. \begin{tabular}{>{}l >{}l}
  439. \multicolumn{2}{l}{\textbf{#1}}\\
  440. \multicolumn{2}{l}{\emph{#2}, \textsc{#3}}\\
  441. \quad \mailSymbol & \href{mailto:#4}{#4} \\
  442. \quad \faPhone & #5 \\
  443. \end{tabular}
  444. \end{minipage}%
  445. }
  446. \newcommand*\refereeMailOnly[4]{
  447. \hspace{1em}
  448. \begin{minipage}[t]{\dimexpr(\linewidth/3) - 3em}
  449. \begin{tabular}{>{}l >{}l}
  450. \multicolumn{2}{l}{\textbf{#1}}\\
  451. \multicolumn{2}{l}{\emph{#2}, \textsc{#3}}\\
  452. \quad \mailSymbol & \href{mailto:#4}{#4} \\
  453. \end{tabular}
  454. \end{minipage}%
  455. }
  456. % Define the 'publications' environment
  457. \newenvironment{publications}{%
  458. \vspace{5pt}
  459. }
  460. %% Bibliography
  461. \usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex}
  462. \newcounter{bibitem}
  463. \AtBeginBibliography{\setcounter{bibitem}{1}}
  464. \AtEveryBibitem{\hspace{1em}\makebox[1.5em][l]{{\thebibitem}\stepcounter{bibitem}.}}
  465. \setlength{\bibitemsep}{1.5ex}
  466. \setlength{\bibhang}{2.7em}
  467. \NewBibliographyString{retrieved}
  468. \NewBibliographyString{from}
  469. \urlstyle{tt}
  470. \def\@subbibfont{\large\color{accentcolor}}
  471. \newcommand\subbibfont[1]{\gdef\@subbibfont{#1}}
  472. \defbibheading{subbibliography}{\vskip 5pt {\@subbibfont\hspace{0pt}#1}\par}
  473. \defbibfilter{booksandchapters}{%
  474. ( type=book or type=incollection )
  475. }