2
\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\makeatletter
\pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}
\makeatother

\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}
\tllabelcventry[cyan!60!black]{2007}{2010}{Test}{test}{test}{test}{}{test}
\tldatelabelcventry{2008}{Okt. 2008}{Test}{}{}{}{}{}

\tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}

\end{document}

The alignment of the \tldatelabelcventry seems not working correctly.

It is: enter image description here

And it should be: enter image description here

Megachip
  • 453

1 Answers1

1

A redefinition of \tldatelabelcventry is necessary to adjust the position of the timeline and of the label; something along these lines:

\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\makeatletter
\pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}
\renewcommand{\tldatelabelcventry}[8][color1]{%
\pgfmathsetmacro\tl@endyear{\tl@lastyear}
\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
 \cventry{\tikz[baseline]{
     \fill [\tl@runningcolor] (0,0)
        rectangle (\hintscolumnwidth,\tl@runningwidth);
     \fill [#1] (0,0)
        ++(\tl@startfraction*\hintscolumnwidth,0pt)
        node [tl@startyear,yshift=11pt] {#3}
        node {$\bullet$};
   }
}
{#4}{#5}{#6}{#7}{#8}
}
\makeatother

\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}
\tllabelcventry[cyan!60!black]{2007}{2010}{Test}{test}{test}{test}{}{test}
\tldatelabelcventry{2008}{Okt. 2008}{Test}{}{}{}{}{}

\tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128