posquit0 / Awesome-CV

:page_facing_up: Awesome CV is LaTeX template for your outstanding job application
LaTeX Project Public License v1.3c
22.43k stars 4.72k forks source link

Skills as table with 4 columns #367

Closed alejam14 closed 2 years ago

alejam14 commented 3 years ago

Dear everyone,

I am trying to make my cv look a bit more compressed so I can include more information in just one page. That's why I was unsuccessfully trying to split the table in the section 'skills', from 2 columns to 4 columns.

It would look like the following picture: Untitled

Could anyone help me with this issue? Thanks

dcsim commented 2 years ago

It should be easy enough to have a side by side minipage(s) containing the two column version of cvskill.

OJFord commented 2 years ago

I'm going to close this as suggestion provided and OP probably figured it out or otherwise moved on.

Feel free to reopen or comment if above suggestion doesn't work (or to confirm it does!) though.

alejam14 commented 2 years ago

I have tried it but couldn't manage to correctly implement it. If you think it is that easy, could you just try it out and send it to me afterwards?

Thank you very much.

dcsim commented 2 years ago

#

You'll need to adjust the spacing a bit yourself, but a fast way to implement 4 columns with minipage without modifying the .cls file is below.

Note: This is not necessarily a proper way to go about this, but it works, it's quick, and I'm terribly short on time. Think of is as a passable example rather than an exemplar.

You'll need to sort out getting the spacing right yourself, as well as the line breaks if the descriptions are too long.

Steps Taken:

  1. Split the skill between two .tex files, e.g. skills.tex and skills copy.tex.
  2. Comment out or delete \cvsection{Skills} in both files.
  3. Add the minipages and a \cvsection{Skills} to the cv.tex file or the resume.tex file, similar to the example below:
%-------------------------------------------------------------------------------
%   CV/RESUME CONTENT
%   Each section is imported separately, open each file in turn to modify content
%-------------------------------------------------------------------------------
\input{cv/education.tex}
\cvsection{Skills}

\begin{minipage}[t]{.45\textwidth}
  \vspace{-.5cm}
  \input{cv/skills.tex}
\end{minipage}\hspace{.1\textwidth}%
\begin{minipage}[t]{.45\textwidth}
  \vspace{-.5cm}
  \input{cv/skills copy.tex}
\end{minipage}

\input{cv/experience.tex}

4 Columns

DaniBodor commented 2 years ago

I assume OP has solved the issue, but I figured I'll share my solution to the above issue nonetheless, in case someone else runs into this.

In the cls file you can add the following code to create the environment:

