summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pas-cv/macro-pegase.tex
blob: 4fac2cfbbe1d24a69efd605f975fec3ef0a556dc (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
\def\modele@pegase{pegase}
\def\cv@h@pegase{2}

% =============== FOND ===============
\newcommand*\fond@pegase{%
	% dégradé à droite
	\fill[left color=white,right color=\cmdPAS@bg@bordercolor!10] (16,-6) rectangle+(6,-20);
	\draw[very thick,gray] (15,-6) -- (15,-27);
	% rectangle plein haut
	\fill[left color=\cmdPAS@bg@bgcolor,right color=\cmdPAS@bg@bordercolor] (0,-\cv@h@pegase) rectangle+(\paperwidth,-2);
	\fill[\cmdPAS@bg@bordercolor] (0,-2-\cv@h@pegase) -- (\paperwidth,-2-\cv@h@pegase) -- (\paperwidth,-3-\cv@h@pegase) -- (.55\paperwidth,-3-\cv@h@pegase) -- (.5\paperwidth,-4-\cv@h@pegase) -- (0,-4-\cv@h@pegase) -- cycle;
	% dégradé gauche
	\fill[right color=white,left color=\cmdPAS@bg@bordercolor!10] (0,0) rectangle+(1.5,-30);
	% liseret à droite 
	\draw[very thick,gray] (1.5,0) -- (1.5,-30);
	% rectangle bas
	\fill[\cmdPAS@bg@bgcolor] (0,-27) rectangle+(\paperwidth,2);
	\draw[very thick,gray] (0,-27) -- (\paperwidth,-27);
	\fill[left color=\cmdPAS@bg@bordercolor!10,right color=\cmdPAS@bg@bordercolor!40] (0,-24) -- (.5\paperwidth,-24) -- (.55\paperwidth,-24.75) -- (\paperwidth,-24.75) -- (\paperwidth,-25) -- (0,-25) -- cycle;
	\ifx\cmdPAS@bg@pic\@empty%
	\else
		\ifx\cmdPAS@bg@borderpic\@empty
			\node[right] (photo) at (1.7,-2-\cv@h@pegase) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\else
			\node[right,draw=\cmdPAS@bg@borderpic,very thick,inner sep=1pt] (photo) at (1.7,-2-\cv@h@pegase) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\fi
	\fi
	\node[color=\cmdPAS@bg@postecolor,above left] at (21,-2-\cv@h@pegase) {\scshape\cmdPAS@bg@postesize\bfseries\cmdPAS@bg@poste};
	\node[color=\cmdPAS@bg@postecolor!50!\cmdPAS@bg@bordercolor,above left,yscale=-1,scope fading=south,opacity=.4] at (21,-1.9-\cv@h@pegase) {\scshape\cmdPAS@bg@postesize\bfseries\cmdPAS@bg@poste};
	
}

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

%=============== INFO DROITE ===============
\newcommand*\infoRight@pegase[1]{%
	\AddToShipoutPicture{%
		\AtPageLowerLeft
		{%
			\begin{tikzpicture}
				\ifx\cmdPAS@bg@pic\@empty%
					\coordinate (cadre) at (1.7,-3.25);
				\else
					\coordinate (cadre) at ($(photo.east)+(.3,-.2)$);
				\fi
				\clip (0,0) rectangle+(\paperwidth,-\paperheight);
				\node[below right] at (cadre){
					\begin{minipage}{10cm}
						#1
					\end{minipage}};
			\end{tikzpicture}
		}
	}
}

%=============== TITRE ===============
\newcommand*\title@pegase[1]{%
	\noindent
	\begin{tikzpicture}
		\foreach \i/\c in {0.09/10,0.08/20,0.07/30,0.06/40,0.05/50,0.04/60,0.03/70,0.02/80,0.01/90,0/100}
		{
			\fill[black!\c] (\i,-\i) rectangle+(0.5,-0.5);
		}
		\fill[\cmdPAS@title@bordercolor] (-.1,.1) rectangle+(.5,-.5);
		\fill[white] (0,0) rectangle+(.5,-.5);
		\node[right,text=\cmdPAS@title@color] at (7mm,-2mm) {\scshape\bfseries #1};
	\end{tikzpicture}
}

%=============== MARGES ===============
\newcommand*\margins@pegase{%
\FPeval\result{clip(\cv@h@pegase+5)}
\newgeometry{tmargin=\result cm,bmargin=1.3cm,lmargin=1.2cm,rmargin=1.5cm}
}

%=============== CLEARPAGE ===============
\newcommand*\clearpage@pegase{%
	% dégradé à droite
	\fill[left color=white,right color=\cmdPAS@bg@bordercolor!10] (16,0) rectangle+(6,-30);
	\draw[very thick,gray] (15,0) -- (15,-30);
	% dégradé à gauche
	\fill[right color=white,left color=\cmdPAS@bg@bordercolor!10] (0,0) rectangle+(1.5,-30);
	\draw[very thick,gray] (1.5,0) -- (1.5,-30);
	% rectangle en bas
	\draw[very thick,gray] (0,-27) -- (\paperwidth,-27);
	\fill[left color=\cmdPAS@bg@bordercolor!10,right color=\cmdPAS@bg@bordercolor!40] (0,-24) -- (.5\paperwidth,-24) -- (.55\paperwidth,-24.75) -- (\paperwidth,-24.75) -- (\paperwidth,-25) -- (0,-25) -- cycle;
	\draw[very thick,gray] (0,-27) -- (\paperwidth,-27);
	\fill[\cmdPAS@bg@bgcolor] (0,-27) rectangle+(\paperwidth,2);
}
\newcommand*\clearmargins@pegase{%
	\newgeometry{tmargin=2cm,bmargin=2cm,lmargin=1.2cm,rmargin=1.5cm}
}