diff options
author | Karl Berry <karl@freefriends.org> | 2015-03-06 22:27:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-03-06 22:27:41 +0000 |
commit | 3d79f409be380b65bef407bae10629114ea5755a (patch) | |
tree | 6d1494490e7ee59aaeaf2b2bd8c5644d557c0342 /Master/texmf-dist/source/latex/moderntimeline | |
parent | 59459b17c1b5c64a74bb926836393d379e64493e (diff) |
moderntimeline (6mar15)
git-svn-id: svn://tug.org/texlive/trunk@36450 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/moderntimeline')
-rw-r--r-- | Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx | 48 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins | 4 |
2 files changed, 41 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx b/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.dtx index bf57e236ddb..de469a5114f 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 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 @@ -26,7 +26,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{moderntimeline} %<*package> - [2012/04/27 0.7 Add timelines to moderncv entries] + [2015/02/25 0.8 Add timelines to moderncv entries] %</package> % %<*driver> @@ -43,7 +43,7 @@ %</driver> % \fi % -% \CheckSum{222} +% \CheckSum{251} % % \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.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} % \changes{0.5}{2011/11/15}{Fix positions in tlcventry and tldatecventry, add tltextsingle, thanks to Stéphane Dupille} @@ -250,6 +251,15 @@ % {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} +% % \DescribeMacro{\tldatecventry} % Positions usually last long enough to draw time lines, % but there are also punctual entries, such as diplomas. @@ -327,6 +337,15 @@ % \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]{% @@ -465,7 +484,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) @@ -477,7 +497,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) @@ -503,15 +528,20 @@ rectangle (\hintscolumnwidth,\tl@runningwidth); \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); - \fill [#1] (0,0) + \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 - \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) + \fill [#1] (\tl@startfraction*\hintscolumnwidth,0) rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width); \fi } diff --git a/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins b/Master/texmf-dist/source/latex/moderntimeline/moderntimeline.ins index 834b2efcfdd..c2ff8e38124 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 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 @@ -25,7 +25,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 |