2

I was trying to modify this cv by adding the bar indicators i found in this other cv under the skills section but I wasn't able to adapt it. Is there a way to do it?

To be clear I would like to have different bars which I can fill by a percentage with another color and the bars are place in an "aside" environment.

I have an environment aside

\begin{document} 
    \begin{aside}
        \section{Abilities} 
    \end{aside} 
\end{document} 

In the abilites section I would like to insert a bar like these

I've tried using this command:

\newcommand\skills[1]{ 
    \renewcommand{\skills}{ 
        \begin{tikzpicture} 
            \foreach [count=\i] \x/\y in {#1}{ 
                \draw[fill=maingray,maingray] (0,\i) rectangle (6,\i+0.4); 
                \draw[fill=white,mainblue](0,\i) rectangle (\y,\i+0.4); 
                \node [above right] at (0,\i+0.4) {\x}; } 
        \end{tikzpicture} 
    } 
} 

But I can't make it work.

Torbjørn T.
  • 206,688
a.cas
  • 23

1 Answers1

2

I did not take a look at your links. The following does print some bars with skills above of them. I don't know how good it fits into your existing code. Also I do not know the aside environment.

\documentclass[preview,border=4mm]{standalone}

\usepackage{xcolor}
\definecolor{noskillgray}{gray}{0.85}
\definecolor{skilledblue}{rgb}{0.05,0.05,0.65}

\makeatletter
\newdimen\skillb@level
\newdimen\skillb@length
\newdimen\skillb@height
\skillb@length=120pt%
\skillb@height=10pt%
\newcommand*{\skillbar}[1]{%
    \skillb@level=\dimexpr#1\skillb@length/100\relax%
    {\color{skilledblue}\rule{\skillb@level}{\skillb@height}}%
    {\color{noskillgray}%
        \rule{\dimexpr\skillb@length-\skillb@level\relax}{\skillb@height}}%
}
\newcommand*{\skill}[2]{%
    \par\noindent%
    {\hskip 1ex\small #1}\\%
    \skillbar{#2}%
}
\makeatother

\begin{document}
\skill{Java}{1}
\skill{polite}{59}
\skill{outgoing}{69}
\skill{good manners}{63}
\skill{pursuer of rabbits}{94}
\skill{clueless}{99}
\end{document}

enter image description here

Skillmon
  • 60,462
  • Hello! Sorry for answering so late but I ha a couple of busy days! Your code works perfectly and is exactly what I was looking for. Thank you very much for the help! – a.cas Sep 04 '17 at 15:21