mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
add first working skillmatrix for style fancy
This commit is contained in:
parent
024f9ba8ee
commit
bb127f7e66
2 changed files with 111 additions and 89 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
% some packages required for this code
|
% some packages required for this code
|
||||||
\RequirePackage{tikz}
|
\RequirePackage{tikz}
|
||||||
% needed for the dashed lines
|
% needed for the dashed lines
|
||||||
\RequirePackage{arydshln}
|
% \RequirePackage{arydshln} % incompatible with fancy style
|
||||||
|
|
||||||
%%% 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
|
||||||
|
|
@ -30,90 +30,113 @@
|
||||||
\@initializelength{\skilllegendhintscolumnwidth}
|
\@initializelength{\skilllegendhintscolumnwidth}
|
||||||
\NewDocumentCommand{\recomputecvskillmatrixlengths}{}{%
|
\NewDocumentCommand{\recomputecvskillmatrixlengths}{}{%
|
||||||
\setlength{\skillmatrixcommentpadding}{1ex}
|
\setlength{\skillmatrixcommentpadding}{1ex}
|
||||||
\setlength{\separatorcolumnwidth}{\skillmatrixcommentpadding}
|
% \setlength{\separatorcolumnwidth}{\skillmatrixcommentpadding}
|
||||||
\setlength{\skillmatrixhintscolumnwidth}{\widthof{``Languages''}}
|
\setlength{\skillmatrixhintscolumnwidth}{\widthof{``Languages''}}
|
||||||
\setlength{\skilllegendhintscolumnwidth}{\skillmatrixhintscolumnwidth} %0.175\textwidth
|
\setlength{\skilllegendhintscolumnwidth}{\skillmatrixhintscolumnwidth} %0.175\textwidth
|
||||||
% \setlength{\skillmatrixhintscolumnwidth}{0.14\textwidth} %0.175\textwidth
|
% \setlength{\skillmatrixhintscolumnwidth}{0.14\textwidth} %0.175\textwidth
|
||||||
\setlength{\cvskillwidth}{\widthof{\cvSkill{5}}}
|
\setlength{\cvskillwidth}{\widthof{\cvSkill{5}}}
|
||||||
\setlength{\cvskillexperiencewidth}{\widthof{``Jahre''}}
|
\setlength{\cvskillexperiencewidth}{\widthof{``Jahre''}}
|
||||||
\@initializelength{\matrixbodylength}
|
\@initializelength{\matrixbodylength}
|
||||||
\setlength{\matrixbodylength}{\maincolumnwidth-\skillmatrixhintscolumnwidth-\separatorcolumnwidth}
|
\setlength{\matrixbodylength}{\maincolumnwidth-\skillmatrixhintscolumnwidth-\skillmatrixcommentpadding}%\skillmatrixhintscolumnwidth
|
||||||
\setlength{\skillmatrixcolumnwidth}{0.45\matrixbodylength}%
|
\setlength{\skillmatrixcolumnwidth}{0.45\matrixbodylength}%
|
||||||
\setlength{\cvskilldescriptorwidth}{\skillmatrixcolumnwidth-\cvskillwidth-\cvskillexperiencewidth}
|
\setlength{\cvskilldescriptorwidth}{\skillmatrixcolumnwidth-\cvskillwidth-\cvskillexperiencewidth}
|
||||||
\setlength{\skillmatrixcommentwidth}{\matrixbodylength-\skillmatrixcolumnwidth-\skillmatrixcommentpadding}%
|
\setlength{\skillmatrixcommentwidth}{\matrixbodylength-\skillmatrixcolumnwidth-\skillmatrixcommentpadding}%
|
||||||
\setlength{\cvskilllegenddescriptorwidth}{0.5\matrixbodylength-\cvskillwidth-\skillmatrixcommentpadding}
|
\setlength{\cvskilllegenddescriptorwidth}{0.5\maincolumnwidth-\cvskillwidth-\skillmatrixcommentpadding}
|
||||||
% regular lengths
|
regular lengths
|
||||||
\setlength{\parskip}{0\p@}}
|
}
|
||||||
|
|
||||||
\RequirePackage{multirow}
|
\RequirePackage{multirow}
|
||||||
|
% \RequirePackage{ifmtarg}
|
||||||
\NewDocumentCommand\legendFontSize{}{\scriptsize}
|
\NewDocumentCommand\legendFontSize{}{\scriptsize}
|
||||||
\NewDocumentCommand\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}{%
|
\NewDocumentCommand\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
|
||||||
|
\def\legendString{#8}%
|
||||||
|
\ifdefempty{\legendString}{}{\cvitem{#8}{}}%
|
||||||
|
\arrayrulecolor{color1}%
|
||||||
|
\setlength\arrayrulewidth{\separatorrulewidth}%
|
||||||
|
\if@aftersection\else%
|
||||||
|
\vspace*{-\separatorrulewidth}\fi% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
|
||||||
|
\noindent%
|
||||||
|
\NewDocumentCommand\starIndependentTabular{}{%
|
||||||
|
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegendhintscolumnwidth
|
||||||
|
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}
|
||||||
|
p{\cvskillwidth}@{}
|
||||||
|
p{\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}
|
||||||
|
p{\cvskillwidth}@{}p{\cvskilllegenddescriptorwidth}@{}}%
|
||||||
|
\@moderncvstrut{4pt}{16pt} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\
|
||||||
|
%
|
||||||
|
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\
|
||||||
|
%
|
||||||
|
& & & \cvSkill{5}\, &\,{\legendFontSize #7 } \\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly
|
||||||
|
\end{tabular}%
|
||||||
|
\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%
|
\IfBooleanTF#1%
|
||||||
{% if a star is given, add dashed line
|
{% if a star is given, do the same as if no star is given
|
||||||
\begin{tabular}{@{}p{\skilllegendhintscolumnwidth}
|
\starIndependentTabular%
|
||||||
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{};{.6pt/1pt}p{\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}p{\cvskillwidth}@{};{.6pt/1pt}p{\cvskilllegenddescriptorwidth}@{}}%
|
|
||||||
\raggedleft\hintstyle{#8} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\
|
|
||||||
%
|
|
||||||
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\
|
|
||||||
%
|
|
||||||
& & & \cvSkill{5}\, &\,{\legendFontSize #7 }
|
|
||||||
\end{tabular}%
|
|
||||||
\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}
|
\starIndependentTabular%
|
||||||
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}p{\cvskilllegenddescriptorwidth} @{\hspace{2\skillmatrixcommentpadding}}p{\cvskillwidth}@{}p{\cvskilllegenddescriptorwidth}@{}}%
|
|
||||||
\raggedleft\hintstyle{#8} & \cvSkill{1}\, & \,{\legendFontSize #3} & \cvSkill{3}\, &\,{\legendFontSize #5 } \\
|
|
||||||
%
|
|
||||||
& \cvSkill{2}\, & \,\multirow{2}{\cvskilllegenddescriptorwidth}{{\legendFontSize #4}} & \cvSkill{4}\, &\,{\legendFontSize #6 } \\
|
|
||||||
%
|
|
||||||
& & & \cvSkill{5}\, &\,{\legendFontSize #7 }
|
|
||||||
\end{tabular}%
|
|
||||||
\par\addvspace{#2}
|
|
||||||
}
|
}
|
||||||
}
|
}%
|
||||||
\NewDocumentCommand\cvSkillMatrixHeadFont{}{\normalfont}
|
\NewDocumentCommand\cvSkillMatrixHeadFont{}{\normalfont}%
|
||||||
\NewDocumentCommand\cvSkillMatrixHead{s O{.25em} +O{Level} +O{Skill} +O{Years} +O{Comment}}{%
|
\NewDocumentCommand\cvSkillMatrixHead{+O{.25em} +O{Level} +O{Skill} +O{Years} +O{Comment}}{%
|
||||||
\IfBooleanTF#1%
|
\arrayrulecolor{color1}%
|
||||||
{% if a star is given, add dashed line
|
\setlength\arrayrulewidth{\separatorrulewidth}%
|
||||||
\begingroup
|
\if@aftersection\else%
|
||||||
\renewcommand{\arraystretch}{1.25}
|
\vspace*{-\separatorrulewidth}\fi% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
|
||||||
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth}
|
\noindent%
|
||||||
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}@{}p{\cvskilldescriptorwidth}@{} p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}%
|
\begingroup%
|
||||||
& \centering{\cvSkillMatrixHeadFont #3} & \centering{\cvSkillMatrixHeadFont #4} & \centering{\cvSkillMatrixHeadFont #5} & {\cvSkillMatrixHeadFont #6} \\\cdashline{2-5}[.6pt/1pt]
|
% \renewcommand{\arraystretch}{1.25}%
|
||||||
\end{tabular}%
|
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%
|
||||||
\endgroup
|
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
|
||||||
\par\addvspace{#2}
|
p{\skillmatrixhintscolumnwidth}%
|
||||||
}
|
@{\hspace{\skillmatrixcommentpadding}}p{\cvskillwidth}@{}%
|
||||||
{%if star is not given, do not add dashed line
|
p{\cvskilldescriptorwidth}@{}%
|
||||||
\begingroup
|
p{\cvskillexperiencewidth}%
|
||||||
\renewcommand{\arraystretch}{1.25}
|
@{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}%
|
||||||
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth}
|
& & \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
|
||||||
@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}@{}p{\cvskilldescriptorwidth}@{} p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}%
|
\end{tabular}%
|
||||||
& \centering{\cvSkillMatrixHeadFont #3} & \centering{\cvSkillMatrixHeadFont #4} & \centering{\cvSkillMatrixHeadFont #5} & {\cvSkillMatrixHeadFont #6}
|
\endgroup%
|
||||||
\end{tabular}%
|
\par\@aftersectionfalse\ignorespaces%
|
||||||
\endgroup
|
}%
|
||||||
\par\addvspace{#2}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
\NewDocumentCommand\cvSkillMatrixEntry{s O{.25em} +m +m +m +m +m}{%
|
\NewDocumentCommand\cvSkillMatrixEntry{s O{.25em} +m +m +m +m +m}{%
|
||||||
|
\arrayrulecolor{color1}%
|
||||||
|
\setlength\arrayrulewidth{\separatorrulewidth}%
|
||||||
|
\if@aftersection\else%
|
||||||
|
\vspace*{-\separatorrulewidth}\fi% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
|
||||||
|
\noindent%
|
||||||
%test for the star * in the command
|
%test for the star * in the command
|
||||||
\IfBooleanTF#1%
|
\IfBooleanTF#1{% If a star is seen a dotted line is drawn above the entry
|
||||||
{% If a star is seen a dotted line is drawn above the entry
|
\begingroup%
|
||||||
\begingroup
|
\renewcommand{\arraystretch}{1.25}%
|
||||||
\renewcommand{\arraystretch}{1.25}
|
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%
|
||||||
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}@{}p{\cvskilldescriptorwidth}@{} p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}} p{\skillmatrixcommentwidth}@{}}%
|
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}p{\skillmatrixhintscolumnwidth}
|
||||||
\cdashline{2-5}[.6pt/1pt]
|
@{\hspace{\skillmatrixcommentpadding}}
|
||||||
\raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
|
p{\cvskillwidth}@{}
|
||||||
\end{tabular}%
|
p{\cvskilldescriptorwidth}@{}
|
||||||
\endgroup
|
p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}%
|
||||||
\par\addvspace{#2}}
|
% \cline{3-6}%
|
||||||
%
|
& \raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}\\[#2]%
|
||||||
{% If no star is seen no line is drawn
|
\end{tabular}%
|
||||||
\begin{tabular}{@{}p{\skillmatrixhintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\cvskillwidth}@{}@{}p{\cvskilldescriptorwidth}@{} p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}} p{\skillmatrixcommentwidth}@{}}%
|
\endgroup%
|
||||||
\raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
|
% \par\@aftersectionfalse\ignorespaces%
|
||||||
\end{tabular}%
|
}{% If no star is seen no line is drawn
|
||||||
\par\addvspace{#2}}
|
\begingroup%
|
||||||
|
\renewcommand{\arraystretch}{1.25}%
|
||||||
|
\begin{tabular}[t]{@{}p{\hintscolumnwidth}%
|
||||||
|
@{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}p{\skillmatrixhintscolumnwidth}
|
||||||
|
@{\hspace{\skillmatrixcommentpadding}}
|
||||||
|
p{\cvskillwidth}@{}
|
||||||
|
p{\cvskilldescriptorwidth}@{}
|
||||||
|
p{\cvskillexperiencewidth} @{\hspace{\skillmatrixcommentpadding}}p{\skillmatrixcommentwidth}@{}}%
|
||||||
|
& \raggedleft\hintstyle{#3} &\centering \cvSkill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}\\[#2]%
|
||||||
|
\end{tabular}%
|
||||||
|
\endgroup%
|
||||||
|
% \par\@aftersectionfalse\ignorespaces%
|
||||||
|
}%
|
||||||
|
\par\@aftersectionfalse\ignorespaces%
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
template.tex
45
template.tex
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
% moderncv themes
|
% moderncv themes
|
||||||
\moderncvstyle{fancy} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
|
\moderncvstyle{fancy} % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
|
||||||
\moderncvcolor{burgundy} % 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,35 +110,34 @@ Detailed achievements:%
|
||||||
\cvitemwithcomment{Language 3}{Skill level}{Comment}
|
\cvitemwithcomment{Language 3}{Skill level}{Comment}
|
||||||
|
|
||||||
\section{Computer skills}
|
\section{Computer skills}
|
||||||
% Add a legend if you are usng \cvSkill{<1-5>} commant
|
% % Add a legend if you are usng \cvSkill{<1-5>} commant
|
||||||
\cvSkillMatrixLegend*[0.75em]{Legend:} %Optional add a Legend descriptor or a star for dashed lines.
|
\cvSkillMatrixLegend*[1em]{Legend:} %Optional add a Legend descriptor or a star for dashed lines.
|
||||||
% \cvSkillMatrixLegend*{Legend}
|
% \cvSkillMatrixLegend*{Legend}
|
||||||
|
\cvdoubleitem{Languages}{\cvSkill{1}, Bash, 2 years}{category 4}{XXX, YYY, ZZZ}
|
||||||
\cvdoubleitem{Languages}{\cvSkill{1}, Bash, 2 years experience bla bla bla}{category 4}{XXX, YYY, ZZZ}
|
|
||||||
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
|
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
|
||||||
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
|
\cvdoubleitem[0.75em]{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
|
||||||
|
% %
|
||||||
\cvitem{Skillmatrix}{Alternativly provide a skill matrix}
|
\cvitem{Skillmatrix}{Alternativly provide a skill matrix}
|
||||||
% Skillmatrix for listing IT skills
|
% % Skillmatrix for listing IT skills
|
||||||
% Add a head of the table with descriptions.
|
% % Add a head of the table with descriptions.
|
||||||
\cvSkillMatrixHead*[0.25em]
|
\cvSkillMatrixHead[-0.1em]
|
||||||
|
%
|
||||||
% Programing languages
|
% % Programing languages
|
||||||
\cvSkillMatrixEntry{Languages:}{3}{Python}{2}{I'm so experienced in this and I have done a million projects in this}
|
\cvSkillMatrixEntry*{Language:}{3}{Python}{2}{I'm so experienced in this and I have done a million projects in this}
|
||||||
\cvSkillMatrixEntry{}{2}{Lilypond}{14}{So much sheet music! Man I'm the best!}
|
\cvSkillMatrixEntry{}{2}{Lilypond}{14}{So much sheet music! Man I'm the best!}
|
||||||
\cvSkillMatrixEntry{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
|
\cvSkillMatrixEntry*{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
|
||||||
% OS
|
% OS
|
||||||
% notice the use of the starred command and the optional
|
% notice the use of the starred command and the optional
|
||||||
\cvSkillMatrixEntry*[2.5em]{OS:}{3}{Linux}{2}{Best OS in the world}
|
\cvSkillMatrixEntry*[1.5em]{OS:}{3}{Linux}{2}{Best OS in the world}
|
||||||
|
%
|
||||||
\cvitem{Skillmatrix in another language}{German example and dropping some dashed lines}
|
\cvitem{Skillmatrix in another language}{German example and dropping some dashed lines (exept fancy style)}
|
||||||
%% German version
|
% %% German version
|
||||||
% adjust the legend entries for other languages like so. The first entry is a post padding
|
% % adjust the legend entries for other languages like so. The first entry is a post padding
|
||||||
\cvSkillMatrixLegend[0.4em][Grundkenntnisse][Grundkenntnisse und eigene Er\-fahr\-ung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{}
|
\cvSkillMatrixLegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Er\-fahr\-ung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{}
|
||||||
% Similarly adjust the head of the matrix for descriptiors in other languages
|
% % Similarly adjust the head of the matrix for descriptiors in other languages
|
||||||
\cvSkillMatrixHead[-0.0em][Level][Fähigkeit][Jahre][Bemerkung]
|
\cvSkillMatrixHead[-0.0em][Level][Fähigkeit][Jahre][Bemerkung]
|
||||||
|
%
|
||||||
% The matrix itself
|
% % The matrix itself
|
||||||
\cvSkillMatrixEntry{OS:}{3}{Linux}{2}{Best OS in the world}
|
\cvSkillMatrixEntry{OS:}{3}{Linux}{2}{Best OS in the world}
|
||||||
|
|
||||||
\section{Interests}
|
\section{Interests}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue