summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pas-cv/latex/macro-dynamique.tex
blob: 7de2146c1e64fb09ae216436fefe052872df517e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
\def\modele@dynamique{dynamique}
\def\cv@h@dynamique{5}

% =============== FOND ===============
\newcommand*\fond@dynamique{%
	% traits verticaux
	\draw[color=\cmdPAS@bg@bordercolor] (0,-\cv@h@dynamique) -- (\paperwidth,-\cv@h@dynamique);
	\draw[color=\cmdPAS@bg@bordercolor!50,very thick] (0,-\cv@h@dynamique-1) -- (\paperwidth,-\cv@h@dynamique-1);
	% bande oscillante
	\filldraw[left color=\cmdPAS@bg@bgcolor,right color=white,draw=white] (0,-2.1-\cv@h@dynamique) .. controls (10,-3.1-\cv@h@dynamique) and (15,-1.1-\cv@h@dynamique) .. (\paperwidth,-1.1-\cv@h@dynamique) -- (\paperwidth,-1.6-\cv@h@dynamique) .. controls (15,-1.6-\cv@h@dynamique) and (10,-3.6-\cv@h@dynamique) .. (0,-2.6-\cv@h@dynamique) -- cycle;
	% Poste
	\node[right,color=\cmdPAS@bg@postecolor] at (1,-.5-\cv@h@dynamique) {\scshape\bfseries\cmdPAS@bg@postesize\cmdPAS@bg@poste};
	\clip (0,-2.1-\cv@h@dynamique) .. controls (10,-3.1-\cv@h@dynamique) and (15,-1.1-\cv@h@dynamique) .. (\paperwidth,-1.1-\cv@h@dynamique) -- (\paperwidth,0) -- (0,0) -- cycle;
	% Photo
	\ifx\cmdPAS@bg@pic\@empty%
	\else
		\ifx\cmdPAS@bg@borderpic\@empty
			\node[above] at (.9\paperwidth,-1.5-\cv@h@dynamique) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\else
			\node[above,draw=\cmdPAS@bg@borderpic,very thick,inner sep=1pt] at (.9\paperwidth,-1.5-\cv@h@dynamique) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\fi
	\fi
}

%=============== INFO GAUCHE ===============
\newcommand*\infoLeft@dynamique[1]{%
	\AddToShipoutPicture{%
		\put(\LenToUnit{1cm},\LenToUnit{.97\paperheight})
			{%
				\rlap{
					\begin{minipage}[t]{0.5\paperwidth}
					 	#1
					\end{minipage}
				}
			}
	}
}

%=============== INFO DROITE ===============
\newcommand*\infoRight@dynamique[1]{%
	\AddToShipoutPicture{%
		\put(\LenToUnit{.95\paperwidth},\LenToUnit{.97\paperheight}){%
			\llap{%
			\begin{minipage}[t]{.5\paperwidth}
				\begin{flushright}#1\end{flushright}
			\end{minipage}
			}
		}
	}
}

%=============== TITRE ===============
\newcommand*\title@dynamique[1]{%
	\begin{tikzpicture}
		\node[right,fill=\cmdPAS@title@color,draw=\cmdPAS@title@color] (titre) {\scshape\bfseries\Large #1};
		\fill[color=\cmdPAS@title@bordercolor] ($(titre.north west)+(.01,0)$) -- ($(titre.south west)+(.01,-.01)$) -- ($(titre.south west)+(-.5,-.01)$) -- ($(titre.north west)+(-.5,0)$) -- cycle;
	\end{tikzpicture}
}

%=============== MARGES ===============
\newcommand*\margins@dynamique{%
\FPeval\result{clip(\cv@h@dynamique+4)}
\newgeometry{tmargin=\result cm,bmargin=1.5cm,lmargin=1cm,rmargin=1cm}
}

%=============== CLEARPAGE ===============
\newcommand*\clearmargins@dynamique{%
	\newgeometry{tmargin=2cm,bmargin=1.5cm,lmargin=1cm,rmargin=1cm}
}