% Define an environment for cvskilldouble to put 2 skills into 1 line
\newenvironment{cvskillsdouble}{%
  \begin{center}
    \setlength\tabcolsep{1mm}
    \setlength{\extrarowheight}{-1.5pt}
     \begin{tabular*}{\textwidth}{ R{3.5cm}  R{1.6cm} L{4.0cm} R{1.3 cm} L{\textwidth}}
}{%
    \end{tabular*}
  \end{center}
  \vspace{6mm}
}
% Define a line of with 2 skills on 1 line
% Usage: \cvskilldouble{<type>}{<level>}{<skillset>}{<level>}{<skillset>}
\newcommand*{\cvskilldouble}[5]{%
    \skilltypestyle{#1} & \skillstarstyle{#2} & \skillsetstyle{#3} & \skillstarstyle{#4} & \skillsetstyle{#5}\\
}

Now create a skills.tex file as follows:

%   SECTION TITLE
\cvsection{Skills}

\begin{cvskillsdouble}

%LANGUAGES
\cvskilldouble{Languages}
{\0} {Spanish}
{\8} {Italian}
\cvskilldouble {}
{\9} {English}
{\5} {French}

%Computer skills
\cvskilldouble{IT skills}
{\0} {DevOps}
{\8} {Front-end}
\cvskilldouble {}
{\9} {Back-end}
{\5} {Programming}
\cvskilldouble {}
{\8} {Something else}
{} {}

\end{cvskillsdouble}

This will create the following output: image

DaniBodor commented 2 years ago

Alternatively, to get it to look exactly like OP wanted:

in the cls:

% Define an environment for OP
\newenvironment{cvskillsdoubleOP}{%
  \begin{center}
    \setlength\tabcolsep{1mm}
    \setlength{\extrarowheight}{-1.5pt}
     \begin{tabular*}{\textwidth}{ 
        R{2cm} R{1.1cm} L{5.0cm} 
        R{1.5cm} R{1.1 cm} L{\textwidth}}
}{%
    \end{tabular*}
  \end{center}
  \vspace{6mm}
}

% Define skills for OP
% Usage: \cvskilldouble{<type>}{<level>}{<skillset>}{<type>}{<level>}{<skillset>}
\newcommand*{\cvskilldoubleOP}[6]{%
    \skilltypestyle{#1} & \skillstarstyle{#2} & \skillsetstyle{#3} & \skilltypestyle{#4} & \skillstarstyle{#5} & \skillsetstyle{#6}\\
}

and in the tex file


%   SECTION TITLE
\cvsection{Languages}

\begin{cvskillsdoubleOP}

%LANGUAGES
\cvskilldoubleOP
{Spanish} {\0} {Mother-tongue}
{Italian} {\8} {Professional proficiency (B2-C1} 
\cvskilldoubleOP
{English} {\9} {Full professional proficiency (C1-C2)}
{French} {\5} {Elementary proficiency (B1-B2)}

\end{cvskillsdoubleOP}

image

donadviser commented 2 years ago

@DaniBodor , you have not provided the style \skillstarstyle

DaniBodor commented 2 years ago

Not sure if this is what you're looking for:

% For elements of skill
\newcommand*{\skilltypestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand*{\skillstarstyle}[1]{{\fontsize{6pt}{1em}\bodyfont\bfseries\color{lightlightgray} #1}}
\newcommand*{\skillsetstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\color{text} #1}}

% Formatting of skill level circle
\def\emptycolor{lightlightgray}
\def\fullcolor{awesome}
\newcommand{\lc}{\tikz\draw[\emptycolor,fill=\emptycolor] (0,0) circle (.8ex); }
\newcommand{\dc}{\tikz\draw[\fullcolor,fill=\fullcolor] (0,0) circle (.8ex); }

\def\Angle{-30}
\newcommand{\hc}[1][0]{%
    \begin{tikzpicture}[baseline=-.8ex,\emptycolor]
            \draw[clip,fill] (0,0) circle (.8ex);
            \draw[\fullcolor,fill=\fullcolor,rotate=\Angle] (0,0) -- (0,.8ex) arc (90:270:.8ex) -- cycle;
    \end{tikzpicture} %
}

% Define level (skill = <num>/2)
\newcommand{\1}{\hc\lc\lc\lc\lc}
\newcommand{\2}{\dc\lc\lc\lc\lc}
\newcommand{\3}{\dc\hc\lc\lc\lc}
\newcommand{\4}{\dc\dc\lc\lc\lc}
\newcommand{\5}{\dc\dc\hc\lc\lc}
\newcommand{\6}{\dc\dc\dc\lc\lc}
\newcommand{\7}{\dc\dc\dc\hc\lc}
\newcommand{\8}{\dc\dc\dc\dc\lc}
\newcommand{\9}{\dc\dc\dc\dc\hc}
\newcommand{\0}{\dc\dc\dc\dc\dc}

Note that most of this was already present in the version of awesome CV I copied from a friend (not sure what the origin of this is, but the result is similar to OP). I created the tilted half-filled circles with the help of https://tex.stackexchange.com/questions/631565/rotating-dual-colored-circle-without-changing-width-or-center

ChouangTseu commented 2 years ago

@DaniBodor : I needed to add this to the skills.tex file in order to define correctly the \skillstartyle : \definecolor{lightlightgray}{gray}{0.95} Without that line of code, compiling resulted in : xcolor Error : Undefined color 'lightlightgray'

zxdawn commented 1 year ago

@DaniBodor I got a different result:

image

Here're the warnings:

/Users/xin/Documents/github/Awesome-CV/examples/cv/skills.tex:37: Undefined control sequence. [{\8} {Italian}]
/Users/xin/Documents/github/Awesome-CV/examples/cv/skills.tex:40: Undefined control sequence. [{\5} {French}]
/Users/xin/Documents/github/Awesome-CV/examples/cv/skills.tex:45: Undefined control sequence. [{\8} {Front-end}]
/Users/xin/Documents/github/Awesome-CV/examples/cv/skills.tex:48: Undefined control sequence. [{\5} {Programming}]
/Users/xin/Documents/github/Awesome-CV/examples/cv/skills.tex:51: Undefined control sequence. [{} {}]

I have added these commands to skills.tex. Any idea?