[Tex/LaTex] How to write dates in 2 lines using the Friggeri CV template

cvfriggeri-cvxetex

Under the 'Experience' section, I would like to add the following dates under a job position, separated in 2 lines:

Jan 2010 – Jul 2012

Jan 2014 – Jun 2015

However, writing

{{Jan 2010 - Jul 2012, 
Jan 2014 - Jun 2015}}

forces the dates to be written on one line and pushes the indent to the right. How can I add another? (See image below)

enter image description here

MWE:

\documentclass[]{friggeri-cv}                   
\begin{document}
\header{somebody}{iusedtoknow}{fresh graduate}
%-------------------------
\section{experience}

\begin{entrylist}

\entry
{Jan 2010 - Jul 2012}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}

\end{entrylist}
%-------------------------
\end{document}

MWE – list environment in .cls file:

\setlength{\tabcolsep}{3.7pt}
\newenvironment{entrylist}{%
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
  \end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
  {\small #1}   &   \parbox[t]{11.8cm}{%
            \textbf{#2}%
            \hfill%
            {\footnotesize\addfontfeature{Color=lightgray} #3}\\%
            #4\vspace{\parsep}%
        }\\
}

Best Answer

Adjust the .cls file for entrylist:

\setlength{\tabcolsep}{3pt}
\newenvironment{entrylist}{%
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll |}
}{%
  \end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
  \parbox[t]{3.2cm}{#1}&\parbox[t]{10.6cm}{%
    \textbf{#2}%
    \hfill%
    {\footnotesize\addfontfeature{Color=lightgray} #3}\\%
    #4\vspace{\parsep}%
  }\\}

Above, I am wrapping the first column contents (#1) in a parbox so that you can fix and control the spacing. We then shrink the second column so that it doesn't overrun the margin. I also added some inter-column spacing in the entrylist definition. Then in your .tex file, use a \newline as follows:

\entry
{Jan 2010 - Jul 2012\newline
Jan 2014 - Jun 2015}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\vspace{-10pt}\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}

If you want the blue color then:

\entry
{Jan 2010 - Jul 2012\newline
{\addfontfeature{Color=blue}Jan 2014 - Jun 2015}}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\vspace{-10pt}\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}

This produces the output as:

Two line dates

Because the default helvetica font doesn't have equal spacing for each letter, the dates won't line up exactly. You'll need to switch fonts for that. But I think this achieves your desired effect. In order to achieve this though I've had to push the second column further to the right so you are sacrificing space.

MWE

\documentclass[]{friggeri-cv}                   
\begin{document}
\header{somebody}{iusedtoknow}{fresh graduate}
%-------------------------

\begin{aside} % In the aside, each new line forces a line break
\section{contact}
123 Street Name
City, Province A2B 3C4
Country
~
+0 (000) 111 1111
+0 (000) 111 1112
~
\href{mailto:john@doe.com}{john@doe.com}
\href{http://www.johndoe.com}{http://www.johndoe.com}
\href{http://facebook.com/johnsmith}{fb://jsmith}
\section{languages}
english
spanish
\section{programming}
{\color{red} $\varheartsuit$} JavaScript
Python, C++, PHP
CSS3 \& HTML5
\end{aside}

\section{experience}

\begin{entrylist}

\entry
{Jan 2010 - Jul 2012\newline
Jan 2014 - Jun 2015}
{Cupcakes 'n' Such}
{Cupcake Monster}
{\vspace{-10pt}\begin{itemize}
\item Take pictures of cupcakes all day long
\item Manage cupcake inventory and liase with other firms
\item Demonstrate how to eat cupcakes to customers without touching lips
\end{itemize}
}

\end{entrylist}
%-------------------------
\end{document}