2

Following the example given here, I implemented it myself to use it for my CV. However, I do experience problems, when using fractions of a year for the end of an occupation. This means, that whenever I use

\tllabelcventry{2012.667}{2014.667} %
{09/2012--11/2014} %
{Position}{Company}{Location}{} %
{Job Description}

it does not work, but when replacing 2014.667 with 2014 for the end, the process exits normally. Otherwise it fails with the error

`!' Missing = inserted for \ifnum.

% !TeX spellcheck = en_GB

\documentclass[11pt,a4paper, roman]{moderncv}

% moderncv themes
\moderncvstyle{classic} 
\moderncvcolor{grey}
%timeline implementation
\usepackage[firstyear=2005,lastyear=2016]{moderntimeline}
\makeatletter
\tikzset{
    tl@startyear/.append style={
        xshift=(0.5-\tl@startfraction)*\hintscolumnwidth,
        anchor=base
    }
}
\makeatother

\usepackage{lmodern}
%\renewcommand{\rmdefault}{lmss}
% character encoding
\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc}  
             % replace by the encoding you are using
\usepackage{multicol}
% adjust the page margins
\usepackage[scale=0.8]{geometry}
\usepackage{graphicx}
\setlength{\hintscolumnwidth}{3cm}                      % if you want to change the width of the column with the dates

\firstname{firstname}

\familyname{lastname}
\title{Curriculum Vitae}    

\begin{document}

\makecvtitle

\tllabelcventry{2012.667}{2014} %
{09/2012--11/2014} %
{Position}{Company}{Location}{} %
{Job Description}

\end{document}
Mensch
  • 65,388
hannes101
  • 283

1 Answers1

2

Please check the documentation of current moderntimeline (texdoc moderntimeline). The package has changed since the date, your linked question was asked ... In the documentation on page 3 you will find:

You can also specify months (which are used only for adjusting the bar length: they are not shown in the labels), separated by a slash from the year

Conclusion: Do not use year.decimal, only use year/month!

The following code compiles:

\documentclass[11pt,a4paper,roman]{moderncv}

% moderncv themes
\moderncvstyle{classic} 
\moderncvcolor{grey}

%timeline implementation
\usepackage[firstyear=2005,lastyear=2016]{moderntimeline}
\makeatletter
\tikzset{
    tl@startyear/.append style={
        xshift=(0.5-\tl@startfraction)*\hintscolumnwidth,
        anchor=base
    }
}
\makeatother

\usepackage{lmodern}
%\renewcommand{\rmdefault}{lmss}
% character encoding
\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc}  
             % replace by the encoding you are using
\usepackage{multicol}
% adjust the page margins
\usepackage[scale=0.8]{geometry}
\usepackage{graphicx}
\setlength{\hintscolumnwidth}{3cm}                      % if you want to change the width of the column with the dates

\firstname{firstname}

\familyname{lastname}
\title{Curriculum Vitae}    


\begin{document}

\makecvtitle

\tllabelcventry{2012.667}{2014} %
{09/2012--11/2014} %
{Position}{Company}{Location}{} %
{Job Description}

\tllabelcventry{2012/9}{2014/11} % <====================================
{09/2012--11/2014} %
{Position}{Company}{Location}{} %
{Job Description}

%\tllabelcventry{2012.667}{2014.667} % <================== wrong syntax!
%{09/2012--11/2014} %
%{Position}{Company}{Location}{} %
%{Job Description}

\end{document}

with the result:

result of mwe

Mensch
  • 65,388