Issue with moderntimeline and tllabelcventry

moderncvmoderntimeline

I am trying to get rid of an awkward issue. I have created my cv using moderncv and moderntimeline and it worked. At some point – without editing the header or any option of any used package – the timeline changed to a weird behaviour. I am using \tllabelcventry to add a description to the bar (e.g. to include the month of starting and ending date). No matter what I am trying now, the endyear is displayed as a label (but not the month).

Here is a minmal example:

\documentclass{moderncv}
\moderncvtheme[blue]{casual}
\usepackage[firstyear=1985, lastyear=2021]{moderntimeline/moderntimeline}
\tlwidth{0.8ex}
\tltext{\tiny}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tllabelcventry{2000/7}{2020/12}{07/2000--12/2020}{Engineer}{Testing Corporation}{}{}{}
\tllabelcventry{2000/7}{2020/12}{07/2000--12/2020}{}{}{}{}{}

\tlcventry{2000/7}{2020/12}{Engineer}{Testing Corporation}{}{}{}
\tlcventry{2000/7}{2020/12}{}{}{}{}{}

\end{document}

And here you can see how it is compiled:

Minimal example

As you can see I am trying to draw a bar for an employment from July 2000 till December 2020 (as an example). The bar is drawn correctly, the description ("07/2000–12/2020") is shown properly, but the end year ("2020") is displayed nontheless in contradiction to the package description of moderntimeline:

"The \tllabelcventry macro is similar to \tlcventry, but it takes yet a third\tllabelcventry
additional argument, which lets you set a label for the time line. When this is
used, the dates are not typeset around the time line, only the label is placed where
the start date would normally be."

How do I get rid of the additional and redundant display of the end year ("2020") in the description of the cventry?

Best Answer

The timeline puts the end date in the bottom right, unless the position is still held (and 0 was used as the end date).

In any case, the label is too long. Use the /// separator to enhance the timeline and make the 2020 disappear.

b

\documentclass{moderncv}
\moderncvtheme[blue]{casual}
\usepackage[firstyear=1985, lastyear=2021]{moderntimeline} 
\tlwidth{0.8ex}
\tltext{\tiny}

\firstname{John}
\familyname{Doe}

\begin{document}
    
    \makecvtitle
    
    \tllabelcventry{2000/7}{2020/12}{07/2000--12/2020}{Engineer}{Testing Corporation}{}{}{}
    \tllabelcventry{2000/7}{2020/12}{07/2000--12/2020}{}{}{}{}{}
    
    \tlcventry{2000/7}{2020/12}{Engineer}{Testing Corporation}{}{}{}
    \tlcventry{2000/7}{2020/12}{}{}{}{}{}       
    
    %% added <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    \tllabelcventry{2000/7}{2020/12}{07/2000///12/2020}{Engineer}{Testing Corporation}{}{}{}
    \tllabelcventry{2000/7}{2020/12}{07/2000///12/2020}{}{}{}{}{}
    
    {\tltextstart[base east]{\tiny} % move the label to the left            
    \tllabelcventry{2021/1}{2021/8}{01/2021///08/2021}{Engineer}{}{}{}{}    
    }
    
\end{document}
Related Question