-
Notifications
You must be signed in to change notification settings - Fork 17
/
resume.cls
1320 lines (1171 loc) · 53.8 KB
/
resume.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% Class license:
% LPPL v1.3c (http://www.latex-project.org/lppl)
% ==============================================================================
% Resume class forked from awesome-cv (https://github.com/posquit0/Awesome-CV),
% introducing a two-column layout and a « timeline » to present experiences,
% education and projects.
%
% This class is very long. It is split in multiple large sections by long
% « ==== » separators.
\ProvidesClass{resume}[Custom Resume]
\NeedsTeXFormat{LaTeX2e}
% Class Options
% --------------------------------------
% (need to be done before the external package loading, for example because
% we need \paperwidth, \paperheight and \@ptsize to be defined before loading
% geometry and fancyhdr)
% Options for draft or final
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{final}{\setlength\overfullrule{0pt}}
% Inherit options of article
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass{article}
% Packages
% --------------------------------------
% Needed to make fixed length table
\RequirePackage{array}
% Needed to handle list environment
\RequirePackage{enumitem}
% Needed to handle text alignment
\RequirePackage{ragged2e}
% Needed to configure page layout
\RequirePackage{geometry}
% Needed to make header & footer effeciently
\RequirePackage{fancyhdr}
% Needed to manage colors
\RequirePackage{xcolor}
% Needed to use \ifxetex-\else-\fi statement
\RequirePackage{ifxetex}
% Needed to use \if-\then-\else statement
\RequirePackage{xifthen}
\RequirePackage{ifthen}
% Needed to use a toolbox of programming tools
\RequirePackage{etoolbox}
% Needed to change line spacing in specific environment
\RequirePackage[nodisplayskipstretch]{setspace}
% Needed to manage fonts
\RequirePackage[quiet]{fontspec}
% To support LaTeX quoting style
\defaultfontfeatures{Ligatures=TeX}
% Needed to manage math fonts
\RequirePackage{unicode-math}
% Needed to use icons from font-awesome
% (https://github.com/posquit0/latex-fontawesome)
\RequirePackage{fontawesome5}
\RequirePackage[default,opentype]{sourcesanspro}
% Needed for the photo ID
\RequirePackage[skins]{tcolorbox}
% Needed to deal a paragraphs
\RequirePackage{parskip}
% Needed to deal hyperlink
\RequirePackage[hidelinks,unicode]{hyperref}
\hypersetup{%
pdftitle={},
pdfauthor={},
pdfsubject={},
pdfkeywords={}
}
% Allowing cells spanning multiple columns
\RequirePackage{multirow}
% Foreach to build tables
\RequirePackage{etoolbox}
% Alternative way for fixed length tables
\RequirePackage{tabularx}
% To draw boxes around skills
\RequirePackage{tcolorbox}
% Textblocks (absolute positioning of text)
\RequirePackage[overlay]{textpos} % ,showboxes
% Lengths arithmetics
\RequirePackage{calc}
% Save positions on first compilation pass
\RequirePackage{zref-savepos}
% Tikz to do fancy figures (timeline)
\RequirePackage{tikz}
% Enable arithmetic with dimensions in tikz
\usetikzlibrary{calc}
% Enable positioning relative to .. in tikz
\usetikzlibrary{positioning}
% Use multiple bibliographies and citations
\RequirePackage[backend=biber,style=authortitle,maxbibnames=9,maxcitenames=4,sorting=ydnt,dashed=false]{biblatex}
% Define custom bibliography style to minimize output
\AtEveryBibitem{%
\clearfield{doi} % Remove DOI
\clearfield{url} % Remove URL
\clearfield{isbn} % Remove ISBN
\clearfield{issn} % Remove ISSN
\clearfield{eprint} % Remove eprint
\clearfield{note} % Remove note
\clearlist{publisher} % Remove publisher
\clearlist{location} % Remove location
\clearfield{month} % Remove month
\clearfield{language} % Remove language
\clearfield{pages} % Remove pages
\clearlist{language} % Remove pages
\clearfield{volume} % Remove pages
\clearfield{number} % Remove pages
}
% Configurable lengths (and their defaults) used in this class
% ----------------------------------------------------------
% Technical Detail
% - - - - - - - - - - - - - - - - - - -
% For vertical lengths, we can use a \newcommand{\<name>} as it's either used
% inside a \vspace{\<name>} or as an argument for parskip \\[\<name>]
%
% For horizontal lengths, we use a \newlength and \setlength as it gives us
% lengths that can be manipulated arithmically
% (e.g. 1\textwidth - 2\iconswidth)
% ┌───────────────────────────────────────────────────────────────────────────┐
% │ │
% │ ┌ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ┐ │
% │ ↕ \headerbeforeskip │
% │ │<---------> \headerphotowidth │ │
% │ ┌─────────┐ │
% │ ││ │┌────────────────────────────────────────────────────┐│ │
% │ │ ││ Name Surname │ │
% │ ││ picture ││↕ \headerinterskip ││ │
% │ │ ││ job title - specialisation │ │
% │ ││ │└────────────────────────────────────────────────────┘│ │
% │ └─────────┘ │
% │ │ ↕ \headerafterskip │ │
% │ ┌───────────────────────────────────────────────────────────────┐ │
% │ ││ Summary ││ │
% │ └───────────────────────────────────────────────────────────────┘ │
% │ │ ↕ \summaryafterskip │ │
% │ <-------------> \leftcolumnwidth │
% │ │ <---> \leftcolumnrightmargin │ │
% │ ╔══════════════╔═══╦═════╗══════════════════════════════════════╗ │
% │ │║Contact ║ ║ ● ║Experience ║│ │
% │ ║ ║ ║ │ ║↕ \sectioninterskip ║ │
% │ │║ϟ ~~~~~~~~║ ║ ○ ║Company Location║│ │
% │ ║ϟ ~~~~~~║ ║ │ ║Job Title start - stop║ │
% │ │║ϟ ~~~~~~~~║ ║ │ ║• ~~~~~~~~~~~~~ <------------>║│ │
% │ ║ϟ ~~~~ ϟ ~~~~║ ║ │ ║ • ~~~~~~~~~ \datelocationwidth║ │
% │ │║ ║ ║ ║↕ \sectionafterskip ║│ │
% │ ║Skills ║ ║ ● ║Experience ║ │
% │ │║ ║ ║ │ ║ ║│ │
% │ ║ <-> <-> \timelinemargin ║ │
% Header
% --------------------------------------
% Before header
\newcommand{\headerbeforeskip}{4mm}
% In between name & position
\newcommand{\headerinterskip}{4mm}
% After header
\newcommand{\headerafterskip}{4mm}
% Width for the photo
\newlength{\headerphotowidth}
% Summary
% --------------------------------------
\newcommand{\summaryafterskip}{3mm}
% Sections & Entries
% --------------------------------------
% Between section title and content
\newcommand{\sectioninterskip}{1.5mm}
% After the end of the whole section's content
\newcommand{\sectionafterskip}{0mm}
% Sidebar & Timeline
% --------------------------------------
% Create a length for the side margins (required for tikz absolute positioning)
\newlength{\sidemargin}
% Width of the left column
\newlength{\leftcolumnwidth}
% Margin between the left column and the start of the timeline
\newlength{\leftcolumnrightmargin}
% Margin on the side of the timeline (left & right)
\newlength{\timelinemargin}
% Width dedicated to date & location for cv entries
% TODO: not used right now, might be needed for resumes with long job title or
% companies
\newlength{\datelocationwidth}
\setlength{\datelocationwidth}{3cm}
% Icons (contacts & hobbies)
% --------------------------------------
\newlength{\iconswidth} % Not used if you use \tabularx
\setlength{\iconswidth}{10.7pt}
% Debug commands
% --------------------------------------
% Create a boolean to enable/disable debug mode
\newbool{debugmode}
\setbool{debugmode}{false}
% Create commands for conditional code depending on debug mode
\newcommand{\debug}[2]{\ifbool{debugmode}{#1}{#2}}
\newenvironment{debugframe}{
\debug{\begin{mdframed}}{}%
}{
\debug{\end{mdframed}}{}%
}
\newcommand{\setupdebug}{\debug{
% Needed for debugging base layout (margins, footer, ...)
\RequirePackage{showframe}
% Needed for debugging resume layout (header, columns, ...)
\RequirePackage{mdframed}
% Configuration for debug frames
\mdfsetup{%
% Border style
linecolor=awesome,
linewidth=1.2pt,
% Margins
innerleftmargin=0pt,
innerrightmargin=0pt,
innertopmargin=0pt,
innerbottommargin=0pt,
}
}}{}
%-------------------------------------------------------------------------------
% TODO: commands to clean up
%-------------------------------------------------------------------------------
% Others
% Layout
% --------------------------------------
% Configure page margins with geometry
\geometry{left=1.5cm, top=1.5cm, right=1.5cm, bottom=2cm, footskip=.5cm}
% Set offset to each header and footer
\fancyhfoffset{0em}
% Remove head rule
\renewcommand{\headrulewidth}{0pt}
% Clear all header & footer fields
\fancyhf{}
% Enable if you want to make header or footer using fancyhdr
\pagestyle{fancy}
% Colors
% ----------------------------------------------------------
% Gray-scale colors
\definecolor{white}{HTML}{FFFFFF}
\definecolor{black}{HTML}{000000}
\definecolor{darkgray}{HTML}{333333}
\definecolor{gray}{HTML}{5D5D5D}
\definecolor{lightgray}{HTML}{999999}
% Basic colors
\definecolor{green}{HTML}{C2E15F}
\definecolor{orange}{HTML}{FDA333}
\definecolor{purple}{HTML}{D3A4F9}
\definecolor{red}{HTML}{FB4485}
\definecolor{blue}{HTML}{6CE0F1}
% Text colors
\definecolor{darktext}{HTML}{414141}
\colorlet{text}{darkgray}
\colorlet{graytext}{gray}
\colorlet{lighttext}{lightgray}
% Awesome colors
\definecolor{awesome-emerald}{HTML}{00A388}
\definecolor{awesome-skyblue}{HTML}{0395DE}
\definecolor{awesome-darkblue}{HTML}{18678d}
\definecolor{awesome-red}{HTML}{DC3522}
\definecolor{awesome-pink}{HTML}{EF4089}
\definecolor{awesome-orange}{HTML}{FF6138}
\definecolor{awesome-nephritis}{HTML}{27AE60}
\definecolor{awesome-concrete}{HTML}{95A5A6}
\definecolor{awesome-darknight}{HTML}{131A28}
% Icons colors
%\definecolor{iconcolor}{HTML}{505050}
\colorlet{iconcolor}{awesome-concrete}
% Boolean value to switch section color highlighting
\newbool{sectioncolorhighlight}
\setbool{sectioncolorhighlight}{true}
% Show sections tiles in `awesome` color if `highlightSections` is true
\def\@sectioncolor#1{%
\ifbool{sectioncolorhighlight}{\color{awesome}#1}{\color{text}#1}%
}
% Fonts configuration
% ----------------------------------------------------------
% Set font for header (default is Roboto)
\newfontfamily\headerfont[
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-Bold,
BoldItalicFont=*-BoldItalic,
]{Roboto}
\newfontfamily\headerfontlight[
UprightFont=*-Thin,
ItalicFont=*-ThinItalic,
BoldFont=*-Medium,
BoldItalicFont=*-MediumItalic,
]{Roboto}
% Provides additional symbols, browse at
% https://www.nerdfonts.com/cheat-sheet
\newfontfamily{\symbolsfont}[
UprightFont=*-Regular,
Extension=.ttf
]{SymbolsNerdFont}
% Aliases to contextualise fonts in differents parts of the resume
\newcommand*{\footerfont}{\sourcesanspro}
\newcommand*{\bodyfont}{\sourcesanspro}
\newcommand*{\bodyfontlight}{\sourcesansprolight}
\newcommand*{\icon}[1]{{\symbolsfont\color{iconcolor} #1}}
% Personal information inputs
% ----------------------------------------------------------
% Configure the different information that the writer needs to input in the
% main file (resume.tex)
%
% Defines commands that will store some input information into a variable that
% can later be used in elements (see the `elements` section)
% Define photo ID
% Usage: \photo[circle|rectangle,edge|noedge,left|right]{<path-to-image>}
\newcommand{\photo}[2][circle,edge,left]{%
\def\@photo{#2}
\@for\tmp:=#1\do{%
\ifthenelse{\equal{\tmp}{circle} \or \equal{\tmp}{rectangle}}%
{\let\@photoshape\tmp}{}%
\ifthenelse{\equal{\tmp}{edge} \or \equal{\tmp}{noedge}}%
{\let\@photoedge\tmp}{}%
\ifthenelse{\equal{\tmp}{left} \or \equal{\tmp}{right}}%
{\let\@photoalign\tmp}{}%
}%
}
% Set the default image configuration
\def\@photoshape{circle}
\def\@photoedge{edge}
\def\@photoalign{left}
% Headers Information
% ----------------------------
% Usage: \name{<firstname>}{<lastname>}
\newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}}
% Usage: \firstname{<firstname>}
\newcommand*{\firstname}[1]{\def\@firstname{#1}}
% Usage: \lastname{<lastname>}
\newcommand*{\lastname}[1]{\def\@lastname{#1}}
% Usage: \familyname{<familyname>}
\newcommand*{\familyname}[1]{\def\@lastname{#1}}\def\@familyname{\@lastname}
% Usage: \position{<position>}
\newcommand*{\position}[1]{\def\@position{#1}}
% Contacts Information
% ----------------------------
% Usage: \address{<address>}
\newcommand*{\address}[1]{\def\@address{#1}}
% Usage (optional): \email{<email adress>}
\newcommand*{\email}[1]{\def\@email{#1}}
% Usage (optional): \mobile{<mobile number>}
\newcommand*{\mobile}[1]{\def\@mobile{#1}}
% Usage (optional): \homepage{<url>}
\newcommand*{\homepage}[1]{\def\@homepage{#1}}
% Usage (optional): \github{<github-nick>}
\newcommand*{\github}[1]{\def\@github{#1}}
% Usage (optional): \gitlab{<gitlab-nick>}
\newcommand*{\gitlab}[1]{\def\@gitlab{#1}}
% Usage (optional): \stackoverflow{<so userid>}{<so username>}
\newcommand*{\stackoverflow}[2]{\def\@stackoverflowid{#1}\def\@stackoverflowname{#2}}
% Usage (optional): \linkedin{<linked-in-user>}
\newcommand*{\linkedin}[1]{\def\@linkedinuser{#1}}
% Usage (optional): \twitter{<twitter handle>}
\newcommand*{\twitter}[1]{\def\@twitter{#1}}
% Usage (optional): \instagram{<instagram handle>}
\newcommand*{\instagram}[1]{\def\@instagram{#1}}
% Usage (optional): \orcid{orcid-id>}
\newcommand*{\orcid}[1]{\def\@orcid{#1}}
% Usage (optional): \extrainfo{<extra informations>}
\newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}}
% Usage (optional): \quote{<quote>}
\renewcommand*{\quote}[1]{\def\@quote{#1}}
% Fonts & Styles
% ---------------------------------------------------------
% Configure how the different elements in the resume *look*
% Defines commands for the style of each named element of the resume, this
% includes:
% - font size (e.g. 32pt)
% - font weight (e.g. light)
% - colour
% Each command follows the pattern:
% > `\<element>style` e.g. `\headerpositionstyle`
% Header
% --------------------------------------
% First name & last name have different styles
\newcommand*{\headerfirstnamestyle}[1]
{{\fontsize{32pt}{1em}\headerfontlight\color{graytext} #1}}
\newcommand*{\headerlastnamestyle}[1]
{{\fontsize{32pt}{1em}\headerfont\bfseries\color{text} #1}}
% Job position is below the name
\newcommand*{\headerpositionstyle}[1]
{{\fontsize{17pt}{1em}\bodyfont\scshape\color{awesome} #1}}
% Quote is an optional short sentence
\newcommand*{\headerquotestyle}[1]
{{\fontsize{9pt}{1em}\bodyfont\itshape\color{darktext} #1}}
% Summary
% --------------------------------------
% Short paragraph about you
\newcommand*{\summarystyle}
{\fontsize{10pt}{1em}\bodyfontlight\upshape\color{text}}
% Footer
% --------------------------------------
\newcommand*{\footerstyle}[1]
{{\fontsize{8pt}{1em}\footerfont\scshape\color{lighttext} #1}}
% Sidebar
% --------------------------------------
% Default style for most of the text & icons on the left column for
% consistency. Some more specific areas will be defined, but set as an
% alias to this by default.
\newcommand*{\sidebarstyle}[1]
{{\fontsize{8pt}{1em}\bodyfontlight\color{text} #1}}
\newcommand*{\sidebariconstyle}[1]{{\fontsize{8pt}{1em}\bodyfont #1}}
% Contact
% --------------------------------------
\newcommand*{\contactstyle}[1]{\sidebarstyle{#1}}
\newcommand*{\contacticonstyle}[1]{\sidebariconstyle{#1}}
% Hobbies
% --------------------------------------
\newcommand*{\hobbiesstyle}[1]{\sidebarstyle{#1}}
\newcommand*{\hobbiesiconstyle}[1]{\sidebariconstyle{#1}}
% Skills
% --------------------------------------
\newcommand*{\skilltypestyle}[1]
{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\skillsetstyle}[1]
{{\fontsize{7.5pt}{1em}\bodyfontlight\color{text} #1}}
\newcommand*{\languagestyle}[1]
{{\fontsize{9.5pt}{1em}\bodyfontlight\color{text} #1}}
% Generic Section (Experience, Education, ...)
% --------------------------------------
\newcommand*{\sectionstyle}[1]
{{\fontsize{16pt}{1em}\bodyfont\bfseries\scshape\@sectioncolor #1}}
\newcommand*{\subsectionstyle}[1]
{{\fontsize{12pt}{1em}\bodyfont\scshape\textcolor{text}{#1}}}
\newcommand*{\paragraphstyle}
{\fontsize{12pt}{1em}\bodyfontlight\upshape\color{text}}
% Entry elements
% --------------------------------------
\newcommand*{\entrytitlestyle}[1]
{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\entrypositionstyle}[1]
{{\fontsize{9pt}{1em}\bodyfont\scshape\color{graytext} #1}}
\newcommand*{\entrydatestyle}[1]
{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
\newcommand*{\entrylocationstyle}[1]
{{\fontsize{9pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
\newcommand*{\descriptionstyle}[1]
{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}}
% Subentry elements
% --------------------------------------
\newcommand*{\subentrytitlestyle}[1]
{{\fontsize{8pt}{1em}\bodyfont\mdseries\color{graytext} #1}}
\newcommand*{\subentrypositionstyle}[1]
{{\fontsize{7pt}{1em}\bodyfont\scshape\color{graytext} #1}}
\newcommand*{\subentrydatestyle}[1]
{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
\newcommand*{\subentrylocationstyle}[1]
{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
\newcommand*{\subdescriptionstyle}[1]
{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}}
% Bibliography
% --------------------------------------
\renewcommand*{\bibfont}{\descriptionstyle}
% Elements
% ---------------------------------------------------------
% Defines commands to include the different elements.
%
% Reminder of the overall layout of the resume (by default)
% ┌───────────────────────────────────────────────────────────┐
% │ ┌─────────┐ │
% │ │ │ ┌────────────────────────────────┐ │
% │ │ picture │ │ Name Surname │ │
% │ │ │ └────────────────────────────────┘ │
% │ └─────────┘ job title - specialisation │
% │ ┌───────────────────────────────────────────────────┐ │
% │ │ Summary │ │
% │ └───────────────────────────────────────────────────┘ │
% │ │
% │ Contact ● Experience │
% │ │ │
% │ ϟ ~~~~~~~~ ○ Company Location │
% │ ϟ ~~~~~~ │ Job Title start - stop │
% │ ϟ ~~~~~~~~ │ • ~~~~~~~~~~~~~ │
% │ ϟ ~~~~ ϟ ~~~~ │ • ~~~~~~~~~ │
% │ │ • ~~~~~~~ │
% │ Skills │ • ~~~~~~~~~~~~~~ │
% │ │ │
% │ Group 1 ○ Company Location │
% │ ▢▢▢▢ ▢▢▢▢ ▢▢▢▢ │ Job Title start - stop │
% │ Group 2 │ • ~~~~~~~~~~~~~ │
% │ ▢▢▢▢ ▢▢▢▢ ▢▢▢▢ │ • ~~~~~~~~~ │
% │ │ • ~~~~~~~ │
% │ Hobbies │ • ~~~~~~~~~~~~~~ │
% │ ϟ ~~~~~~~~ │ • ~~~~~~~~ │
% │ ϟ ~~~~~~~ │ • ~~~~~~~~~~ │
% │ ● Education │
% │ Languages │ │
% │ ϟ ~~~~~~~~ ○ Degree Name Location │
% │ ϟ ~~~~~~~ │ University start - stop │
% │ │ │
% │ │
% │ │
% │ footer date │
% └───────────────────────────────────────────────────────────┘
% Utilities Commands
% --------------------------------------
% Align elements in tabular tables
\newcolumntype{L}[1]
{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]
{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]
{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
% Draw horizontal line with specific thickness
\def\vhrulefill#1
{\leavevmode\leaders\hrule\@depth-4pt\@height4.9pt\hfill \kern\z@}
% Execute conditional statements by checking empty string
\newcommand*{\ifempty}[3]{\ifthenelse{\isempty{#1}}{#2}{#3}}
% Header & Picture
% --------------------------------------
% ┌───────────────────────────────────────────────────────────┐
% │ ┌─────────┐ │
% │ │ │ ┌────────────────────────────────┐ │
% │ │ picture │ │ Name Surname │ │
% │ │ │ └────────────────────────────────┘ │
% │ └─────────┘ job title - specialisation │
% │ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - │
% Provides a single command to create the header: \makecvheader
% Command for the separation between name & surname
\newcommand{\headernamedelim}{\space}
% Define a header for CV
% Usage: \makecvheader{<align-char>} (options: L | C | R)
\newcommand*{\makecvheader}[1][C]{%
% Draw the photo (if defined)
\newcommand*{\drawphoto}{%
\ifthenelse{\isundefined{\@photo}}{}{%
% Figure out the dimensions depending on edge type (circle / edge)
\newlength{\photodim}
\ifthenelse{\equal{\@photoshape}{circle}}%
{\setlength{\photodim}{1.3cm}}%
{\setlength{\photodim}{1.8cm}}%
% Add a border for the `edge` shape
\ifthenelse{\equal{\@photoedge}{edge}}%
{\def\@photoborder{darkgray}}%
{\def\@photoborder{none}}%
% Draw the photo using tikz
\begin{tikzpicture}%
\node[
\@photoshape,
draw=\@photoborder,
line width=0.3mm,
inner sep=\photodim,
fill overzoom image=\@photo
] () {};
\end{tikzpicture}
}%
}
% Figure out the width for text vs. photo
\newlength{\headertextwidth}
\ifthenelse{\isundefined{\@photo}}{
% No photo => force 0cm for photo
\let\headerphotowidth\relax
\newlength{\headerphotowidth}
\setlength{\headerphotowidth}{0cm}
}{%
% Photo => default to ~ 25% for photo, 75% for text
\ifthenelse{\isundefined{\headerphotowidth}}{%
\setlength{\headerphotowidth}{0.24\textwidth}
}{}
}%
\setlength{\headertextwidth}{\textwidth - \headerphotowidth}
% Create minipages to show the photo & text side-by-side
\begin{debugframe}
\vspace{\headerbeforeskip}
% Minipage for left-side photo
\ifthenelse{\equal{\@photoalign}{left}}{
\begin{minipage}[c]{\headerphotowidth}%
\begin{debugframe}
\raggedright\drawphoto%
\end{debugframe}
\end{minipage}%
}{}%
% Minipage for text
\begin{minipage}[c]{\headertextwidth}
\begin{debugframe}
% Handle text alignment (options: L | C | R)
\ifthenelse{\equal{#1}{L}}{
% Argument #1 <align-char> is 'L'
\begin{flushleft}
}{\ifthenelse{\equal{#1}{R}}{
% Argument #1 <align-char> is 'R'
\begin{flushright}
}{
% Argument #1 <align-char> is anything else (includes empty)
\begin{center}
}}
% Text with 'firstname <sep> lastname'
\headerfirstnamestyle{\@firstname}%
\headerlastnamestyle{{}\space\@lastname}%
\\[\headerinterskip]
% Handle text alignment (options: L | C | R)
\ifthenelse{\equal{#1}{L}}{
% Argument #1 <align-char> is 'L'
\raggedright
}{\ifthenelse{\equal{#1}{R}}{
% Argument #1 <align-char> is 'R'
\raggedleft
}{
% Argument #1 <align-char> is anything else (includes empty)
\centering
}}
% Position text (if defined)
\ifthenelse{\isundefined{\@position}}{}{
% Position => inter-skip, position, after skip
\headerpositionstyle{\@position}
}
% Handle text alignment (options: L | C | R)
\ifthenelse{\equal{#1}{L}}{
% Argument #1 <align-char> is 'L'
\end{flushleft}
}{\ifthenelse{\equal{#1}{R}}{
% Argument #1 <align-char> is 'R'
\end{flushright}
}{
% Argument #1 <align-char> is anything else (includes empty)
\end{center}
}}
\end{debugframe}
\end{minipage}%
% Minipage for right-side photo
\ifthenelse{\equal{\@photoalign}{right}}{%
\begin{minipage}[c]{\headerphotowidth}%
\begin{debugframe}
\raggedleft\drawphoto%
\end{debugframe}
\end{minipage}
}{}%
\vspace{\headerafterskip}
\end{debugframe}
}
% Summary
% --------------------------------------
% The summary is just a paragraph in between the header and the main body of
% the resume (sidebar on the left and timeline of events on the right)
% │ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - │
% │ ┌───────────────────────────────────────────────────┐ │
% │ │ Summary │ │
% │ └───────────────────────────────────────────────────┘ │
% │ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - │
\newenvironment{cvsummary}{%
\setlength{\parskip}{0pt}
\summarystyle
}{%
\vspace{\summaryafterskip}
}
% Footer
% --------------------------------------
% Provides the footer as a single command with 3 elements:
% <left>, <center>, <right>
% │ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - │
% │ footer date │
% └───────────────────────────────────────────────────────────┘
% Define a footer for every page of the resume
% Usage: \makecvfooter{<left>}{<center>}{<right>}
\newcommand*{\makecvfooter}[3]{%
\fancyfoot[L]{\footerstyle{#1}}
\fancyfoot[C]{\footerstyle{#2}}
\fancyfoot[R]{\footerstyle{#3}}
}
% Sidebar vs. Body
% --------------------------------------
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% │ Contact ● Experience │
% │ │ │
% │ ϟ ~~~~~~~~ ○ Job Title Location │
% │ ϟ ~~~~~~ │ Company start - stop │
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% sidebar body
% Sidebar Table
% --------------------------------------
% Table meant to be used on the left column of the layout, with the left
% column containing icons (or short text) and the right column text that fit in
% one line (multi-line doesn't look very good).
%
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% │ Contact ● │
% │ │ │
% │ ϟ ~~~~~~~~ ○ │
% │ ϟ ~~~~~~ │ │
% │ ϟ ~~~~~~~~ │ │
% │ ϟ ~~~~ ϟ ~~~~~ │ │
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% @TODO: currently, the code using `tabularx`, which is fairly elegant, does not
% work inside an `\newenvironment`. I don't have time to troubleshoort that, so
% the tables code will be in the main files for now.
%
% Below is an iteration using `tabular*` which does work for icons, but requires
% fine-tuning of the dimension of the left column (containing the icons).
\newenvironment{iconstable}{
% Reduce horizontal space around cells content
\setlength{\tabcolsep}{2pt}
\debug{% In debug mode, add vertical separator between columns
\begin{tabular*}{\leftcolumnwidth}
{|c|R{\leftcolumnwidth - 4\tabcolsep - \iconswidth}|}
}{%
\begin{tabular*}{\leftcolumnwidth}
{cR{\leftcolumnwidth - 4\tabcolsep - \iconswidth}}
}%
\debug{\hline}{}
}{
\debug{\hline}{}
\end{tabular*}
}
% Contacts items
% --------------------------------------
% The contacts table is versatile, as many elements can be integrated or not
% depending on the author.
%
% We define below elements and their corresponding icons. The pattern is the
% following:
% - \c<element> e.g. \caddress -> \contactstyle{\@<element>}
% - \c<element>icon e.g. \caddressicon -> \contacticonstyle{\@<element>}
%
% When possible, a clickable link to the element is provided with
% \href{<link>}{\@<element>} e.g. google maps for the address.
% Elements text & icons
% - - - - - - - - - - - - - - - - - - -
% Address
\def\caddress{\contactstyle{%
\href{https://maps.google.com/?\@address}{\@address}}}
\def\caddressicon{\contacticonstyle{% alternative icon: `\icon{}`
\href{https://maps.google.com/?\@address}{\icon{\faMapMarked*}}}}
% Mobile
\def\cmobile{\contactstyle{\@mobile}}
\def\cmobileicon{\contacticonstyle{\icon{\faMobile}}}
% Github
\def\cgituser{\contactstyle{%
\href{https://github.com/\@github}{\@github}}}
\def\cgiticon{\contacticonstyle{%
\href{https://github.com/\@github}{\icon{\faGithubSquare}}}}
\def\cgitproject#1{\contacticonstyle{%
\href{https://github.com/\@github/#1}{\scalebox{0.8}{\icon{\faGithub}}}}}
% Linkedin
\def\clinkedinuser{\contactstyle{%
\href{https://www.linkedin.com/in/\@linkedinuser}{\@linkedinuser}}}
\def\clinkedinicon{\contacticonstyle{%
\href{https://www.linkedin.com/in/\@linkedinuser}{\icon{\faLinkedin}}}}
% Email
\def\cemail{\contactstyle{\href{mailto:\@email}{\@email}}}
\def\cemailicon{\contacticonstyle{\href{mailto:\@email}{\icon{\faEnvelope}}}}
% Orcid
\def\corciduser{\contactstyle{\href{https://orcid.org/\@orcid}{\@orcid}}}
\def\corcidicon{\contacticonstyle{%
\href{https://orcid.org/\@orcid}{\icon{\faOrcid}}}}
% In-place link (any website, publication, ...)
\def\cpaperlink#1{\contacticonstyle{%
\href{#1}{\scalebox{0.8}{\icon{\faExternalLink*}}}}}
% Skills
% --------------------------------------
% This section (on the left side) provides an overview of keywords related to
% your industry for a first scan of compatibility of your profile with the
% position.
%
% Ideally, the list of skills should be fairly short as you should tailor it to
% the job you're targeting.
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% │ Skills │ │
% │ │ │
% │ Group 1 ○ │
% │ ▢▢▢▢ ▢▢▢▢ ▢▢▢▢ │ │
% │ ▢▢▢▢ ▢▢▢▢ │ │
% │ Group 2 │ │
% │ ▢▢▢▢ ▢▢▢▢ ▢▢▢▢ │ │
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% Skills entry
% - - - - - - - - - - - - - - - - - - -
% Starts a new entry for skills (group of related keyword badges).
% Usage: \skillcategory{<title>}
\newcommand*{\skillcategory}[1]{\skilltypestyle{#1}}
% Skills table
% - - - - - - - - - - - - - - - - - - -
% Implement the skill badge using tikz
\newcommand*{\skilltikz}[2]{
\begin{tikzpicture}[
x=0.2cm,
y=0.23cm,
color=lighttext!50!graytext,
skill/.style={text width=1.5cm, align=left},
icon/.style={text width=0.5cm, align=center},
]
\def\swidth{2.5}
\def\shift{0.4}
\node[skill] (S) at (0,0) {\skillsetstyle{#1}};
%\node[icon] (I) at (1.9,0) {\skillsetstyle{#2}};
\draw[] ({- 4 - \shift},1) -- ({\swidth + \shift},1) -- ({\swidth + \shift},-1) -- ({-4 - \shift},-1) -- cycle;
%\draw[line width=0.4pt, densely dashed] (\swidth - 1.5,1) -- (\swidth - 1.5,-1);
\end{tikzpicture}
}
% Implement the skill badge with tcolorbox
\newtcolorbox{skillbadge}{
% Color of the box and content
colframe=lighttext,
colback=white,
% TODO: Arbitrary height and width, could be configurable
height=11pt,
width=1.47cm,
boxrule=0.4pt,
% Padding
top=-0.8pt, % Visually center vertically
bottom=0pt,
left=-1pt,
right=-1pt,
% Other settings
tcbox raise base,
halign=center,
nobeforeafter,
on line,
}
\newcommand*{\skill}[1]{
% Use the tcolorbox implementation
\begin{skillbadge}\skillsetstyle{#1}\end{skillbadge}
}
\newenvironment{skillstable}{
% TODO: unify lengths
\vspace{-0.3mm}
}{
\vspace{-1.0mm}
}
% Entries Titles
% --------------------------------------
% Main nodes titles (section) and minor nodes titles (entries)
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% │ => ● Experience │
% │ │ │
% │ => ○ Job Title Location │
% │ │ Company start - stop │
% │ │ • ~~~~~~~~~~~~~ │
% │ │ • ~~~~~~~~~ │
% │ │ • ~~~~~~~ │
% │ │ • ~~~~~~~~~~~~~~ │
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% CV Section (Experience, Education, ...)
% - - - - - - - - - - - - - - - - - - -
% Usage: \cvsection{<section-title>}
\newcommand{\cvsection}[1]{%
\sectionstyle{#1}
\phantomsection
\startsection
}
% Define a subsection for CV
% Usage: \cvsubsection{<subsection-title>}
\newcommand{\cvsubsection}[1]{%
% TODO: troubleshoot when used
\vspace{\sectioninterskip}
\vspace{-3mm}
\subsectionstyle{#1}
\phantomsection
}
% CV Entry
% - - - - - - - - - - - - - - - - - - -
% Main entry to show an experience or degree and an associated date/duration
% and location.
% There are 2 separate ways to use this command.
%
% (1) Usage: \cventry{<position>}{<title>}{<location>}{<date>}{<description>}
% • Full experience description (what, where [city], where [company], when)
%
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% │ => ○ Job Title Location │
% │ => │ Company start - stop │
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
%
%
% (2) Usage: \cventry{<position>}{}{}{<date>}{<description>}
% • Shorter experience description: what, when
% • Good for personal projects for instance
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
% │ => ○ Job Title start - stop │
% │ │ • ~~~~~~~~~~ │
% │ - - - - - - - - - -+- - - - - - - - - - - - - - - - - - - │
%
% Note that 'position' and 'title' can be interchanged depending on what you
% want to highlight in your professional experience
%
% Usage: \cventry{<position>}{<title>}{<location>}{<date>}{<description>}
\newcommand*{\cventry}[5]{%
% Configure an almost invisible table environment
\setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt}
% Ensure there are no vertical paragraph skips