summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pas-cv/macro-mars.tex
blob: c00b795842586fa51d14d47015fde1f6b6593188 (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
\def\modele@mars{mars}
\def\cv@h@mars{4}

% =============== FOND ===============

\newcommand*\fond@mars{%
	\fill[left color=gray,right color=white] (2.5,0) rectangle+(-.5,-\paperheight);
	\fill[bottom color=\cmdPAS@bg@bordercolor,top color=white] (0,0) rectangle+(2,-\paperheight);
	\filldraw[fill=white,draw=\cmdPAS@bg@bgcolor,very thick] (-1,-\cv@h@mars) rectangle+(23,-.25);
	\filldraw[fill=white,draw=\cmdPAS@bg@bgcolor,very thick] (-1,-\cv@h@mars-.25) rectangle+(23,-.35);
	\fill[\cmdPAS@bg@bgcolor] (0,-\cv@h@mars-.6) rectangle+(\paperwidth,-1.5);
	\filldraw[fill=white,draw=\cmdPAS@bg@bgcolor,very thick] (-1,-\cv@h@mars-2.1) rectangle+(23,-.25);
	\ifx\cmdPAS@bg@pic\@empty%
	\else
		\ifx\cmdPAS@bg@borderpic\@empty
			\node[below] at (2,-1) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\else
			\node[below,draw=\cmdPAS@bg@borderpic,very thick,inner sep=1pt] (photo) at (2,-1) {\includegraphics[scale=\cmdPAS@bg@scalepic]{\cmdPAS@bg@pic}};
		\fi
	\fi
	\node[color=\cmdPAS@bg@postecolor,left] (poste) at (.95\paperwidth,-\cv@h@mars-1.35) {\scshape\cmdPAS@bg@postesize\bfseries\cmdPAS@bg@poste};
	\fill[white] (poste.east) circle (.75cm);
	\fill[white] (poste.west) circle (.75cm);
	\fill[white] ($(poste.west)+(0,.8)$) rectangle ($(poste.east)+(0,-.8)$);
	\node[color=\cmdPAS@bg@postecolor,left] at (.95\paperwidth,-\cv@h@mars-1.35) {\scshape\cmdPAS@bg@postesize\bfseries\cmdPAS@bg@poste};
}

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

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

%=============== TITRE ===============
\newcommand*\title@mars[1]{%
	\noindent
	\begin{tikzpicture}
		\draw[\cmdPAS@title@bordercolor,very thick] (0,0) -- (\paperwidth,0);
		\node[above right,text=\cmdPAS@title@color] at (3,0) {\scshape\bfseries #1};
		\filldraw[draw=\cmdPAS@title@bordercolor,fill=white] (2,0) circle (.5cm);
	\end{tikzpicture}
}

%=============== MARGES ===============
\newcommand*\margins@mars{%
\FPeval\result{clip(\cv@h@mars+3)}
\newgeometry{tmargin=\result cm,bmargin=2cm,lmargin=0cm,rmargin=0cm}
}

%=============== CLEARPAGE ===============
\newcommand*\clearpage@mars{%
	\fill[left color=gray,right color=white] (2.5,0) rectangle+(-.5,-\paperheight);
	\fill[bottom color=\cmdPAS@bg@bordercolor,top color=white] (0,0) rectangle+(2,-\paperheight);
}
\newcommand*\clearmargins@mars{%
	\newgeometry{tmargin=2cm,bmargin=2cm,lmargin=0cm,rmargin=0cm}
}