diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty b/Master/texmf-dist/tex/latex/moderntimeline/moderntimeline.sty index 5a80f34bcc1..f4fe260d0fc 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 by Raphaël Pinson <raphink@gmail.com> +%% Copyright (C) 2011-2012 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} - [2012/04/27 0.7 Add timelines to moderncv entries] + [2015/02/25 0.8 Add timelines to moderncv entries] \ProvidesPackage{moderntimeline} \RequirePackage{tikz} \RequirePackage{kvoptions} @@ -44,6 +44,10 @@ \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={ @@ -126,7 +130,8 @@ \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 +\pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt +\def\tl@startlabel{\tl@since #2} \else \def\tl@startlabel{#2} \fi \cventry{\tikz[baseline=0pt]{ \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); \fill [\tl@runningcolor] (0,0) @@ -138,7 +143,12 @@ node [tl@endyear] {\pgfmathparse{ifthenelse(#3==0,,#3)}\pgfmathresult} (\hintscolumnwidth,0pt) ; \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt - \shade [left color=#1] (\tl@startfraction*\hintscolumnwidth,0) + \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) @@ -162,8 +172,13 @@ node [tl@startyear] {#4} rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt); \pgfmathsetlength{\pgf@xa}{#3} \ifdim\pgf@xa=0pt - \shade [left color=#1] (\tl@startfraction*\hintscolumnwidth,0) - rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width); + \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); |