I am trying to create my resume using moderncv and Moderntimeline. Based on answer I added new function to have months on a timeline:
\documentclass[12pt, a4paper, sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.91]{geometry} % Width of the entire CV
\setlength{\hintscolumnwidth}{4.1cm} % Width of the timeline on your left
\usepackage{pdfpages/pdfpages}
\usepackage{moderntimeline/moderntimeline}
\usepackage{xpatch/xpatch}
\usepackage{color, graphicx}
\usepackage{comment}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for timeline
\makeatletter
\pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}
\NewDocumentCommand\tldatelabelcventryn{O{center}O{color1}mmmmmmm}{%
\pgfmathsetmacro\tl@endyear{\tl@lastyear}%
\pgfmathsetmacro\tl@startfraction{(#3-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
\cventry{\tikz[baseline]{%
\useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);
\fill [\tl@runningcolor] (0,0)
rectangle (\hintscolumnwidth,\tl@runningwidth);
\fill [#2] (0,0)
++(\tl@startfraction\hintscolumnwidth,0pt)
node [tl@startyear,yshift=5pt,anchor=#1] {#4}
node {$\bullet$};
}
}
{#5}{#6}{#7}{#8}{#9}
}
\newcommand\tllabelcventryn[9][color1]{%
\gdef\Argi{#1}%
\gdef\Argii{#2}%
\gdef\Argiii{#3}%
\gdef\Argiv{#4}%
\gdef\Argv{#5}%
\gdef\Argvi{#6}%
\gdef\Argvii{#7}%
\gdef\Argviii{#8}%
\gdef\Argix{#9}%
\auxtllabelcventryn
}
\def\auxtllabelcventryn#1{%
\gdef\Argx{#1}%
\pgfmathsetmacro\tl@endyear{ifthenelse(\Argiii==0,\tl@lastyear,\Argiii)}
\pgfmathsetmacro\tl@startfraction{(\Argii-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
\cventry{\tikz[baseline=0pt]{
\fill [\tl@runningcolor] (0,0)
rectangle (\hintscolumnwidth,\tl@runningwidth);
\useasboundingbox (0,-1.5ex)
rectangle (\hintscolumnwidth,1ex);
\fill [\Argi] (0,0)
++(\tl@startfraction\hintscolumnwidth,0pt)
node [tl@startyear,anchor=north east] {\Argiv} node [tl@startyear,above] {\Argv}
rectangle (\tl@endfraction\hintscolumnwidth,\tl@width-1pt);
\pgfmathsetlength{\pgf@xa}{\Argiii} \ifdim\pgf@xa=0pt
\shade [left color=\Argi] (\tl@startfraction\hintscolumnwidth,0)
rectangle (\tl@endfraction\hintscolumnwidth,\tl@width);
\else
\fill [\Argi] (\tl@startfraction\hintscolumnwidth,0)
rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);
\fi
}
}
{\Argvi}{\Argvii}{\Argviii}{\Argix}{\Argx}%
}
\makeatother
%
\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tlmaxdates{2005}{2013} % timeline for education
\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}
\begin{document}
\section{first timeline}
\tllabelcventryn[cyan!60!black]{2005}{2011}{Dec 2005}{\hspace{5.8cm} Jan 2011}{Test5}{}{}{}{test}
\vspace{50pt}
\section{second timeline}
\tllabelcventryn[cyan!60!black]{2008}{2011}{Dec 2008}{\hspace{2.8cm} Jan 2011}{Test5}{}{}{}{test}
\end{document}
- I have problems with beginning dates. I don't know how move them right on timeline.
\hspace{5.8cm}does not work for them and part of beginning dates are cutting off - I need to create separate timeline e.g.
\tlmaxdates{2007}{2012}?

