# Moderncv with moderntimeline - how do I typeset positions that only lasted for one year?

I'm using the package moderntimeline which originated here on TeX.sx to typeset my CV. It looks great!

However, I have a bunch of positions (mostly for volunteering positions within our student union) which only lasted for one year. If I typeset them in the same way as other stuff (ranging over several years), I get a really thin line (something on the order of 1 px) in the timeline, and the year is displayed twice.

Here's an MWE to explain what I mean. Compile with e.g. pdfLaTeX or XeLaTeX

\documentclass{moderncv}

\usepackage{moderntimeline}
\moderncvtheme{classic}
\tlmaxdates{2007}{2012}

\firstname{Lorem}
\familyname{Ipsum}

\begin{document}
\tlcventry{2010}{0}{I'm still doing this!}{}{}{}{}
\tlcventry{2009}{2010}{Then I did something else.}{}{}{}{}
\tlcventry{2009}{2009}{I did something cool for just one year.}{}{}{}{}
\tlcventry{2007}{2009}{A regular entry}{}{}{}{}
\end{document}


Is there any way to make this more beautiful? I would prefer if, for example, only the start year was shown, and the blue line was half as wide as one that represents two years.

-

You could either use the \tldatecventry, which will draw a circle instead of a bar:

\tldatecventry{2009}{I did something cool for just one year.}{}{}{}{}


Or you could patch moderntimeline.sty by

• replacing the three occurrences of \ifnum #3=0 with \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
• and correcting the spacing by adding a missing % in line 171
• and adding \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); after line 156

which will allow you to use fractions of years for your bars. Then you can \tllabelcventry, which takes a starting time, an ending time, and a label text:

\tllabelcventry{2009}{2009.5}{2009}{I did something cool for just one year.}{}{}{}{}


-
Could it be interesting to add an option instead of patching the command? In general, I use the circle myself for these kinds of cases. –  ℝaphink Apr 26 '12 at 21:32
@Raphink: Well, I guess there's no harm in allowing fractional years. The changes I suggested don't alter the normal functionality. Also, the second and third point are actually bug fixes, I think, since without them the spacing is uneven. Awesome package, by the way! –  Jake Apr 26 '12 at 21:36
Thanks @Jake, I'll patch the package. You were the one giving the answer that led to this package if I remember correctly ;-) –  ℝaphink Apr 27 '12 at 5:08