barchart included
This commit is contained in:
@ -21,11 +21,11 @@
|
||||
%-----------------------------------------------------------------------------------------------------------------------------------------------%
|
||||
|
||||
% define global counters
|
||||
\newcounter{expcounter}
|
||||
\newcounter{educounter}
|
||||
\newcounter{yearcount}
|
||||
|
||||
|
||||
\newcounter{leftcount}
|
||||
|
||||
% env cvtimeline
|
||||
%
|
||||
% creates a vertical cv timeline
|
||||
@ -35,7 +35,13 @@
|
||||
% param 3: overall width
|
||||
%param 4: overall height
|
||||
\newenvironment{cvtimeline}[4]{
|
||||
|
||||
\newcommand{\cvcategory}[2]{
|
||||
\node[label=\mbox{\colorbox{##1}{\strut\hspace{2pt}}\colorbox{white}{\textcolor{textcol}{##2}}}] at (0,-5) {}; %start year
|
||||
}
|
||||
|
||||
\newcommand{\bxwidth}{4.5}
|
||||
\newcommand{\bxheight}{2}
|
||||
|
||||
|
||||
% creates a stretched box as cv entry headline followed by two paragraphs about
|
||||
@ -45,63 +51,60 @@
|
||||
% param 3: event name
|
||||
% param 4: institution (where did you work / study)
|
||||
% param 5: what was your position
|
||||
% param 6: some words about your contributions
|
||||
%
|
||||
\newcommand{\cvexperience}[6] {
|
||||
% param 6: color
|
||||
% param 7: level (position, use minus for left placement)
|
||||
\newcommand{\cvevent}[7] {
|
||||
|
||||
\foreach \monthf/\yearf in {##1} {
|
||||
\foreach \montht/\yeart in {##2} {
|
||||
\definecolor{expcol}{RGB}{50,50,\theexpcounter}
|
||||
|
||||
\pgfmathparse{#3/\fullrange*((\yearf-#1)+(\monthf/12))}
|
||||
\let\startexp\pgfmathresult
|
||||
\pgfmathparse{#3/\fullrange*((\yeart-#1)+(\montht/12))}
|
||||
\let\endexp\pgfmathresult
|
||||
\pgfmathparse{1/(\endexp-\startexp+1.5)}
|
||||
\pgfmathparse{1/(\endexp-\startexp+1)}
|
||||
\let\lenexp\pgfmathresult
|
||||
\pgfmathparse{0.5*\endexp+0.5*\startexp}
|
||||
\let\midexp\pgfmathresult
|
||||
|
||||
\draw[fill=expcol, opacity=0.75] (\startexp,-0.1) -- (\startexp,-0.6-\lenexp) -- (\endexp,-0.6-\lenexp) -- (\endexp,-0.1) --cycle;
|
||||
\draw[draw=black](\midexp,-0.6-\lenexp) -- ((\midexp,-1.5-\lenexp);
|
||||
\node[label=\textcolor{textcol}{##3}] at (\midexp,-2-\lenexp) {}; %start year
|
||||
\addtocounter{expcounter}{50}
|
||||
}
|
||||
}
|
||||
}
|
||||
\newcommand{\cveducation}[6] {
|
||||
\foreach \monthf/\yearf in {##1} {
|
||||
\foreach \montht/\yeart in {##2} {
|
||||
\definecolor{expcol}{RGB}{250,\theeducounter,0}
|
||||
\pgfmathparse{#3/\fullrange*((\yearf-#1)+(\monthf/12))}
|
||||
\let\startexp\pgfmathresult
|
||||
\pgfmathparse{#3/\fullrange*((\yeart-#1)+(\montht/12))}
|
||||
\let\endexp\pgfmathresult
|
||||
\pgfmathparse{1/(\endexp-\startexp+1.5)}
|
||||
\let\lenexp\pgfmathresult
|
||||
\pgfmathparse{0.5*\endexp+0.5*\startexp}
|
||||
\let\midexp\pgfmathresult
|
||||
%\filldraw[fill=##6,draw=none, opacity=0.9] (-0.15-##7,\startexp) rectangle (-0.15-##7-0.5,\endexp);
|
||||
\draw[draw=##6, line width=1.5pt] (0, \startexp) -- (1,\startexp);
|
||||
|
||||
\draw[fill=expcol, opacity=0.75] (\startexp,0.1) -- (\startexp,0.6+\lenexp) -- (\endexp,0.6+\lenexp) -- (\endexp,0.1) --cycle;
|
||||
\draw[draw=black](\midexp,0.6+\lenexp) -- ((\midexp,1+\lenexp);
|
||||
\node[label=\textcolor{textcol}{##3}] at (\midexp,1.1+\lenexp) {}; %start year
|
||||
\addtocounter{educounter}{50}
|
||||
\node[label={[label distance=0]0:\colorbox{##6}{\strut}\colorbox{white}{\textcolor{gray}{##1}\hspace{3pt}\textcolor{textcol}{##3}}}] at (0.5, \startexp) {};
|
||||
}
|
||||
\addtocounter{leftcount}{1}
|
||||
}
|
||||
}
|
||||
|
||||
%--------------------------------------------------------------------------------------
|
||||
% BEGIN
|
||||
%--------------------------------------------------------------------------------------
|
||||
|
||||
\begin{tikzpicture}
|
||||
|
||||
\setcounter{leftcount}{1}
|
||||
|
||||
%calc fullrange= number of years
|
||||
\pgfmathparse{(#2-#1)}
|
||||
\let\fullrange\pgfmathresult
|
||||
\draw[draw=textcol,line width=1pt] (0,0) -- (#3,0) ; %line
|
||||
\draw[draw=textcol,line width=4pt] (0,0) -- (0,#3) ; %the timeline
|
||||
|
||||
%for each year put a horizontal line in place
|
||||
\setcounter{yearcount}{1}
|
||||
\setcounter{expcounter}{50}
|
||||
\whiledo{\value{yearcount} < \fullrange}{
|
||||
\draw[draw=textcol] (#3/\fullrange*\value{yearcount},-0.15) -- (#3/\fullrange*\value{yearcount},0.15);
|
||||
\draw[fill=white,draw=textcol, line width=2pt] (0,#3/\fullrange*\value{yearcount}) circle (0.1);
|
||||
\stepcounter{yearcount}
|
||||
}
|
||||
\node[label=\textcolor{textcol}{#1}] at (-0.75,0) {}; %start year
|
||||
\node[label=\textcolor{textcol}{#2}] at (#3+0.75,0) {}; %end year
|
||||
|
||||
%start year
|
||||
\filldraw[fill=white!100,draw=textcol,line width=3pt] (0,-0.5) circle (0.5);
|
||||
\node[label=\textcolor{textcol}{\textbf{\small#1}}] at (0,-0.85) {};
|
||||
|
||||
%end year
|
||||
\filldraw[fill=white!100,draw=textcol,line width=5pt] (0,#3+0.75) circle (0.75);
|
||||
\node[label=\textcolor{textcol}{\textbf{\large#2}}] at (0,#3+0.42) {};
|
||||
|
||||
|
||||
|
||||
}%end begin part of newenv
|
||||
{\end{tikzpicture}}
|
Reference in New Issue
Block a user