1

The \tllabelcventry macro doesn't work properly, displaying additional date under the time line:

instead it should print only the manually inserted label without the automatic date as stated on page 3 of the documentation:

The question is: how to fix it?

I believe it worked fine just one year ago. I complied the minimal example (below) in Overleaf and on my computer using pdfTeX 3.14159265-2.6-1.40.20 with the same result.

The minimal example:

\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=2000,lastyear=2021]{moderntimeline}

\firstname{A.}
\familyname{B.}

\begin{document}

\tllabelcventry{2002}{2012}{2002-2012 label}{Test}{test}{test}{}{test}

\end{document}
0
2

You need to delete the macro \tl@endlabel in the following line of the definition of command \tllabelcventry:

node [tl@endyear] {\tl@endlabel}

With the following MWE (see the code change marked with <=======)

\documentclass{moderncv}

\moderncvstyle{casual}
\usepackage[firstyear=2000,lastyear=2021]{moderntimeline}

\makeatletter
\renewcommand{\tllabelcventry}[9][color1]{%
  \tl@formatendyear{#3}
  \tl@formatstartyear{#2}
  \tl@splitlabels{#4}
  \cventry{\tikz[baseline=0pt]{
    \tl@tlcvbar
    \fill [#1] (0,0)
      ++(\tl@startfraction*\hintscolumnwidth,0pt)
      node [tl@startyear] {\tl@startlabel}
      rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt)
      node [tl@endyear] {} % <========================\tl@endlabel
      (\hintscolumnwidth,0pt) ;
    \ifissince
      \newdimen\fullcolorwidth
      \pgfmathsetlength\fullcolorwidth{\tl@startfraction*(1+(1-\tl@startfraction)*\tl@nsfrac)*\hintscolumnwidth}
      \shade [left color=#1,right color=#1]
        (\tl@startfraction*\hintscolumnwidth,0)
        rectangle (\fullcolorwidth,\tl@width);
      \shade [left color=#1] (\fullcolorwidth,0)
        rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);
    \else
      \fill [#1] (\tl@startfraction*\hintscolumnwidth,0)
        rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);
    \fi
    }
  }
  {#5}{#6}{#7}{#8}{#9}%
}
\makeatother

\name{A.}{B.}

\begin{document}

\tllabelcventry{2002}{2012}{2002-2012 label}{Test a}{test b}{test c}{}{test e}

\end{document}

you get the following wished result:

resulting pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.