Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I switch in package moderntimeline the positions of startyear and endyear without breaking the layout?

Would be nice to have the startyear below and the endyear on top.

I'd like to simply change 2010 with 2007 in the following image:

enter image description here

share|improve this question
    
Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. –  Kurt Nov 18 '12 at 23:28
1  
Can you please compose a simple, minimal and complete document showing what exactly do you want to change? –  Gonzalo Medina Nov 18 '12 at 23:40
    
Hope this screenshot is enough? Didn't think that a minimal or complete document will help to solve the problem!? –  Megachip Nov 19 '12 at 0:14
    
@Megachip A MWE might not help to actually find the solution (although in some cases it actually does), but it certainly saves time. –  Gonzalo Medina Nov 19 '12 at 0:31

1 Answer 1

up vote 5 down vote accepted

You can produce the desired result by setting \tlwidth, \tltextstart, and \tltextend appropriately, as the following simple example shows:

\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}
\tlwidth{-2pt}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}

\tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}

\end{document}

enter image description here

With the above solution the bars are below the timeline; to keep the bars above the timeline, instead of changing \tlwidth to a negative value, one can change the value for \tl@textstartabove:

\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\makeatletter
\pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}
\makeatother

\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}

\tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}

\end{document}

enter image description here

share|improve this answer
    
Perfekt, excactly what i want. Thank you very very much. Possible this could add to moderntimeline documentation!? –  Megachip Nov 19 '12 at 12:44
    
@Megachip You're welcome. I will talk about this with the package creator. Please don't forget to accept the answer (accepting and up-voting are two different actions) if you consider that it solved your problem. In case of doubt please see How do you accept an answer?. –  Gonzalo Medina Nov 19 '12 at 14:54
    
I've got a little problem with this solution, possible you could help me again and add it to the solution: see link. The \tldatelabelcventry did not work proper anymore. \tllabelcventry works fine. –  Megachip Nov 19 '12 at 17:26
    
@Megachip I gladly will hel you, but I need to see some sample complete code (similar to the one in my answer) illustrating the problem. Please upload this sample code elsewhere and provide a link. –  Gonzalo Medina Nov 20 '12 at 13:42
    
Sorry: tex.stackexchange.com/questions/83530/… –  Megachip Nov 20 '12 at 15:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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