forked from moderncv/moderncv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
moderncvskillmatrix.sty
1051 lines (1029 loc) · 67.1 KB
/
moderncvskillmatrix.sty
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
%% start of file `moderncvskillmatrix.sty'.
%% Copyright 2021 David Seus ([email protected]).
%
% This package provides a skill matrix template for the moderncv package.
% Some recruiting firms require applicants to rate their skills, computer
% skills, management tools, or similar in a table involving a graphical
% illustration of their skill level. This package implements this idea
% and provides the following commands to use within the moderncv
% package:
%
%
% PUBLIC COMMANDS
% \cvskill{<1-5>}
% Illustrate skill level with little colored boxes.
% By default five skill levels are predefined.
%
% Input:
% input_1: integer between 0 and 5
%
% Example usages:
% \cvskill{3}
%
%
% \cvskilllegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
% Print legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
%
% Input:
% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
% For the fancy style, the asterix has no meaning.
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
% input_7: string giving a name to the legend, default: <>
%
% Example usages:
% \cvskilllegend{} print default legend
% \cvskilllegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
% \cvskilllegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
%
% Note:
% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
% -The design of the table is such that the <second_level> entry stands in the first column but
% occupies rows two and three. This has been done to accomodate english and german defaults.
% An alternative is provided by \cvskillplainlegend
%
%
% \cvskillplainlegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
% Print alternative legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
% In this legend, the first three skill levels are in one column
%
% Input:
% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
% For the fancy style, the asterix has no meaning.
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
% input_7: string giving a name to the legend, default: <>
%
% Example usages:
% \cvskillplainlegend{} print default legend
% \cvskillplainlegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
% \cvskillplainlegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
%
% Note:
% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
%
%
% \cvskillhead[<post_padding>][<Level>][<Skill>][<Years>][<Comment>]%
% add skill matrix line acting as header explaining the meaning of columns.
%
% Input:
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2 (optional): string naming the level column (2nd column), default: <Level>
% input_3 (optional): string naming the skill column (3nd column), default: <Skill>
% input_4 (optional): string naming the experience-in-years column (4th column), default: <Years>
% input_5 (optional): string naming the comment column (5th column), default: <Comment>
%
% Example usages:
% \cvskillhead print default head.
% \cvskillhead[0.5em] print default head, but adjust post padding.
% \cvskillhead[0.25em][Level][F\"ahigkeit][Jahre][Bemerkung] Fully adjust head to German example
%
% Note:
% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
%
%
% \cvskillentry[*][<post_padding>]{<skill_cathegory>}{<0-5>}{<skill_name>}{<years_of_experience>}{<comment>}%
% add cvskill matrix row.
%
% Input:
% asterix (optional): include horizontal (dashed) line above the entered line. This behaviour depends on the body style.
% For the fancy style, the asterix has no meaning.
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2: string, naming skill cathegory, default: <>
% input_3: integer between 0 and 5, describing level of skill. \cvskill{input_2} is called internally, default: <>
% input_4: string, naming the skill, default: <>
% input_5: positive real number, stating the number of years of experience with this skill , default: <>
% input_6: string, explaining details w.r.t. that particual skill default: <>
%
% Example usages:
% \cvskillentry*{Language:}{3}{Python}{2}{I have done a million projects with Python}
% \cvskillentry{}{2}{Lilypond}{14}{So much sheet music! Man I'm the best!}
% \cvskillentry{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
% \cvskillentry*[1.5em]{OS:}{3}{Linux}{2}{I only use Archlinux}
%
% Note:
% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
%
%
% \setcvskillcolumns[<width>][<factor>][<exp_width>]
% adjust column width of skill table
%
% The \cvskillentry command comes with default FIXED width definitions of the kill matrix for the columns
% based on the author's own skill matrix. This is necessary to ensure that the entries are nicely aligned
% and actually yield a decent looking table. The defaults depend on the style used and are chosen reasonably.
% However, depending on the user input and the style that is used some of the columns might need adjustments.
% The \setcvskillcolumns command provides means to influence the width of the first, the third and the fourth
% skill matrix column. The second column containg the output of \cvskill remains fixed width. The last column,
% the comment column gets recalculated according to the setting of the other columns.
%
% Input
% Input_1 (optional): width smaller than \textwidth, default <\skillmatrix@hintscolumnwidth>
% Input_2 (optional): float between 0 and 1 adjusting how much percent of the table width without
% the first column is used columns two, three and four. Through this parameter
% the width of the 3rd column (skill name) can be adjusted, default <\skillmatrix@columnwidth>
% Input_3 (optional): width smaller than \textwidth, setting the width of the 4th column
% (Years of experience), default <\cvskill@experiencewidth>
%
% Example usage
% \setcvskillcolumns[5em][][]% adjust first column. Same as \setcvskillcolumns[5em]
% \setcvskillcolumns[][0.45][]% adjust third (skill) column. Same as \setcvskillcolumns[][0.45]
% \setcvskillcolumns[][][\widthof{``Year''}]% adjust fourth (years) column.
% \setcvskillcolumns[\widthof{``Language''}][0.48][]% adjust 1st and 3rd columns. Same as \setcvskillcolumns[\widthof{``Language''}][0.45]
% \setcvskillcolumns[\widthof{``Management Tools''}][0.6][3em]% ajust all at once.
%
% Note
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
% it aligns with the rest of the entries. A readjustment of the first column should therefor
% be avoided. It is recomended to only use \setcvskillcolumns in the form of
% \setcvskillcolumns[][<factor>][<width>], thereby leaving the defaults in place for the first column.
%
%
% \setcvskilllegendcolumns[<width>][<factor>]
% adjust column width of legend
%
% The \cvskilllegend command comes with default FIXED width definitions for the columns of the legend matrix
% such that the default english and german examples look good.
% However, depending on the user input (translation) and the style that is used some adjustment might be needed.
% The \setcvskilllegendcolumns command provides means to influence all columns except the ones containing
% \cvskill commands. The second column containg the output of \cvskill remains fixed width. The last column,
% the comment column gets recalculated according to the setting of the other columns.
%
% Input
% Input_1 (optional): length smaller than \textwidth influencing the width of the first column
% where depending on the style the legend_string gets printed. In case the
% string is left empty adjusting this width allows moving the legend horizontally.
% Default <\skilllegend@hintscolumnwidth>
% Input_2 (optional): float between 0 and 1 influencing the width of the left legend descritor column,
% aka \cvskilllegend@leftdescriptorwidth. The desriptor column on the right,
% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>.
% Default <\skilllegend@leftdesriptorfactor>
%
% Example usage
% \setcvskilllegendcolumns[][0.45]%% adjust left desriptor column.
% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]% adjust both left descriptor column and string column
%
% Note
% - Due to implementation of \cvskilllegend for style 'fancy' (moderncvbodyv)
% the first optional variable has no effect in this case.
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
% it aligns with the rest of the entries. A readjustment of the first column should therefor
% be avoided. It is recomended to only use \cvskilllegend in the form of
% \cvskilllegend[][<factor>], thereby leaving the defaults in place for the first column.
% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
% Therefor adjusting the first column can be used to widen the table while moving it around. If no
% legend string is used, setting \cvskilllegend[0em] maximises the real enstate for the legend.
%
%
% PRIVATE COMMANDS
%
% \recompute@cvskillmatrix@lengths
% compute all lengths necessary for the skill matrix depending on
% the moderncv style (moderncvbody)
%
% Input: none
%
% Example usage (only internally in moderncvbody<i-v>.sty)
% \recompute@cvskillmatrix@lengths
%
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
%-------------------------------------------------------------------------------
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncvskillmatrix}[2022-02-21 v2.3.1 modern curriculum vitae and letter skill matrix]
% The definitions need to be adjusted depending on which moderncvbody<i-v>.sty style is usde.
% body type options: "moderncvbodyi" (default), "moderncvbodyii", "moderncvbodyiii", "moderncvbodyiv" or "moderncvbodyv"
\@initializeif{\if@moderncvbodyi}\@moderncvbodyifalse
\DeclareOption{moderncvbodyi}{\@moderncvbodyitrue\@moderncvbodyiifalse\@moderncvbodyiiifalse\@moderncvbodyivfalse\@moderncvbodyvfalse}
\@initializeif{\if@moderncvbodyii}\@moderncvbodyiifalse % this option is added in case moderncvbodyii gets implemented standalone
\DeclareOption{moderncvbodyii}{\@moderncvbodyifalse\@moderncvbodyiitrue\@moderncvbodyiiifalse\@moderncvbodyivfalse\@moderncvbodyvfalse}
\@initializeif{\if@moderncvbodyiii}\@moderncvbodyiiifalse
\DeclareOption{moderncvbodyiii}{\@moderncvbodyifalse\@moderncvbodyiifalse\@moderncvbodyiiitrue\@moderncvbodyivfalse\@moderncvbodyvfalse}
\@initializeif{\if@moderncvbodyiv}\@moderncvbodyivfalse
\DeclareOption{moderncvbodyiv}{\@moderncvbodyifalse\@moderncvbodyiifalse\@moderncvbodyiiifalse\@moderncvbodyivtrue\@moderncvbodyvfalse}
\@initializeif{\if@moderncvbodyv}\@moderncvbodyvfalse
\DeclareOption{moderncvbodyv}{\@moderncvbodyifalse\@moderncvbodyiifalse\@moderncvbodyiiifalse\@moderncvbodyivfalse\@moderncvbodyvtrue}
\DeclareOption*{}% avoid choking on unknown options
\ExecuteOptions{moderncvbodyi}
\ProcessOptions*\relax% \ProcessOptions* processes the options in the order provided (i.e., with the later ones possibly overriding the former ones), while \ProcessOptions processes them in the order of the package
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
\RequirePackage{tikz}
\RequirePackage{multirow}
% package arydshln is needed for the dashed lines but is incompatible with fancy style
\if@moderncvbodyv%
% \RequirePackage{arydshln} % incompatible with fancy style
\else%
\RequirePackage{arydshln} % incompatible with fancy style
\fi
% %-------------------------------------------------------------------------------
% % \cvskill command
% %-------------------------------------------------------------------------------
% The code for the Skilllevel illustration with the little boxes.
% This is idea stolen from the limecv package, see https://github.com/opieters/limecv.git
\@initializelength{\cvSkill@RectangleSize}
\setlength{\cvSkill@RectangleSize}{1.2ex}
\newcount\my@repeat@count
\DeclareDocumentCommand{\cvskill}{m}{%
% Illustrate skill level with little colored boxes.
% By default five skill levels are predefined.
%
% Input:
% integer between 0 and 5
% Example usage:
% \cvskill{3}
\begingroup
\my@repeat@count=\z@
\@whilenum\my@repeat@count<#1\do{\tikz\filldraw[color1] (0, 0) rectangle (\cvSkill@RectangleSize, \cvSkill@RectangleSize);\advance%
\my@repeat@count\@ne\,}%
\my@repeat@count=\numexpr5-\z@\relax
\@whilenum\my@repeat@count>#1\do{\tikz\filldraw[color2!30] (0, 0) rectangle (\cvSkill@RectangleSize, \cvSkill@RectangleSize);\advance%
\my@repeat@count\m@ne\,}%
\endgroup
}% end \cvskill
% %-------------------------------------------------------------------------------
% % \recompute@cvskillmatrix@lengths
% %-------------------------------------------------------------------------------
% initialise lengths needed for the skillmatrix
\@initializelength{\cvskill@width}
\@initializelength{\cvskill@descriptorwidth}
\@initializelength{\cvskill@experiencewidth}
\@initializelength{\skillmatrix@columnwidth}
\@initializelength{\skillmatrix@commentwidth}
\@initializelength{\skillmatrix@padding}
\@initializelength{\skillmatrix@hintscolumnwidth}
\@initializelength{\skillmatrix@bodylength}
\@initializelength{\cvskilllegend@leftdescriptorwidth}
\@initializelength{\cvskilllegend@rightdescriptorwidth}
\@initializelength{\skilllegend@hintscolumnwidth}
\@initializelength{\skilllegend@padding}
\@initializelength{\skilllegend@bodylength}
% \separatorrulewidth is defined in moderncvbodyv.sty and we need to
% define it to not throw an error in the other cases
\if@moderncvbodyv%
%
\else%
\@initializelength{\separatorrulewidth}
\setlength{\separatorrulewidth}{1ex}
\fi
\DeclareDocumentCommand{\skilllegend@leftdesriptorfactor}{}{}%
%% DEFINITION \recompute@cvskillmatrix@lengths
% declare the command \recompute@cvskillmatrix@lengths empty
\DeclareDocumentCommand{\recompute@cvskillmatrix@lengths}{}{}%
% compute all lengths necessary for the skill matrix depending on
% the moderncv style (moderncvbody)
%
% Input: none
%
% Example usage (only internally in moderncvbody<i-v>.sty)
% \recompute@cvskillmatrix@lengths
% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyi
\if@moderncvbodyi%
\RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
\setlength{\skillmatrix@padding}{1ex}%
\setlength{\skillmatrix@hintscolumnwidth}{\hintscolumnwidth}%
\setlength{\cvskill@width}{\widthof{\cvskill{5}}}%
\setlength{\cvskill@experiencewidth}{\widthof{``Year''}}%
\setlength{\skillmatrix@bodylength}{\maincolumnwidth}%
\setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
% lengths and definitions needed for the legends
% note that \skillmatrix@padding also affects the appearance of legends
\setlength{\skilllegend@padding}{0.25ex}%
\setlength{\skilllegend@hintscolumnwidth}{\hintscolumnwidth}%
\setlength{\skilllegend@bodylength}{\skillmatrix@bodylength}%
\RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.5}%
}
\fi
% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyiii
\if@moderncvbodyiii%
\RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
\setlength{\skillmatrix@padding}{1ex}%
\setlength{\separatorcolumnwidth}{\skillmatrix@padding}%
\setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Language''}}%
\setlength{\cvskill@width}{\widthof{\cvskill{5}}}%
\setlength{\cvskill@experiencewidth}{\widthof{``Year''}}%
\setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}%
\setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
% lengths and definitions needed for the legends
% note that \skillmatrix@padding also affects the appearance of legends
\setlength{\skilllegend@padding}{0.25ex}%
\setlength{\skilllegend@hintscolumnwidth}{\skillmatrix@hintscolumnwidth}%
\setlength{\skilllegend@bodylength}{\skillmatrix@bodylength}%
\RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.5}%
}
\fi
% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyiv
\if@moderncvbodyiv%
\RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
\setlength{\skillmatrix@padding}{1ex}
\setlength{\separatorcolumnwidth}{\skillmatrix@padding}
\setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Languagi''}}
\setlength{\cvskill@width}{\widthof{\cvskill{5}}}
\setlength{\cvskill@experiencewidth}{\widthof{``Year''}}
\setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}
\setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
% lengths and definitions needed for the legends
% note that \skillmatrix@padding also affects the appearance of legends
\setlength{\skilllegend@padding}{0.25ex}
\setlength{\skilllegend@hintscolumnwidth}{0ex}%\skillmatrix@hintscolumnwidth
\setlength{\skilllegend@bodylength}{\maincolumnwidth}
\RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.45}%
}
\fi
% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyv
\if@moderncvbodyv%
\RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
\setlength{\skillmatrix@padding}{1ex}%
\setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Languages''}}%
\setlength{\cvskill@width}{\widthof{\cvskill{5}}}%
\setlength{\cvskill@experiencewidth}{\widthof{``Year''}}%
\setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\skillmatrix@padding}%\skillmatrix@hintscolumnwidth
\setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
% lengths and definitions needed for the legends
% note that \skillmatrix@padding also affects the appearance of legends
\setlength{\skilllegend@padding}{0.25ex}%
\setlength{\skilllegend@hintscolumnwidth}{\skillmatrix@hintscolumnwidth}%
\setlength{\skilllegend@bodylength}{\maincolumnwidth}%
\RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.48}%
}%
\fi
% %-------------------------------------------------------------------------------
% % \setcvskillcolumns and \setcvskilllegendcolumns
% %-------------------------------------------------------------------------------
% \setcvskillcolumns[<width>][<factor>][<exp_width>]
\DeclareDocumentCommand{\setcvskillcolumns}{+O{\skillmatrix@hintscolumnwidth} +O{\skillmatrix@columnwidth} +O{\cvskill@experiencewidth}}{%
% adjust column width of skill table
%
% The \cvskillentry command comes with default FIXED width definitions of the kill matrix for the columns
% based on the author's own skill matrix. This is necessary to ensure that the entries are nicely aligned
% and actually yield a decent looking table. The defaults depend on the style used and are chosen reasonably.
% However, depending on the user input and the style that is used some of the columns might need adjustments.
% The \setcvskillcolumns command provides means to influence the width of the first, the third and the fourth
% skill matrix column. The second column containg the output of \cvskill remains fixed width. The last column,
% the comment column gets recalculated according to the setting of the other columns.
%
% Input
% Input_1 (optional): width smaller than \textwidth, default <\skillmatrix@hintscolumnwidth>
% Input_2 (optional): float between 0 and 1 adjusting how much percent of the table width without
% the first column is used columns two, three and four. Through this parameter
% the width of the 3rd column (skill name) can be adjusted, default <\skillmatrix@columnwidth>
% Input_3 (optional): width smaller than \textwidth, setting the width of the 4th column
% (Years of experience), default <\cvskill@experiencewidth>
%
% Example usage
% \setcvskillcolumns[5em][][]% adjust first column. Same as \setcvskillcolumns[5em]
% \setcvskillcolumns[][0.45][]% adjust third (skill) column. Same as \setcvskillcolumns[][0.45]
% \setcvskillcolumns[][][\widthof{``Year''}]% adjust fourth (years) column.
% \setcvskillcolumns[\widthof{``Language''}][0.48][]% adjust 1st and 3rd columns. Same as \setcvskillcolumns[\widthof{``Language''}][0.45]
% \setcvskillcolumns[\widthof{``Management Tools''}][0.6][3em]% ajust all at once.
%
% Note
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
% it aligns with the rest of the entries. A readjustment of the first column should therefor
% be avoided. It is recomended to only use \setcvskillcolumns in the form of
% \setcvskillcolumns[][<factor>][<width>], thereby leaving the defaults in place for the first column.
%
\def\arg@new@hintscolumnwidth{#1}% <-- all these terminal % signs are necessary for the fancy style to not show weird spaces!!!
\def\arg@new@bodyLengthFactor{#2}%
\def\arg@new@experienceWidth{#3}%
% Check for empty arguments. Defaults are given. Thus a call of \setcvskillcolumns
% without any arguments leads to nonempty arguments \arg@new@hintscolumnwidth and
% \def\arg@new@bodyLengthFactor{#2}. However, we need to take care of calls like
% \setcvskillcolumns[], \setcvskillcolumns[][], \setcvskillcolumns[][][] or even
% \setcvskillcolumns[<somelength>][], \setcvskillcolumns[][<somefactor>] \setcvskillcolumns[][][<length>]
\ifdefempty{\arg@new@hintscolumnwidth}{%
% Case \setcvskillcolumns[], \setcvskillcolumns[][] or \setcvskillcolumns[][<somefactor>]
\ifdefempty{\arg@new@bodyLengthFactor}{%
% Case \setcvskillcolumns[][] do nothing here and check if third argument is empty
\ifdefempty{\arg@new@experienceWidth}{%
% Case \setcvskillcolumns[][][] do nothing here
}{%
% Case \setcvskillcolumns[][][<length>]. reset \cvskill@experiencewidth and
% \cvskill@descriptorwidth accordingly
\setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
}%
}{%
% Case \setcvskillcolumns[][<somefactor>], \setcvskillcolumns[][<somefactor>][<possilly length>]
\setlength{\skillmatrix@columnwidth}{\arg@new@bodyLengthFactor\skillmatrix@bodylength}%
\ifdefempty{\arg@new@experienceWidth}{%
% Case \setcvskillcolumns[][<somefactor>][] do nothing here
}{%
% Case \setcvskillcolumns[][<somefactor>][<length>]. reset \cvskill@experiencewidth and
% \cvskill@descriptorwidth accordingly
\setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
}%
% Case \setcvskillcolumns[] nothing needs to be done here recalculate lengths affected by the change
}{%
% Case \setcvskillcolumns, \setcvskillcolumns[<width>], \setcvskillcolumns[<width>][]
% or \setcvskillcolumns[<width>][<somefactor>]
\setlength{\skillmatrix@hintscolumnwidth}{\arg@new@hintscolumnwidth}%
\setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}%
% in case second argument is given but left empty use default
\ifdefempty{\arg@new@bodyLengthFactor}{%
% Case \setcvskillcolumns[<width>][] do nothing here and use default
% \skillmatrix@columnwidth and check third argument
\ifdefempty{\arg@new@experienceWidth}{%
% Case \setcvskillcolumns[<width>][][] do nothing here
}{%
% Case \setcvskillcolumns[<width>][][<length>]. reset \cvskill@experiencewidth and
% \cvskill@descriptorwidth accordingly
\setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
% \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
}%
}{%
% Case \setcvskillcolumns, \setcvskillcolumns[<width>], \setcvskillcolumns[<width>][<somefactor>]
\setlength{\skillmatrix@columnwidth}{\arg@new@bodyLengthFactor\skillmatrix@bodylength}%
\ifdefempty{\arg@new@experienceWidth}{%
% Case \setcvskillcolumns[<width>][<somefactor>][] do nothing here
}{%
% Case \setcvskillcolumns[<width>][<somefactor>][<length>]. reset \cvskill@experiencewidth and
% \cvskill@descriptorwidth accordingly
\setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
% \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
}%
}%
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
}%
}%
%
% \setcvskilllegendcolumns[<width>][<factor>]
\DeclareDocumentCommand{\setcvskilllegendcolumns}{+O{\skilllegend@hintscolumnwidth} +O{\skilllegend@leftdesriptorfactor}}{%
% adjust column width of legend
%
% The \cvskilllegend command comes with default FIXED width definitions for the columns of the legend matrix
% such that the default english and german examples look good.
% However, depending on the user input (translation) and the style that is used some adjustment might be needed.
% The \setcvskilllegendcolumns command provides means to influence all columns except the ones containing
% \cvskill commands. The second column containg the output of \cvskill remains fixed width. The last column,
% the comment column gets recalculated according to the setting of the other columns.
%
% Input
% Input_1 (optional): length smaller than \textwidth influencing the width of the first column
% where depending on the style the legend_string gets printed. In case the
% string is left empty adjusting this width allows moving the legend horizontally.
% Default <\skilllegend@hintscolumnwidth>
% Input_2 (optional): float between 0 and 1 influencing the width of the left legend descritor column,
% aka \cvskilllegend@leftdescriptorwidth. The desriptor column on the right,
% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>.
% Default <\skilllegend@leftdesriptorfactor>
%
% Example usage
% \setcvskilllegendcolumns[][0.45]%% adjust left desriptor column.
% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]% adjust both left descriptor column and string column
%
% Note
% - Due to implementation of \cvskilllegend for style 'fancy' (moderncvbodyv)
% the first optional variable has no effect in this case.
% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
% it aligns with the rest of the entries. A readjustment of the first column should therefor
% be avoided. It is recomended to only use \cvskilllegend in the form of
% \cvskilllegend[][<factor>], thereby leaving the defaults in place for the first column.
% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
% Therefor adjusting the first column can be used to widen the table while moving it around. If no
% legend string is used, setting \cvskilllegend[0em] maximises the real enstate for the legend.
%
\def\arg@new@legend@hintscolumnwidth{#1}%
\def\arg@new@legend@leftDescriptorFactor{#2}%
% Check for empty arguments. See explanation above
\ifdefempty{\arg@new@legend@hintscolumnwidth}{%
% Case \setcvskilllegendcolumns[], \setcvskilllegendcolumns[][] or \setcvskilllegendcolumns[][<somefactor>]
\ifdefempty{\arg@new@legend@leftDescriptorFactor}{%
% % Case \setcvskilllegendcolumns[][] do nothing here, i.e. leave default values unaltered
}{%
% Case \setcvskilllegendcolumns[][<somefactor>], \setcvskilllegendcolumns[][<somefactor>]
\RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{\arg@new@legend@leftDescriptorFactor}%
}%
% % Case \setcvskilllegendcolumns[] nothing needs to be done here i.e. leave default values unaltered
}{%
% Case \setcvskilllegendcolumns, \setcvskilllegendcolumns[<width>], \setcvskilllegendcolumns[<width>][]
% or \setcvskilllegendcolumns[<width>][<somefactor>]
\setlength{\skilllegend@hintscolumnwidth}{\arg@new@legend@hintscolumnwidth}%
\if@moderncvbodyi%
\setlength{\skilllegend@bodylength}{\textwidth-\skilllegend@hintscolumnwidth-\separatorcolumnwidth}%
\fi%
\if@moderncvbodyiii%
\setlength{\skilllegend@bodylength}{\textwidth-\skilllegend@hintscolumnwidth-\separatorcolumnwidth}%
\fi%
\if@moderncvbodyiv%
\setlength{\skilllegend@bodylength}{\maincolumnwidth-\skilllegend@hintscolumnwidth-\separatorcolumnwidth}%
\fi%
% in case second argument is given but left empty use default
\ifdefempty{\arg@new@legend@leftDescriptorFactor}{%
% Case \setcvskilllegendcolumns[<width>][] do nothing here and leave default values unaltered
}{%
% Case \setcvskilllegendcolumns, \setcvskilllegendcolumns[<width>], \setcvskilllegendcolumns[<width>][<somefactor>]
\RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{\arg@new@legend@leftDescriptorFactor}%
}%
}%
}%
%
% %-------------------------------------------------------------------------------
% % \cvskilllegend
% %-------------------------------------------------------------------------------
% default legend style
% \cvskilllegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
\NewDocumentCommand\skillLegend@FontSize{}{\scriptsize}
\DeclareDocumentCommand\cvskilllegend{s +O{} +O{} +O{} +O{} +O{} +O{} +m}{}%
% Print legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
%
% Input:
% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
% For the fancy style, the asterix has no meaning.
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
% input_7: string giving a name to the legend, default: <>
%
% Example usages:
% \cvskilllegend{} print default legend
% \cvskilllegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
% \cvskilllegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
%
% Note:
% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
% -The design of the table is such that the <second_level> entry stands in the first column but
% occupies rows two and three. This has been done to accomodate english and german defaults.
% An alternative is provided by \cvskillplainlegend
% declare default legend entries
\NewDocumentCommand\skillLegend@defaultLevelOne{}{basic knowledge}
\NewDocumentCommand\skillLegend@defaultLevelTwo{}{intermediate knowledge with some project experience}
\NewDocumentCommand\skillLegend@defaultLevelThree{}{extensive project experience}
\NewDocumentCommand\skillLegend@defaultLevelFour{}{deepened expert knowledge}
\NewDocumentCommand\skillLegend@defaultLevelFive{}{expert\,/\,specialist}
% Redefinition of \cvskilllegend valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii
\RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
\IfBooleanTF#1{% if a star is given, add dashed line
\begingroup%
\arrayrulecolor{color1}%
% calculate descriptor widths
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%%
p{2\skilllegend@padding}p{\cvskilllegend@leftdescriptorwidth}@{}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
p{2\skilllegend@padding}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{#8} & \cvskill{1}& & {\skillLegend@FontSize #3} & \cvskill{3}& &{\skillLegend@FontSize #5 } \\%
%
& \cvskill{2} & & \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}& & {\skillLegend@FontSize #6 } \\%
%
& & & & \cvskill{5}& & {\skillLegend@FontSize #7 }%
\end{tabular}%
\endgroup
\par\addvspace{#2}}{%
% if no star is given, do not add dashed line. We need less padding in this case
\begingroup%
% calculate descriptor columns width. note the adjusted padding
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-1\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-1\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{#8} & \cvskill{1}\, & \,{\skillLegend@FontSize #3} & \cvskill{3}\, &\,{\skillLegend@FontSize #5 } \\%
%
& \cvskill{2}\, & \,\multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}\, &\,{\skillLegend@FontSize #6 } \\%
%
& & & \cvskill{5}\, &\,{\skillLegend@FontSize #7 }%
\end{tabular}%
\endgroup%
\par\addvspace{#2}%
}%
}%
% Redefinition of \cvskilllegend valid for moderncvbodyiv
\if@moderncvbodyiv%
\RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
\def\arg@legendString{#8}%
\ifdefempty{\arg@legendString}{%
}{%
\cvitem[0.25em]{\hintstyle{#8}}{}%
}%
\IfBooleanTF#1{% if a star is given, add dashed line
\begingroup%
% recalculate desrciptor widths on the fly. Allows for different padding
% in the stared and nonstared case
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
\arrayrulecolor{color1}
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
p{2\skilllegend@padding}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
p{2\skilllegend@padding}p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{} & \cvskill{1} & & {\skillLegend@FontSize #3} & \cvskill{3} & & {\skillLegend@FontSize #5 } \\
%
& \cvskill{2} & & \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4} & &{\skillLegend@FontSize #6 } \\
%
& & & & \cvskill{5}& & {\skillLegend@FontSize #7 }
\end{tabular}%
\endgroup%
\par\addvspace{#2}}{
\begingroup%
% oddly enough, we should only need to subtract 2 paddings in the descritorwidths.
% but while testing I got overflow of text into the margin
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-5\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{3} & {\skillLegend@FontSize #5 } \\
%
& \cvskill{2} & \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4} &{\skillLegend@FontSize #6 } \\
%
& & & \cvskill{5} & {\skillLegend@FontSize #7 }
\end{tabular}%
\endgroup%
\par\addvspace{#2}
}
}
\fi
% Redefinition of \cvskilllegend valid for moderncvbodyv
\if@moderncvbodyv%
\DeclareDocumentCommand\@starIndependentTabular{}{}%
\RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
% check whether Argument #8 is given and if so provide it as cvitem
\def\arg@legendString{#8}%
\ifdefempty{\arg@legendString}{%
\vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
}{%
\cvitem[-0.5em]{#8}{}%
}%
\arrayrulecolor{color1}%
\setlength\arrayrulewidth{\separatorrulewidth}%
\RenewDocumentCommand{\@starIndependentTabular}{}{%
\begingroup%
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
% \renewcommand{\arraystretch}{1.0}%
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegend@hintscolumnwidth
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{3\skilllegend@padding}}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{3\skilllegend@padding}}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\@moderncvstrut{4pt}{16pt} & \cvskill{1}& {\skillLegend@FontSize #3} & \cvskill{3}& {\skillLegend@FontSize #5 }\\%
%
& \cvskill{2}& \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}& {\skillLegend@FontSize #6 }\\%
%
& & & \cvskill{5} & {\skillLegend@FontSize #7 }\\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly
\end{tabular}%
\endgroup%
\par\@aftersectionfalse\ignorespaces%
}%
% because of this weird style and the position of the parameter [#2], the dashed lines of the other version look bad. So no lines.
\IfBooleanTF#1{%
\@starIndependentTabular%
}{%
\@starIndependentTabular%
}%
}%
\fi
% %-------------------------------------------------------------------------------
% % \cvskillplainlegend
% %-------------------------------------------------------------------------------
% alternative legend style
% \cvskillplainlegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
\DeclareDocumentCommand\cvskillplainlegend{s +O{} +O{} +O{} +O{} +O{} +O{} +m}{}%
% Print alternative legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
% In this legend, the first three skill levels are in one column
%
% Input:
% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
% For the fancy style, the asterix has no meaning.
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
% input_7: string giving a name to the legend, default: <>
%
% Example usages:
% \cvskillplainlegend{} print default legend
% \cvskillplainlegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
% \cvskillplainlegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
%
% Note:
% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
% declare default legend entries
\NewDocumentCommand\skillPlainLegend@defaultLevelOne{}{basic knowlegde}
\NewDocumentCommand\skillPlainLegend@defaultLevelTwo{}{intermediate knowledge, some project experience}
\NewDocumentCommand\skillPlainLegend@defaultLevelThree{}{extensive project experience}
\NewDocumentCommand\skillPlainLegend@defaultLevelFour{}{deepened expert knowledge}
\NewDocumentCommand\skillPlainLegend@defaultLevelFive{}{expert/guru}
% Redefinition of \cvskillplainlegend valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii
\RenewDocumentCommand\cvskillplainlegend{s +O{.25em} +O{\skillPlainLegend@defaultLevelOne} +O{\skillPlainLegend@defaultLevelTwo} +O{\skillPlainLegend@defaultLevelThree} +O{\skillPlainLegend@defaultLevelFour} +O{\skillPlainLegend@defaultLevelFive} +m}{%
\IfBooleanTF#1{% if a star is given, add dashed line
\begingroup%
\arrayrulecolor{color1}%
% calculate descriptor widths
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%%
p{2\skilllegend@padding}p{\cvskilllegend@leftdescriptorwidth}@{}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
p{2\skilllegend@padding}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{#8} & \cvskill{1}& & {\skillLegend@FontSize #3} & \cvskill{4}& &{\skillLegend@FontSize #6} \\%
%
& \cvskill{2} & & {\skillLegend@FontSize #4} & \cvskill{5}& & {\skillLegend@FontSize #7} \\%
%
& \cvskill{3} & & {\skillLegend@FontSize #5} & & & %
\end{tabular}%
\endgroup%
\par\addvspace{#2}}{%
% if no star is given, do not add dashed line
\begingroup%
% calculate descriptor widths, note that we use less padding
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{#8} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{4} &{\skillLegend@FontSize #6} \\%
%
& \cvskill{2} & {\skillLegend@FontSize #4} & \cvskill{5} &{\skillLegend@FontSize #7} \\%
%
& \cvskill{3} & {\skillLegend@FontSize #5 } & & %
\end{tabular}%
\endgroup%
\par\addvspace{#2}%
}%
}%
% Redefinition of \cvskillplainlegend valid for moderncvbodyiv
\if@moderncvbodyiv%
\RenewDocumentCommand\cvskillplainlegend{s +O{.25em} +O{\skillPlainLegend@defaultLevelOne} +O{\skillPlainLegend@defaultLevelTwo} +O{\skillPlainLegend@defaultLevelThree} +O{\skillPlainLegend@defaultLevelFour} +O{\skillPlainLegend@defaultLevelFive} +m}{%
\def\arg@legendString{#8}%
\ifdefempty{\arg@legendString}{%
}{%
\cvitem[0.25em]{\hintstyle{#8}}{}%
}%
\IfBooleanTF#1{% if a star is given, add dashed line
\begingroup%
\arrayrulecolor{color1}
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-6\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-6\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
p{2\skilllegend@padding}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
p{2\skilllegend@padding}p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{} & \cvskill{1} & & {\skillLegend@FontSize#3} & \cvskill{4} & & {\skillLegend@FontSize#6}\\%
%
& \cvskill{2} & &{\skillLegend@FontSize#4} & \cvskill{5} & &{\skillLegend@FontSize#7}\\%
%
& \cvskill{3} & &{\skillLegend@FontSize#5} & & &%
\end{tabular}%
\endgroup%
\par\addvspace{#2}}{
% if no star is given, do not add dashed line
\begingroup
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
\begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\raggedleft\hintstyle{} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{4} & {\skillLegend@FontSize #6} \\
%
& \cvskill{2} & {\skillLegend@FontSize #4} & \cvskill{5} & {\skillLegend@FontSize #7} \\
%
& \cvskill{3} & {\skillLegend@FontSize #5} & & %
\end{tabular}%
\endgroup
\par\addvspace{#2}
}
}
\fi
% Redefinition of \cvskillplainlegend valid for moderncvbodyv
\if@moderncvbodyv%
\RenewDocumentCommand\cvskillplainlegend{s +O{.25em} +O{\skillPlainLegend@defaultLevelOne} +O{\skillPlainLegend@defaultLevelTwo} +O{\skillPlainLegend@defaultLevelThree} +O{\skillPlainLegend@defaultLevelFour} +O{\skillPlainLegend@defaultLevelFive} +m}{%
% check whether Argument #8 is given and if so provide it as cvitem
\def\arg@legendString{#8}%
\ifdefempty{\arg@legendString}{%
\vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
}{%
\cvitem[-0.5em]{#8}{}%
}%
\arrayrulecolor{color1}%
\setlength\arrayrulewidth{\separatorrulewidth}%
\RenewDocumentCommand{\@starIndependentTabular}{}{%
\begingroup%
% \renewcommand{\arraystretch}{1.0}%
\setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
\setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegend@hintscolumnwidth
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
p{\cvskilllegend@rightdescriptorwidth}@{}}%
\@moderncvstrut{4pt}{16pt} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{4} & {\skillLegend@FontSize #6}\\%
%
& \cvskill{2} & {\skillLegend@FontSize #4} & \cvskill{5} & {\skillLegend@FontSize #7}\\%
%
& \cvskill{3} & {\skillLegend@FontSize #5} & & \\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly
\end{tabular}%
\endgroup%
\par\@aftersectionfalse\ignorespaces%
}%
% because of this weird style and the position of the parameter [#2], the dashed lines of the other version look bad. So no lines.
\IfBooleanTF#1{%
\@starIndependentTabular%
}{%
\@starIndependentTabular%
}%
}%
\fi
% %-------------------------------------------------------------------------------
% % \cvskillhead
% %-------------------------------------------------------------------------------
\NewDocumentCommand\cvSkillMatrix@HeadFont{}{\normalfont}
\DeclareDocumentCommand\cvskillhead{+O{} +O{} +O{} +O{} +O{}}{}%
% add skill matrix line acting as header explaining the meaning of columns.
%
% Input:
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2 (optional): string naming the level column (2nd column), default: <Level>
% input_3 (optional): string naming the skill column (3nd column), default: <Skill>
% input_4 (optional): string naming the experience-in-years column (4th column), default: <Years>
% input_5 (optional): string naming the comment column (5th column), default: <Comment>
%
% Example usages:
% \cvskillhead print default head.
% \cvskillhead[0.5em] print default head, but adjust post padding.
% \cvskillhead[0.25em][Level][F\"ahigkeit][Jahre][Bemerkung] Fully adjust head to German example
%
% Note:
% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
\NewDocumentCommand\skillMatrix@HeaderDefaultOne{}{Level}
\NewDocumentCommand\skillMatrix@HeaderDefaultTwo{}{Skill}
\NewDocumentCommand\skillMatrix@HeaderDefaultThree{}{Years}
\NewDocumentCommand\skillMatrix@HeaderDefaultFour{}{Comment}
% Definition of \cvskillhead valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv
\RenewDocumentCommand\cvskillhead{O{.25em} +O{\skillMatrix@HeaderDefaultOne} +O{\skillMatrix@HeaderDefaultTwo} +O{\skillMatrix@HeaderDefaultThree} +O{\skillMatrix@HeaderDefaultFour}}{%
\begingroup
\renewcommand{\arraystretch}{1.25}
\arrayrulecolor{color1}
\begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@experiencewidth}@{\hspace{\skillmatrix@padding}}
p{\skillmatrix@commentwidth}@{}}%
& \centering{\cvSkillMatrix@HeadFont #2} & \centering{\cvSkillMatrix@HeadFont #3} & \centering{\cvSkillMatrix@HeadFont #4} & {\cvSkillMatrix@HeadFont #5}
\end{tabular}%
\endgroup
\par\addvspace{#1}
}
% Definition of \cvskillhead valid moderncvbodyv
\if@moderncvbodyv%
\RenewDocumentCommand\cvskillhead{O{.25em} +O{\skillMatrix@HeaderDefaultOne} +O{\skillMatrix@HeaderDefaultTwo} +O{\skillMatrix@HeaderDefaultThree} +O{\skillMatrix@HeaderDefaultFour}}{%
\arrayrulecolor{color1}%
\setlength\arrayrulewidth{\separatorrulewidth}%
\vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
\begingroup%
% \renewcommand{\arraystretch}{1.25}%
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
p{\skillmatrix@hintscolumnwidth}%
@{\hspace{\skillmatrix@padding}}%
p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@experiencewidth}@{\hspace{\skillmatrix@padding}}%
p{\skillmatrix@commentwidth}@{}}%
& & \centering{\cvSkillMatrix@HeadFont#2} & \centering{\cvSkillMatrix@HeadFont#3} & \centering{\cvSkillMatrix@HeadFont#4} & {\cvSkillMatrix@HeadFont#5} \\[#1]% the spacing needs to be inside the cell for the vertical rule to extend correctly
\end{tabular}%
\endgroup%
\par\@aftersectionfalse\ignorespaces%
}%
\fi
% %-------------------------------------------------------------------------------
% % \cvskillentry
% %-------------------------------------------------------------------------------
% \cvskillentry[*][<post_padding>]{<skill_cathegory>}{<0-5>}{<skill_name>}{<years_of_experience>}{<comment>}%
\DeclareDocumentCommand\cvskillentry{s +O{} +m +m +m +m +m}{}%
% add cvskill matrix row.
%
% Input:
% asterix (optional): include horizontal (dashed) line above the entered line. This behaviour depends on the body style.
% For the fancy style, the asterix has no meaning.
% input_1 (optional): padding length appended to the legend, default: <0.25em>
% input_2: string, naming skill cathegory, default: <>
% input_3: integer between 0 and 5, describing level of skill. \cvskill{input_2} is called internally, default: <>
% input_4: string, naming the skill, default: <>
% input_5: positive real number, stating the number of years of experience with this skill , default: <>
% input_6: string, explaining details w.r.t. that particual skill default: <>
%
% Example usages:
% \cvskillentry*{Language:}{3}{Python}{2}{I have done a million projects with Python}
% \cvskillentry{}{2}{Lilypond}{14}{So much sheet music! Man I'm the best!}
% \cvskillentry{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
% \cvskillentry*[1.5em]{OS:}{3}{Linux}{2}{I only use Archlinux}
%
% Note:
% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
% Definition of \cvskillentry valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv
\RenewDocumentCommand\cvskillentry{s +O{.25em} +m +m +m +m +m}{%
%test for the star * in the command
\IfBooleanTF{#1}{% If a star is seen a dotted line is drawn above the entry
\begingroup
\renewcommand{\arraystretch}{1.25}
\arrayrulecolor{color1}
\begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@padding}}%
p{\skillmatrix@commentwidth}@{}}%
\cdashline{2-5}[.6pt/1pt]
\raggedleft\hintstyle{#3} &\centering \cvskill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%