14

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.

1 Answer 1

16

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.}{}{}{}{}

3
  • 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.
    – raphink
    Commented Apr 26, 2012 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
    Commented Apr 26, 2012 at 21:36
  • 3
    Thanks @Jake, I'll patch the package. You were the one giving the answer that led to this package if I remember correctly ;-)
    – raphink
    Commented Apr 27, 2012 at 5:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .