summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-31 22:41:33 +0000
committerKarl Berry <karl@freefriends.org>2015-08-31 22:41:33 +0000
commitf7f914be994de8129564cb45fec1010c2321f882 (patch)
tree3cd6f76e8a8ff8ea83c871cd9aa819faabec1531
parentaa33a712112ba616d83b95ead228b640dc6df765 (diff)
moderntimeline (31aug15)
git-svn-id: svn://tug.org/texlive/trunk@38254 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/moderntimeline/README14
-rw-r--r--Master/texmf-dist/doc/latex/moderntimeline/moderntimeline.pdfbin176538 -> 183585 bytes
-rw-r--r--Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx226
-rw-r--r--Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins4
-rw-r--r--Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty123
5 files changed, 299 insertions, 68 deletions
diff --git a/Master/texmf-dist/doc/latex/moderntimeline/README b/Master/texmf-dist/doc/latex/moderntimeline/README
new file mode 100644
index 00000000000..a800af6a5f4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/moderntimeline/README
@@ -0,0 +1,14 @@
+Moderntimeline
+==============
+
+[![Build Status](https://img.shields.io/travis/raphink/moderntimeline/master.svg)](https://travis-ci.org/raphink/moderntimeline)
+[![CTAN](https://img.shields.io/ctan/v/moderntimeline.svg)](https://www.ctan.org/pkg/moderntimeline)
+[![CTAN license](https://img.shields.io/ctan/l/moderntimeline.svg)](https://www.ctan.org/pkg/moderntimeline)
+
+Timelines for use with moderncv.
+
+This LaTeX package provides commands to configure and to draw
+timeline diagrams; such diagrams are designed to fit into
+*Curriculum Vitae* documents written using the
+[moderncv](https://www.ctan.org/pkg/moderncv) class.
+
diff --git a/Master/texmf-dist/doc/latex/moderntimeline/moderntimeline.pdf b/Master/texmf-dist/doc/latex/moderntimeline/moderntimeline.pdf
index b237664f554..457c74be96b 100644
--- a/Master/texmf-dist/doc/latex/moderntimeline/moderntimeline.pdf
+++ b/Master/texmf-dist/doc/latex/moderntimeline/moderntimeline.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx b/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx
index de469a5114f..856eb01c4ea 100644
--- a/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx
+++ b/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2011-2012 by Raphaël Pinson <raphink@gmail.com>
+% Copyright (C) 2011-2015 by Raphaël Pinson <raphink@gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -26,7 +26,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{moderntimeline}
%<*package>
- [2015/02/25 0.8 Add timelines to moderncv entries]
+ [2015/08/31 0.9 Add timelines to moderncv entries]
%</package>
%
%<*driver>
@@ -43,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{251}
+% \CheckSum{333}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -62,6 +62,7 @@
% Right brace \} Tilde \~}
%
%
+% \changes{0.9}{2015/08/31}{Add month support, thanks to Astrinus}
% \changes{0.8}{2015/02/25}{Add the tlsetnotshadedfraction command, thanks to Stefano Gronchi}
% \changes{0.7}{2012/04/26}{Various fixes by Jake to allow fractional years in tllabelcventry}
% \changes{0.6}{2012/01/17}{Fix compatibility with moderncv 0.15.1}
@@ -204,6 +205,28 @@
% \tlsince{Since~}
% \end{verbatim}
%
+% \DescribeMacro{\tlsetnotshadedfraction}
+% If last year in |\tlcventry| and |\tllabelcventry| is 0, the bar
+% is shaded. With this command you control the fraction of the bar
+% that is not shaded (default = 0):
+%
+% \begin{verbatim}
+% \tlsetnotshadedfraction{0.4} % The first 40% of the bar is not shaded
+% \end{verbatim}
+%
+%
+% \DescribeMacro{\tlenablemonths}
+% If you want to use months when drawing bars with |\tlcventry| and
+% |\tllabelcventry|, issue this command. This feature is not enabled
+% by default since it changes the way the bar are drawn if the month
+% is not specified.
+%
+% \DescribeMacro{\tldisablemonths}
+% This macro (default behaviour) does not in fact ignore months, but
+% retain the historical behaviour of this package to draw the bars at
+% the beginning of the year, so is not advisable to use months in dates.
+% Default.
+%
%
% \subsection{CV entries}
%
@@ -233,6 +256,19 @@
% If the position is still held, use \texttt{0} as the end date.
% This will add a gradient at the end of the time line.
%
+% 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:
+%
+% \begin{verbatim}
+% \tlcventry{1999/2}{2002/6}{WYSIWYG User}{Unnamed Company}
+% {Somewhere}{}{Tried hard to typeset documents}
+% \tlcventry[blue]{2002/8}{0}{Happy TeXnician}{Any Company}
+% {Anywhere}{}{Achieved nice typography and shared code with friends}
+% \end{verbatim}
+%
+% Don't use a leading zero, since this make PGF think the number is in octal,
+% so it complains when sees \texttt{08} and \texttt{09}.
+%
%
% \DescribeMacro{\tllabelcventry}
% The |\tllabelcventry| macro is similar to |\tlcventry|,
@@ -251,14 +287,8 @@
% {The Internet}{}{Tried Scribus for a short while}
% \end{verbatim}
%
-% \DescribeMacro{\tlsetnotshadedfraction}
-% If last year in |\tlcventry| and |\tllabelcventry| is 0, the bar
-% is shaded. With this command you control the fraction of the bar
-% that is not shaded (default = 0):
-%
-% \begin{verbatim}
-% \tlsetnotshadedfraction{0.4} % The first 40% of the bar is not shaded
-% \end{verbatim}
+% You can enter months for adjusting bar length as in |\tlcventry|.
+%
%
% \DescribeMacro{\tldatecventry}
% Positions usually last long enough to draw time lines,
@@ -302,6 +332,8 @@
\DeclareStringOption{firstyear}
\DeclareStringOption{lastyear}
\ProcessKeyvalOptions*
+\newif\ifstartyear
+\newif\ifissince
% \end{macrocode}
%
% \begin{macro}{\tlwidth}
@@ -337,15 +369,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\tlsetnotshadedfraction}
-% \begin{macrocode}
-\newcommand{\tlsetnotshadedfraction}[1]{%
- \def\tl@nsfrac{#1}
-}
-\tlsetnotshadedfraction{0}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\tltextstart}
% \begin{macrocode}
\newcommand{\tltextstart}[2][base west]{%
@@ -408,6 +431,34 @@
% \end{macrocode}
% \end{macro}
%
+%
+% \begin{macro}{\tlsetnotshadedfraction}
+% \begin{macrocode}
+\newcommand{\tlsetnotshadedfraction}[1]{%
+ \def\tl@nsfrac{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\tlenablemonths}
+% \begin{macrocode}
+\newcommand{\tlenablemonths}{%
+ \def\tl@nomonthvalue{6}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\tldisablemonths}
+% \begin{macrocode}
+\newcommand{\tldisablemonths}{%
+ \def\tl@nomonthvalue{0}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
% Defaults
% \begin{macrocode}
\tltext{\scriptsize}
@@ -415,6 +466,8 @@
\tlrunningwidth{0.05ex}
\tlrunningcolor{gray}
\tlsince{}
+\tlsetnotshadedfraction{0}
+\tldisablemonths
% \end{macrocode}
%
%
@@ -428,18 +481,114 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\tl@yearfraction}
+% \begin{macrocode}
+\newcommand{\tl@yearfraction}[1]{% Month 1 - 12 -> 0 - 11
+ \gdef\tl@tmpyear{-1}% Resetting
+ \gdef\tl@tmpmonth{-1}%
+ \begingroup%
+ \edef\@tempa{#1/}%
+ \expandafter\endgroup\expandafter\tl@yearfraction@auxi\@tempa\@nnil%
+ \ifstartyear
+ \pgfmathsetmacro\tl@startyear{\tl@tmpyear+(\tl@tmpmonth-1)/12}%
+ \else
+ \ifnum\tl@tmpyear=0
+ \pgfmathsetmacro\tl@endyear{\tl@lastyear}%
+ \issincetrue%
+ \else
+ \pgfmathsetmacro\tl@endyear{\tl@tmpyear+\tl@tmpmonth/12}%
+ \issincefalse%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\tldatelabelcventry}
+% \begin{macro}{\tl@yearfraction@auxi}
% \begin{macrocode}
-\newcommand{\tldatelabelcventry}[8][color1]{%
+\newcommand{\tl@yearfraction@auxi}[2]{}
+\def\tl@yearfraction@auxi#1/#2\@nnil{%
+ \ifnum\tl@tmpyear<0 % First call
+ \pgfmathsetmacro\tl@tmpyear{+#1}%
+ \ifx\@nnil#2\@nnil
+ \pgfmathsetmacro\tl@tmpmonth{+\tl@nomonthvalue}%
+ \else
+ \expandafter\tl@yearfraction@auxi#2\@nnil%
+ \fi
+ \else
+ \pgfmathsetmacro\tl@tmpmonth{#1}%
+ \fi
+}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tl@splitlabels}
% \begin{macrocode}
-\pgfmathsetmacro\tl@endyear{\tl@lastyear}
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+\newcommand{\tl@splitlabels}[1]{
+ \gdef\tl@startlabel{}% Resetting
+ \begingroup%
+ \edef\@tempa{#1///}%
+ \expandafter\endgroup\expandafter\tl@splitlabels@auxi\@tempa\@nnil%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tl@splitlabels@auxi}
+% \begin{macrocode}
+\newcommand{\tl@splitlabels@auxi}[2]{}
+\def\tl@splitlabels@auxi#1///#2\@nnil{%
+ \ifx\tl@startlabel\empty\relax% First call
+ \gdef\tl@startlabel{#1}
+ \ifx\@nnil#2\@nnil
+ \gdef\tl@startlabel{}
+ \else
+ \expandafter\tl@splitlabels@auxi#2\@nnil%
+ \fi
+ \else
+ \gdef\tl@endlabel{#1}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tl@formatstartyear}
+% \begin{macrocode}
+\newcommand{\tl@formatstartyear}[1]{
+ \startyeartrue
+ \tl@yearfraction{#1}
+ \pgfmathsetmacro\tl@startfraction{(\tl@startyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+ \ifissince
+ \xdef\tl@startlabel{\tl@since \tl@tmpyear}
+ \else
+ \xdef\tl@startlabel{\tl@tmpyear}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tl@formatendyear}
+% \begin{macrocode}
+\newcommand{\tl@formatendyear}[1]{
+ \startyearfalse%
+ \tl@yearfraction{#1}
+ \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+ \ifissince%
+ \xdef\tl@endlabel{}
+ \else
+ \xdef\tl@endlabel{\tl@tmpyear}
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\tldatelabelcventry}
+% \begin{macrocode}
+\newcommand{\tldatelabelcventry}[8][color1]{%
% \end{macrocode}
% \begin{macrocode}
- \cventry{\tikz{
+\issincefalse
+\tl@formatstartyear{#2}
+\cventry{\tikz{
\fill [\tl@runningcolor] (0,0)
rectangle (\hintscolumnwidth,\tl@runningwidth);
\fill [#1] (0,0)
@@ -458,9 +607,8 @@
\newcommand{\tldatecventry}[7][color1]{%
% \end{macrocode}
% \begin{macrocode}
-\pgfmathsetmacro\tl@endyear{\tl@lastyear}%
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+\issincefalse
+\tl@formatstartyear{#2}
\cventry{\tikz[baseline=0pt]{
\useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);
\fill [\tl@runningcolor] (0,0)
@@ -481,11 +629,8 @@
\newcommand{\tlcventry}[8][color1]{%
% \end{macrocode}
% \begin{macrocode}
-\pgfmathsetmacro\tl@endyear{ifthenelse(#3==0,\tl@lastyear,#3)}%
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
-\def\tl@startlabel{\tl@since #2} \else \def\tl@startlabel{#2} \fi
+\tl@formatendyear{#3}
+\tl@formatstartyear{#2}
\cventry{\tikz[baseline=0pt]{
\useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);
\fill [\tl@runningcolor] (0,0)
@@ -494,9 +639,9 @@
++(\tl@startfraction*\hintscolumnwidth,0pt)
node [tl@startyear] {\tl@startlabel}
rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt)
- node [tl@endyear] {\pgfmathparse{ifthenelse(#3==0,,#3)}\pgfmathresult}
+ node [tl@endyear] {\tl@endlabel}
(\hintscolumnwidth,0pt) ;
- \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
+ \ifissince
\newdimen\fullcolorwidth
\pgfmathsetlength\fullcolorwidth{\tl@startfraction*(1+(1-\tl@startfraction)*\tl@nsfrac)*\hintscolumnwidth}
\shade [left color=#1,right color=#1]
@@ -520,9 +665,8 @@
\newcommand{\tllabelcventry}[9][color1]{%
% \end{macrocode}
% \begin{macrocode}
-\pgfmathsetmacro\tl@endyear{ifthenelse(#3==0,\tl@lastyear,#3)}
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+\tl@formatendyear{#3}
+\tl@formatstartyear{#2}
\cventry{\tikz[baseline=0pt]{
\fill [\tl@runningcolor] (0,0)
rectangle (\hintscolumnwidth,\tl@runningwidth);
@@ -531,8 +675,8 @@
\fill [#1] (0,0)
++(\tl@startfraction*\hintscolumnwidth,0pt)
node [tl@startyear] {#4}
- rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt);
- \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
+ rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt) ;
+ \ifissince
\newdimen\fullcolorwidth
\pgfmathsetlength\fullcolorwidth{\tl@startfraction*(1+(1-\tl@startfraction)*\tl@nsfrac)*\hintscolumnwidth}
\shade [left color=#1,right color=#1]
diff --git a/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins b/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins
index c2ff8e38124..6b7a523c52a 100644
--- a/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins
+++ b/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Raphaël Pinson <raphink@gmail.com>
+%% Copyright (C) 2011-2015 by Raphaël Pinson <raphink@gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -25,7 +25,7 @@
This is a generated file.
-Copyright (C) 2011-2012 by Raphaël Pinson <raphink@gmail.com>
+Copyright (C) 2011-2015 by Raphaël Pinson <raphink@gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty b/Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty
index f4fe260d0fc..a366c1cda8c 100644
--- a/Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty
+++ b/Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2011-2012 by Raphaël Pinson <raphink@gmail.com>
+%% Copyright (C) 2011-2015 by Raphaël Pinson <raphink@gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,7 +20,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{moderntimeline}
- [2015/02/25 0.8 Add timelines to moderncv entries]
+ [2015/08/31 0.9 Add timelines to moderncv entries]
\ProvidesPackage{moderntimeline}
\RequirePackage{tikz}
\RequirePackage{kvoptions}
@@ -31,6 +31,8 @@
\DeclareStringOption{firstyear}
\DeclareStringOption{lastyear}
\ProcessKeyvalOptions*
+\newif\ifstartyear
+\newif\ifissince
\newcommand{\tlwidth}[1]{%
\def\tl@width{#1}
\pgfmathsetmacro\tl@textstartabove{\tl@width+1pt}
@@ -44,10 +46,6 @@
\newcommand{\tlsince}[1]{%
\def\tl@since{#1}
}
-\newcommand{\tlsetnotshadedfraction}[1]{%
- \def\tl@nsfrac{#1}
-}
-\tlsetnotshadedfraction{0}
\newcommand{\tltextstart}[2][base west]{%
\tikzset{
tl@startyear/.style={
@@ -85,21 +83,101 @@
\tltextend{#1}%
\tltextsingle{#1}%
}
+\newcommand{\tlsetnotshadedfraction}[1]{%
+ \def\tl@nsfrac{#1}
+}
+\newcommand{\tlenablemonths}{%
+ \def\tl@nomonthvalue{6}
+}
+\newcommand{\tldisablemonths}{%
+ \def\tl@nomonthvalue{0}
+}
\tltext{\scriptsize}
\tlwidth{0.8ex}
\tlrunningwidth{0.05ex}
\tlrunningcolor{gray}
\tlsince{}
+\tlsetnotshadedfraction{0}
+\tldisablemonths
\newcommand{\tlmaxdates}[2]{%
\def\tl@firstyear{#1}
\def\tl@lastyear{#2}
\pgfmathsetmacro\tl@yearrange{\tl@lastyear-\tl@firstyear}
}
+\newcommand{\tl@yearfraction}[1]{% Month 1 - 12 -> 0 - 11
+ \gdef\tl@tmpyear{-1}% Resetting
+ \gdef\tl@tmpmonth{-1}%
+ \begingroup%
+ \edef\@tempa{#1/}%
+ \expandafter\endgroup\expandafter\tl@yearfraction@auxi\@tempa\@nnil%
+ \ifstartyear
+ \pgfmathsetmacro\tl@startyear{\tl@tmpyear+(\tl@tmpmonth-1)/12}%
+ \else
+ \ifnum\tl@tmpyear=0
+ \pgfmathsetmacro\tl@endyear{\tl@lastyear}%
+ \issincetrue%
+ \else
+ \pgfmathsetmacro\tl@endyear{\tl@tmpyear+\tl@tmpmonth/12}%
+ \issincefalse%
+ \fi
+ \fi
+}
+\newcommand{\tl@yearfraction@auxi}[2]{}
+\def\tl@yearfraction@auxi#1/#2\@nnil{%
+ \ifnum\tl@tmpyear<0 % First call
+ \pgfmathsetmacro\tl@tmpyear{+#1}%
+ \ifx\@nnil#2\@nnil
+ \pgfmathsetmacro\tl@tmpmonth{+\tl@nomonthvalue}%
+ \else
+ \expandafter\tl@yearfraction@auxi#2\@nnil%
+ \fi
+ \else
+ \pgfmathsetmacro\tl@tmpmonth{#1}%
+ \fi
+}
+\newcommand{\tl@splitlabels}[1]{
+ \gdef\tl@startlabel{}% Resetting
+ \begingroup%
+ \edef\@tempa{#1///}%
+ \expandafter\endgroup\expandafter\tl@splitlabels@auxi\@tempa\@nnil%
+}
+\newcommand{\tl@splitlabels@auxi}[2]{}
+\def\tl@splitlabels@auxi#1///#2\@nnil{%
+ \ifx\tl@startlabel\empty\relax% First call
+ \gdef\tl@startlabel{#1}
+ \ifx\@nnil#2\@nnil
+ \gdef\tl@startlabel{}
+ \else
+ \expandafter\tl@splitlabels@auxi#2\@nnil%
+ \fi
+ \else
+ \gdef\tl@endlabel{#1}
+ \fi
+}
+\newcommand{\tl@formatstartyear}[1]{
+ \startyeartrue
+ \tl@yearfraction{#1}
+ \pgfmathsetmacro\tl@startfraction{(\tl@startyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+ \ifissince
+ \xdef\tl@startlabel{\tl@since \tl@tmpyear}
+ \else
+ \xdef\tl@startlabel{\tl@tmpyear}
+ \fi
+}
+\newcommand{\tl@formatendyear}[1]{
+ \startyearfalse%
+ \tl@yearfraction{#1}
+ \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+ \ifissince%
+ \xdef\tl@endlabel{}
+ \else
+ \xdef\tl@endlabel{\tl@tmpyear}
+ \fi
+}
\newcommand{\tldatelabelcventry}[8][color1]{%
-\pgfmathsetmacro\tl@endyear{\tl@lastyear}
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
- \cventry{\tikz{
+\issincefalse
+\tl@formatstartyear{#2}
+\cventry{\tikz{
\fill [\tl@runningcolor] (0,0)
rectangle (\hintscolumnwidth,\tl@runningwidth);
\fill [#1] (0,0)
@@ -111,9 +189,8 @@
{#4}{#5}{#6}{#7}{#8}
}
\newcommand{\tldatecventry}[7][color1]{%
-\pgfmathsetmacro\tl@endyear{\tl@lastyear}%
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+\issincefalse
+\tl@formatstartyear{#2}
\cventry{\tikz[baseline=0pt]{
\useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);
\fill [\tl@runningcolor] (0,0)
@@ -127,11 +204,8 @@
{#3}{#4}{#5}{#6}{#7}%
}
\newcommand{\tlcventry}[8][color1]{%
-\pgfmathsetmacro\tl@endyear{ifthenelse(#3==0,\tl@lastyear,#3)}%
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
-\def\tl@startlabel{\tl@since #2} \else \def\tl@startlabel{#2} \fi
+\tl@formatendyear{#3}
+\tl@formatstartyear{#2}
\cventry{\tikz[baseline=0pt]{
\useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);
\fill [\tl@runningcolor] (0,0)
@@ -140,9 +214,9 @@
++(\tl@startfraction*\hintscolumnwidth,0pt)
node [tl@startyear] {\tl@startlabel}
rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt)
- node [tl@endyear] {\pgfmathparse{ifthenelse(#3==0,,#3)}\pgfmathresult}
+ node [tl@endyear] {\tl@endlabel}
(\hintscolumnwidth,0pt) ;
- \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
+ \ifissince
\newdimen\fullcolorwidth
\pgfmathsetlength\fullcolorwidth{\tl@startfraction*(1+(1-\tl@startfraction)*\tl@nsfrac)*\hintscolumnwidth}
\shade [left color=#1,right color=#1]
@@ -159,9 +233,8 @@
{#4}{#5}{#6}{#7}{#8}%
}
\newcommand{\tllabelcventry}[9][color1]{%
-\pgfmathsetmacro\tl@endyear{ifthenelse(#3==0,\tl@lastyear,#3)}
-\pgfmathsetmacro\tl@startfraction{(#2-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
-\pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%
+\tl@formatendyear{#3}
+\tl@formatstartyear{#2}
\cventry{\tikz[baseline=0pt]{
\fill [\tl@runningcolor] (0,0)
rectangle (\hintscolumnwidth,\tl@runningwidth);
@@ -170,8 +243,8 @@
\fill [#1] (0,0)
++(\tl@startfraction*\hintscolumnwidth,0pt)
node [tl@startyear] {#4}
- rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt);
- \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt
+ rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt) ;
+ \ifissince
\newdimen\fullcolorwidth
\pgfmathsetlength\fullcolorwidth{\tl@startfraction*(1+(1-\tl@startfraction)*\tl@nsfrac)*\hintscolumnwidth}
\shade [left color=#1,right color=#1]