work first working version \skillMatrixColumnWidth

This commit is contained in:
David 2021-01-19 13:15:00 +01:00
commit dada6c7a2f
2 changed files with 168 additions and 123 deletions

View file

@ -48,18 +48,18 @@
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
% The code for the Skilllevel illustration with the little boxes. % The code for the Skilllevel illustration with the little boxes.
% This is idea stolen from the limecv package % This is idea stolen from the limecv package
\@initializelength{\cvSkillRectangleSize} \@initializelength{\cvSkill@RectangleSize}
\setlength{\cvSkillRectangleSize}{1.2ex} \setlength{\cvSkill@RectangleSize}{1.2ex}
\newcount\my@repeat@count \newcount\my@repeat@count
\DeclareDocumentCommand{\cvSkill}{m}{% \DeclareDocumentCommand{\cvSkill}{m}{%
\begingroup \begingroup
\my@repeat@count=\z@ \my@repeat@count=\z@
\@whilenum\my@repeat@count<#1\do{\tikz\filldraw[color1] (0, 0) rectangle (\cvSkillRectangleSize, \cvSkillRectangleSize);\advance% \@whilenum\my@repeat@count<#1\do{\tikz\filldraw[color1] (0, 0) rectangle (\cvSkill@RectangleSize, \cvSkill@RectangleSize);\advance%
\my@repeat@count\@ne\,}% \my@repeat@count\@ne\,}%
\my@repeat@count=\numexpr5-\z@\relax \my@repeat@count=\numexpr5-\z@\relax
\@whilenum\my@repeat@count>#1\do{\tikz\filldraw[color2!30] (0, 0) rectangle (\cvSkillRectangleSize, \cvSkillRectangleSize);\advance% \@whilenum\my@repeat@count>#1\do{\tikz\filldraw[color2!30] (0, 0) rectangle (\cvSkill@RectangleSize, \cvSkill@RectangleSize);\advance%
\my@repeat@count\m@ne\,}% \my@repeat@count\m@ne\,}%
\endgroup \endgroup
} }
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
@ -67,15 +67,15 @@
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
% initialise lengths needed for the skillmatrix % initialise lengths needed for the skillmatrix
\@initializelength{\cvskillwidth} \@initializelength{\cvskill@width}
\@initializelength{\cvskilldescriptorwidth} \@initializelength{\cvskill@descriptorwidth}
\@initializelength{\cvskilllegenddescriptorwidth} \@initializelength{\cvskilllegend@descriptorwidth}
\@initializelength{\cvskillexperiencewidth} \@initializelength{\cvskill@experiencewidth}
\@initializelength{\skillmatrixcolumnwidth} \@initializelength{\skillmatrix@columnwidth}
\@initializelength{\skillmatrixcommentwidth} \@initializelength{\skillmatrix@commentwidth}
\@initializelength{\skillmatrixcommentpadding} \@initializelength{\skillmatrix@commentpadding}
\@initializelength{\skillmatrixhintscolumnwidth} \@initializelength{\skillmatrix@hintscolumnwidth}
\@initializelength{\skilllegendhintscolumnwidth} \@initializelength{\skilllegend@hintscolumnwidth}
% \separatorrulewidth is defined in moderncvbodyv.sty and we need to % \separatorrulewidth is defined in moderncvbodyv.sty and we need to
% define it to not throw an error in the other cases % define it to not throw an error in the other cases
\if@moderncvbodyv% \if@moderncvbodyv%
@ -91,96 +91,140 @@
% the command gets redifined depending on which option is given % the command gets redifined depending on which option is given
\if@moderncvbodyi% \if@moderncvbodyi%
\RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{% \RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{%
\setlength{\skillmatrixcommentpadding}{1ex} \setlength{\skillmatrix@commentpadding}{1ex}
\setlength{\skillmatrixhintscolumnwidth}{\hintscolumnwidth} \setlength{\skillmatrix@hintscolumnwidth}{\hintscolumnwidth}
\setlength{\skilllegendhintscolumnwidth}{\hintscolumnwidth} \setlength{\skilllegend@hintscolumnwidth}{\hintscolumnwidth}
\setlength{\cvskillwidth}{\widthof{\cvSkill{5}}} \setlength{\cvskill@width}{\widthof{\cvSkill{5}}}
\setlength{\cvskillexperiencewidth}{\widthof{``Jahre''}} \setlength{\cvskill@experiencewidth}{\widthof{``Jahre''}}
\setlength{\skillmatrixcolumnwidth}{0.45\maincolumnwidth}% \setlength{\skillmatrix@columnwidth}{0.45\maincolumnwidth}%
\setlength{\cvskilldescriptorwidth}{\skillmatrixcolumnwidth-\cvskillwidth-\cvskillexperiencewidth} \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrixcommentwidth}{\maincolumnwidth-\skillmatrixcolumnwidth-\skillmatrixcommentpadding}% \setlength{\skillmatrix@commentwidth}{\maincolumnwidth-\skillmatrix@columnwidth-\skillmatrix@commentpadding}%
\setlength{\cvskilllegenddescriptorwidth}{0.5\maincolumnwidth-\cvskillwidth-\skillmatrixcommentpadding} \setlength{\cvskilllegend@descriptorwidth}{0.5\maincolumnwidth-\cvskill@width-\skillmatrix@commentpadding}
} }
\fi \fi
\if@moderncvbodyiii% \if@moderncvbodyiii%
\RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{% \RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{%
\setlength{\skillmatrixcommentpadding}{1ex} \setlength{\skillmatrix@commentpadding}{1ex}
\setlength{\separatorcolumnwidth}{\skillmatrixcommentpadding} \setlength{\separatorcolumnwidth}{\skillmatrix@commentpadding}
\setlength{\skillmatrixhintscolumnwidth}{\widthof{``Language''}} \setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Language''}}
\setlength{\skilllegendhintscolumnwidth}{\skillmatrixhintscolumnwidth}% \setlength{\skilllegend@hintscolumnwidth}{\skillmatrix@hintscolumnwidth}%
\setlength{\cvskillwidth}{\widthof{\cvSkill{5}}} \setlength{\cvskill@width}{\widthof{\cvSkill{5}}}
\setlength{\cvskillexperiencewidth}{\widthof{``Jahre''}} \setlength{\cvskill@experiencewidth}{\widthof{``Jahre''}}
\@initializelength{\matrixbodylength} \@initializelength{\skillmatrix@bodylength}
\setlength{\matrixbodylength}{\maincolumnwidth-\skillmatrixhintscolumnwidth-\separatorcolumnwidth} \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}
\setlength{\skillmatrixcolumnwidth}{0.45\matrixbodylength}% \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskilldescriptorwidth}{\skillmatrixcolumnwidth-\cvskillwidth-\cvskillexperiencewidth} \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrixcommentwidth}{\matrixbodylength-\skillmatrixcolumnwidth-\skillmatrixcommentpadding}% \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-\skillmatrix@commentpadding}%
\setlength{\cvskilllegenddescriptorwidth}{0.5\matrixbodylength-\cvskillwidth-\skillmatrixcommentpadding} \setlength{\cvskilllegend@descriptorwidth}{0.5\skillmatrix@bodylength-\cvskill@width-\skillmatrix@commentpadding}
} }
\fi \fi
\if@moderncvbodyiv% \if@moderncvbodyiv%
\RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{% \RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{%
\setlength{\skillmatrixcommentpadding}{1ex} \setlength{\skillmatrix@commentpadding}{1ex}
\setlength{\separatorcolumnwidth}{\skillmatrixcommentpadding} \setlength{\separatorcolumnwidth}{\skillmatrix@commentpadding}
\setlength{\skillmatrixhintscolumnwidth}{\widthof{``Languagi''}} \setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Languagi''}}
\setlength{\skilllegendhintscolumnwidth}{0ex}%\skillmatrixhintscolumnwidth \setlength{\skilllegend@hintscolumnwidth}{0ex}%\skillmatrix@hintscolumnwidth
\setlength{\cvskillwidth}{\widthof{\cvSkill{5}}} \setlength{\cvskill@width}{\widthof{\cvSkill{5}}}
\setlength{\cvskillexperiencewidth}{\widthof{``Jahre''}} \setlength{\cvskill@experiencewidth}{\widthof{``Jahre''}}
\@initializelength{\matrixbodylength} \@initializelength{\skillmatrix@bodylength}
\setlength{\matrixbodylength}{\maincolumnwidth-\skillmatrixhintscolumnwidth-\separatorcolumnwidth} \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}
\setlength{\skillmatrixcolumnwidth}{0.45\matrixbodylength}% \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskilldescriptorwidth}{\skillmatrixcolumnwidth-\cvskillwidth-\cvskillexperiencewidth} \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrixcommentwidth}{\matrixbodylength-\skillmatrixcolumnwidth-\skillmatrixcommentpadding}% \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-\skillmatrix@commentpadding}%
\setlength{\cvskilllegenddescriptorwidth}{0.5\maincolumnwidth-\cvskillwidth-\skillmatrixcommentpadding} \setlength{\cvskilllegend@descriptorwidth}{0.5\maincolumnwidth-\cvskill@width-\skillmatrix@commentpadding}
} }
\fi \fi
\if@moderncvbodyv% \if@moderncvbodyv%
\RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{% \RenewDocumentCommand{\recomputecvskillmatrixlengths}{}{%
\setlength{\skillmatrixcommentpadding}{1ex} \setlength{\skillmatrix@commentpadding}{1ex}
\setlength{\skillmatrixhintscolumnwidth}{\widthof{``Languages''}} \setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Languages''}}
\setlength{\skilllegendhintscolumnwidth}{\skillmatrixhintscolumnwidth} \setlength{\skilllegend@hintscolumnwidth}{\skillmatrix@hintscolumnwidth}
\setlength{\cvskillwidth}{\widthof{\cvSkill{5}}} \setlength{\cvskill@width}{\widthof{\cvSkill{5}}}
\setlength{\cvskillexperiencewidth}{\widthof{``Jahre''}} \setlength{\cvskill@experiencewidth}{\widthof{``Jahre''}}
\@initializelength{\matrixbodylength} \@initializelength{\skillmatrix@bodylength}
\setlength{\matrixbodylength}{\maincolumnwidth-\skillmatrixhintscolumnwidth-\skillmatrixcommentpadding}%\skillmatrixhintscolumnwidth \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\skillmatrix@commentpadding}%\skillmatrix@hintscolumnwidth
\setlength{\skillmatrixcolumnwidth}{0.45\matrixbodylength}% \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
\setlength{\cvskilldescriptorwidth}{\skillmatrixcolumnwidth-\cvskillwidth-\cvskillexperiencewidth} \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrixcommentwidth}{\matrixbodylength-\skillmatrixcolumnwidth-\skillmatrixcommentpadding}% \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-\skillmatrix@commentpadding}%
\setlength{\cvskilllegenddescriptorwidth}{0.5\maincolumnwidth-\cvskillwidth-\skillmatrixcommentpadding} \setlength{\cvskilllegend@descriptorwidth}{0.5\maincolumnwidth-\cvskill@width-\skillmatrix@commentpadding}
} }
\fi \fi
% command to adjust the width of the first colum of the skillmatrix
% and the colum 3rd (Skill) column. It takes two optional arguments.
% \skillMatrixColumnWidth[<width>][<factor>], where <width> is a length smaller than
% \textwidth and 0 < <factor> < 1 is a factor influencing the width of the skill column,
% aka \skillmatrix@columnwidth
\DeclareDocumentCommand{\skillMatrixColumnWidth}{+O{} +O{}}{}%
\RenewDocumentCommand{\skillMatrixColumnWidth}{+O{\skillmatrix@hintscolumnwidth} +O{0.45}}{
\def\arg@new@hintscolumnwidth{#1}%
\def\arg@new@bodyLengthFactor{#2}%
% Check for empty arguments. Defaults are given. Thus a call of \skillMatrixColumnWidth
% 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
% \skillMatrixColumnWidth[], \skillMatrixColumnWidth[][] or even
% \skillMatrixColumnWidth[<somelength>][] \skillMatrixColumnWidth[][<somefactor>]
\ifdefempty{\arg@new@hintscolumnwidth}{%
% Case \skillMatrixColumnWidth[], \skillMatrixColumnWidth[][] or \skillMatrixColumnWidth[][<somefactor>]
\ifdefempty{\arg@new@bodyLengthFactor}{
% Case \skillMatrixColumnWidth[][] do nothing here and use default
% \skillmatrix@columnwidth
}{%
% Case \skillMatrixColumnWidth[][<somefactor>]
\setlength{\skillmatrix@columnwidth}{\arg@new@bodyLengthFactor\skillmatrix@bodylength}%
}
% Case \skillMatrixColumnWidth[] and recalculate lengths affected by the change
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-\skillmatrix@commentpadding}%
}{%
% Case \skillMatrixColumnWidth, \skillMatrixColumnWidth[<width>], \skillMatrixColumnWidth[<width>][]
% or \skillMatrixColumnWidth[<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 \skillMatrixColumnWidth[<width>][] do nothing here and use default
% \skillmatrix@columnwidth
}{%
% Case \skillMatrixColumnWidth, \skillMatrixColumnWidth[<width>], \skillMatrixColumnWidth[<width>][<somefactor>]
\setlength{\skillmatrix@columnwidth}{\arg@new@bodyLengthFactor\skillmatrix@bodylength}%
}
\setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
\setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-\skillmatrix@commentpadding}%
}%
}
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
% % \cvSkillMatrixLegend % % \cvSkillMatrixLegend
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
\NewDocumentCommand\legendFontSize{}{\scriptsize} \NewDocumentCommand\skillLegend@FontSize{}{\scriptsize}
\DeclareDocumentCommand\cvSkillMatrixLegend{s +O{} +O{} +O{} +O{} +O{} +O{} +m}{}% \DeclareDocumentCommand\cvSkillMatrixLegend{s +O{} +O{} +O{} +O{} +O{} +O{} +m}{}%
% The following definition is valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii % The following definition is valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii
\RenewDocumentCommand\cvSkillMatrixLegend{s +O{.25em} +O{basic knowledge} +O{intermediate knowledge with experience in projects} +O{extensive experience in projects} +O{deep expert knowledge} +O{expert/guru} +m}{% \RenewDocumentCommand\cvSkillMatrixLegend{s +O{.25em} +O{basic knowledge} +O{intermediate knowledge with experience in projects} +O{extensive experience in projects} +O{deep expert knowledge} +O{expert/guru} +m}{%
\IfBooleanTF#1{% if a star is given, add dashed line \IfBooleanTF#1{% if a star is given, add dashed line
\begingroup \begingroup
\arrayrulecolor{color1} \arrayrulecolor{color1}
\begin{tabular}{@{}p{\skilllegendhintscolumnwidth} \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{};{.6pt/1pt}p{\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}p{\cvskillwidth}@{};{.6pt/1pt}p{\cvskilllegenddescriptorwidth}@{}}% @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{};{.6pt/1pt}p{\cvskilllegend@descriptorwidth} @{\hspace{2\skillmatrix@commentpadding}}p{\cvskill@width}@{};{.6pt/1pt}p{\cvskilllegend@descriptorwidth}@{}}%
\raggedleft\hintstyle{#8} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\ \raggedleft\hintstyle{#8} & \cvSkill{1}\, & \,{\skillLegend@FontSize #3} & \cvSkill{3}\, &\,{\skillLegend@FontSize #5 } \\
% %
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\ & \cvSkill{2}\, & \,\multirow{2}{\cvskilllegend@descriptorwidth}{{\skillLegend@FontSize #4}} & \cvSkill{4}\, &\,{\skillLegend@FontSize #6 } \\
% %
& & & \cvSkill{5}\, &\,{\legendFontSize #7 } & & & \cvSkill{5}\, &\,{\skillLegend@FontSize #7 }
\end{tabular}% \end{tabular}%
\endgroup \endgroup
\par\addvspace{#2}}{ \par\addvspace{#2}}{
% if no star is given, do not add dashed line % if no star is given, do not add dashed line
\begin{tabular}{@{}p{\skilllegendhintscolumnwidth} \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}p{\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}p{\cvskillwidth}@{}p{\cvskilllegenddescriptorwidth}@{}}% @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{}p{\cvskilllegend@descriptorwidth} @{\hspace{2\skillmatrix@commentpadding}}p{\cvskill@width}@{}p{\cvskilllegend@descriptorwidth}@{}}%
\raggedleft\hintstyle{#8} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\ \raggedleft\hintstyle{#8} & \cvSkill{1}\, & \,{\skillLegend@FontSize #3} & \cvSkill{3}\, &\,{\skillLegend@FontSize #5 } \\
% %
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\ & \cvSkill{2}\, & \,\multirow{2}{\cvskilllegend@descriptorwidth}{{\skillLegend@FontSize #4}} & \cvSkill{4}\, &\,{\skillLegend@FontSize #6 } \\
% %
& & & \cvSkill{5}\, &\,{\legendFontSize #7 } & & & \cvSkill{5}\, &\,{\skillLegend@FontSize #7 }
\end{tabular}% \end{tabular}%
\par\addvspace{#2} \par\addvspace{#2}
} }
@ -188,32 +232,32 @@
\if@moderncvbodyiv% \if@moderncvbodyiv%
\RenewDocumentCommand\cvSkillMatrixLegend{s +O{.25em} +O{basic knowledge} +O{intermediate knowledge with experience in projects} +O{extensive experience in projects} +O{deep expert knowledge} +O{expert/guru} +m}{% \RenewDocumentCommand\cvSkillMatrixLegend{s +O{.25em} +O{basic knowledge} +O{intermediate knowledge with experience in projects} +O{extensive experience in projects} +O{deep expert knowledge} +O{expert/guru} +m}{%
\def\legendString{#8}% \def\arg@legendString{#8}%
\ifdefempty{\legendString}{% \ifdefempty{\arg@legendString}{%
}{% }{%
\cvitem[0.25em]{\hintstyle{#8}}{}% \cvitem[0.25em]{\hintstyle{#8}}{}%
}% }%
\IfBooleanTF#1{% if a star is given, add dashed line \IfBooleanTF#1{% if a star is given, add dashed line
\begingroup \begingroup
\arrayrulecolor{color1} \arrayrulecolor{color1}
\begin{tabular}{@{}p{\skilllegendhintscolumnwidth} \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{};{.6pt/1pt}p{0.9\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}p{\cvskillwidth}@{};{.6pt/1pt}p{1.1\cvskilllegenddescriptorwidth}@{}}% @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{};{.6pt/1pt}p{0.9\cvskilllegend@descriptorwidth} @{\hspace{2\skillmatrix@commentpadding}}p{\cvskill@width}@{};{.6pt/1pt}p{1.1\cvskilllegend@descriptorwidth}@{}}%
\raggedleft\hintstyle{} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\ \raggedleft\hintstyle{} & \cvSkill{1}\, & \,{\skillLegend@FontSize #3} & \cvSkill{3}\, &\,{\skillLegend@FontSize #5 } \\
% %
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\ & \cvSkill{2}\, & \,\multirow{2}{\cvskilllegend@descriptorwidth}{{\skillLegend@FontSize #4}} & \cvSkill{4}\, &\,{\skillLegend@FontSize #6 } \\
% %
& & & \cvSkill{5}\, &\,{\legendFontSize #7 } & & & \cvSkill{5}\, &\,{\skillLegend@FontSize #7 }
\end{tabular}% \end{tabular}%
\endgroup \endgroup
\par\addvspace{#2}}{ \par\addvspace{#2}}{
% if no star is given, do not add dashed line % if no star is given, do not add dashed line
\begin{tabular}{@{}p{\skilllegendhintscolumnwidth} \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{};{.6pt/1pt}p{0.9\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}p{\cvskillwidth}@{};{.6pt/1pt}p{1.1\cvskilllegenddescriptorwidth}@{}}% @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{};{.6pt/1pt}p{0.9\cvskilllegend@descriptorwidth} @{\hspace{2\skillmatrix@commentpadding}}p{\cvskill@width}@{};{.6pt/1pt}p{1.1\cvskilllegend@descriptorwidth}@{}}%
\raggedleft\hintstyle{} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\ \raggedleft\hintstyle{} & \cvSkill{1}\, & \,{\skillLegend@FontSize #3} & \cvSkill{3}\, &\,{\skillLegend@FontSize #5 } \\
% %
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\ & \cvSkill{2}\, & \,\multirow{2}{\cvskilllegend@descriptorwidth}{{\skillLegend@FontSize #4}} & \cvSkill{4}\, &\,{\skillLegend@FontSize #6 } \\
% %
& & & \cvSkill{5}\, &\,{\legendFontSize #7 } & & & \cvSkill{5}\, &\,{\skillLegend@FontSize #7 }
\end{tabular}% \end{tabular}%
\par\addvspace{#2} \par\addvspace{#2}
} }
@ -225,8 +269,8 @@
\DeclareDocumentCommand\@starIndependentTabular{}{}% \DeclareDocumentCommand\@starIndependentTabular{}{}%
\RenewDocumentCommand\cvSkillMatrixLegend{s +O{.25em} +O{basic knowledge} +O{intermediate knowledge with experience in projects} +O{extensive experience in projects} +O{deep expert knowledge} +O{expert/guru} +m}{% \RenewDocumentCommand\cvSkillMatrixLegend{s +O{.25em} +O{basic knowledge} +O{intermediate knowledge with experience in projects} +O{extensive experience in projects} +O{deep expert knowledge} +O{expert/guru} +m}{%
% check whether Argument #8 is given and if so provide it as cvitem % check whether Argument #8 is given and if so provide it as cvitem
\def\legendString{#8}% \def\arg@legendString{#8}%
\ifdefempty{\legendString}{% \ifdefempty{\arg@legendString}{%
\vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :( \vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
}{% }{%
\cvitem[-0.5em]{#8}{}% \cvitem[-0.5em]{#8}{}%
@ -236,16 +280,16 @@
\RenewDocumentCommand{\@starIndependentTabular}{}{% \RenewDocumentCommand{\@starIndependentTabular}{}{%
\begingroup% \begingroup%
% \renewcommand{\arraystretch}{1.0}% % \renewcommand{\arraystretch}{1.0}%
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegendhintscolumnwidth \begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegend@hintscolumnwidth
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}} @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}
p{\cvskillwidth}@{} p{\cvskill@width}@{}
p{0.9\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}} p{0.9\cvskilllegend@descriptorwidth} @{\hspace{2\skillmatrix@commentpadding}}
p{\cvskillwidth}@{}p{1.1\cvskilllegenddescriptorwidth}@{}}% p{\cvskill@width}@{}p{1.1\cvskilllegend@descriptorwidth}@{}}%
\@moderncvstrut{4pt}{16pt} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\ \@moderncvstrut{4pt}{16pt} & \cvSkill{1}\, & \,{\skillLegend@FontSize #3} & \cvSkill{3}\, &\,{\skillLegend@FontSize #5 } \\
% %
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\ & \cvSkill{2}\, & \,\multirow{2}{\cvskilllegend@descriptorwidth}{{\skillLegend@FontSize #4}} & \cvSkill{4}\, &\,{\skillLegend@FontSize #6 } \\
% %
& & & \cvSkill{5}\, &\,{\legendFontSize #7 } \\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly & & & \cvSkill{5}\, &\,{\skillLegend@FontSize #7 } \\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly
\end{tabular}% \end{tabular}%
\endgroup% \endgroup%
\par\@aftersectionfalse\ignorespaces% \par\@aftersectionfalse\ignorespaces%
@ -260,18 +304,18 @@
\fi \fi
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
% % \cvSkillMatrixHeadFont % % \cvSkillMatrix@HeadFont
% %------------------------------------------------------------------------------- % %-------------------------------------------------------------------------------
\NewDocumentCommand\cvSkillMatrixHeadFont{}{\normalfont} \NewDocumentCommand\cvSkillMatrix@HeadFont{}{\normalfont}
\DeclareDocumentCommand\cvSkillMatrixHead{+O{} +O{} +O{} +O{} +O{}}{}% \DeclareDocumentCommand\cvSkillMatrixHead{+O{} +O{} +O{} +O{} +O{}}{}%
% The following definition is valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv % The following definition is valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv
\RenewDocumentCommand\cvSkillMatrixHead{O{.25em} +O{Level} +O{Skill} +O{Years} +O{Comment}}{% \RenewDocumentCommand\cvSkillMatrixHead{O{.25em} +O{Level} +O{Skill} +O{Years} +O{Comment}}{%
\begingroup \begingroup
\renewcommand{\arraystretch}{1.25} \renewcommand{\arraystretch}{1.25}
\arrayrulecolor{color1} \arrayrulecolor{color1}
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth} \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}@{}p{\cvskilldescriptorwidth}@{} p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}% @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{}@{}p{\cvskill@descriptorwidth}@{} p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@commentpadding}}p{\skillmatrix@commentwidth}@{}}%
& \centering{\cvSkillMatrixHeadFont #2} & \centering{\cvSkillMatrixHeadFont #3} & \centering{\cvSkillMatrixHeadFont #4} & {\cvSkillMatrixHeadFont #5} & \centering{\cvSkillMatrix@HeadFont #2} & \centering{\cvSkillMatrix@HeadFont #3} & \centering{\cvSkillMatrix@HeadFont #4} & {\cvSkillMatrix@HeadFont #5}
% \\\cdashline{2-5}[.6pt/1pt] % \\\cdashline{2-5}[.6pt/1pt]
\end{tabular}% \end{tabular}%
\endgroup \endgroup
@ -287,12 +331,12 @@
% \renewcommand{\arraystretch}{1.25}% % \renewcommand{\arraystretch}{1.25}%
\begin{tabular}[t]{@{}p{\hintscolumnwidth}% \begin{tabular}[t]{@{}p{\hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}% @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
p{\skillmatrixhintscolumnwidth}% p{\skillmatrix@hintscolumnwidth}%
@{\hspace{\skillmatrixcommentpadding}}p{\cvskillwidth}@{}% @{\hspace{\skillmatrix@commentpadding}}p{\cvskill@width}@{}%
p{\cvskilldescriptorwidth}@{}% p{\cvskill@descriptorwidth}@{}%
p{\cvskillexperiencewidth}% p{\cvskill@experiencewidth}%
@{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}% @{\hspace{\skillmatrix@commentpadding}}p{\skillmatrix@commentwidth}@{}}%
& & \centering{\cvSkillMatrixHeadFont#2} & \centering{\cvSkillMatrixHeadFont#3} & \centering{\cvSkillMatrixHeadFont#4} & {\cvSkillMatrixHeadFont#5} \\[#1]% the spacing needs to be inside the cell for the vertical rule to extend correctly & & \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}% \end{tabular}%
\endgroup% \endgroup%
\par\@aftersectionfalse\ignorespaces% \par\@aftersectionfalse\ignorespaces%
@ -310,23 +354,23 @@
\begingroup \begingroup
\renewcommand{\arraystretch}{1.25} \renewcommand{\arraystretch}{1.25}
\arrayrulecolor{color1} \arrayrulecolor{color1}
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth}@{\hspace{\separatorcolumnwidth}}% \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
p{\cvskillwidth}@{}% p{\cvskill@width}@{}%
p{\cvskilldescriptorwidth}@{}% p{\cvskill@descriptorwidth}@{}%
p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}% p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@commentpadding}}%
p{\skillmatrixcommentwidth}@{}}% p{\skillmatrix@commentwidth}@{}}%
\cdashline{2-5}[.6pt/1pt] \cdashline{2-5}[.6pt/1pt]
\raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}% \raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
\end{tabular}% \end{tabular}%
\endgroup \endgroup
\par\addvspace{#2} \par\addvspace{#2}
}{% If no star is seen no line is drawn }{% If no star is seen no line is drawn
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth}@{\hspace{\separatorcolumnwidth}}% \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
p{\cvskillwidth}@{}% p{\cvskill@width}@{}%
p{\cvskilldescriptorwidth}@{}% p{\cvskill@descriptorwidth}@{}%
p{\cvskillexperiencewidth}% p{\cvskill@experiencewidth}%
@{\hspace{\skillmatrixcommentpadding}}% @{\hspace{\skillmatrix@commentpadding}}%
p{\skillmatrixcommentwidth}@{}}% p{\skillmatrix@commentwidth}@{}}%
\raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}% \raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
\end{tabular}% \end{tabular}%
\par\addvspace{#2} \par\addvspace{#2}
@ -344,11 +388,11 @@
\begingroup% \begingroup%
\renewcommand{\arraystretch}{1.25}% \renewcommand{\arraystretch}{1.25}%
\begin{tabular}[t]{@{}p{\hintscolumnwidth}% \begin{tabular}[t]{@{}p{\hintscolumnwidth}%
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}p{\skillmatrixhintscolumnwidth} @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}p{\skillmatrix@hintscolumnwidth}
@{\hspace{\skillmatrixcommentpadding}} @{\hspace{\skillmatrix@commentpadding}}
p{\cvskillwidth}@{} p{\cvskill@width}@{}
p{\cvskilldescriptorwidth}@{} p{\cvskill@descriptorwidth}@{}
p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}% p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@commentpadding}}p{\skillmatrix@commentwidth}@{}}%
% \cline{3-6}% % \cline{3-6}%
& \raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}\\[#2]% & \raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}\\[#2]%
\end{tabular}% \end{tabular}%

View file

@ -9,7 +9,7 @@
\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman') \documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
% moderncv themes % moderncv themes
\moderncvstyle{casual} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy' \moderncvstyle{banking} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
\moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red' \moderncvcolor{blue} % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red'
%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name %\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page %\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
@ -110,6 +110,7 @@ Detailed achievements:%
\cvitemwithcomment{Language 3}{Skill level}{Comment} \cvitemwithcomment{Language 3}{Skill level}{Comment}
\section{Computer skills} \section{Computer skills}
\skillMatrixColumnWidth[3em][]
% % Add a legend if you are usng \cvSkill{<1-5>} commant % % Add a legend if you are usng \cvSkill{<1-5>} commant
\cvSkillMatrixLegend*[1em]{} %Optional add a Legend descriptor or a star for dashed lines. \cvSkillMatrixLegend*[1em]{} %Optional add a Legend descriptor or a star for dashed lines.
% \cvSkillMatrixLegend*{Legend} % \cvSkillMatrixLegend*{Legend}