% Enfin un peu d'ordre dans mes macros et pr\'eambules...
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{preambule}[12/01/20010 v2.1-f macros persos avec options]

\RequirePackage{ifthen}
\RequirePackage{ifpdf}

\RequirePackage{ifxetex}

\ifxetex
\RequirePackage{xunicode}
\fi
%% 

% pour des exos avec tikz
\newboolean{tikz}\setboolean{tikz}{false}
\DeclareOption{tikz}{\setboolean{tikz}{true}}

% pour utiliser fourier
\newboolean{fourier}\setboolean{fourier}{false}
\DeclareOption{fourier}{\setboolean{fourier}{true}}


% pour utf8 (latin 1 par d\'efaut)
\newboolean{utf8}\setboolean{utf8}{false}
\DeclareOption{utf8}{\setboolean{utf8}{true}}

% pour utiliser kpfonts
\newboolean{kpfonts}\setboolean{kpfonts}{false}
\DeclareOption{kpfonts}{\setboolean{kpfonts}{true}}

% pour utiliser kpfonts sans maths
\newboolean{nomaths}\setboolean{nomaths}{false}
\DeclareOption{nomaths}{\setboolean{nomaths}{true}}

% pour utiliser sous windows
\newboolean{win}\setboolean{win}{false}
\DeclareOption{win}{\setboolean{win}{true}}


% en cas de biblio
\newboolean{biblio}\setboolean{biblio}{false}
\DeclareOption{biblio}{\setboolean{biblio}{true}}

% en cas de beamer
\newboolean{beamer}\setboolean{beamer}{false}
\DeclareOption{beamer}{\setboolean{beamer}{true}}

\ProcessOptions\relax


\RequirePackage[frenchb]{babel}   % un package de francisation (date ...) 

%%%%%%%%%%%%%%%%%%%%%
% %%% PS Tricks % %%%
%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{pst-all,pstricks,pst-plot,pst-text,pst-tree,pstricks-add,pst-eucl}
        

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%% Biblio



\ifthenelse{\boolean{biblio}}{%
\usepackage[super,idem=strict,ibidem=name,citefull=first,authorformat={and,smallcaps}]{jurabib}
\renewcommand\biblnfont{\MakeUppercase}
\renewcommand\bibfnfont{\textsc}
\renewcommand\bibtfont{\textsf}
\renewcommand\bibapifont{\textsf}
\bibliographystyle{jurabib}
}{}






%%

%       P A C K A G E S 
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \RequirePackage{ifthen}     
% \newboolean{utf}
% \DeclareOption{utf8}{\setboolean{utf}{true}}
% \DeclareOption{latin}{\setboolean{utf}{false}}
% \ifthenelse{\boolean{utf}}{%
%         \RequirePackage{ucs}
%         \RequirePackage[utf8]{inputenc}
%         }{%
%         \RequirePackage[latin1]{inputenc}
%         }

% %\ExecuteOptions{latin}
% \ProcessOptions


\ifxetex
\else
\ifthenelse{\boolean{utf8}}{%
         \RequirePackage[utf8]{inputenc}
         }{%
        \ifthenelse{\boolean{win}}{%
         \RequirePackage[ansinew]{inputenc}
         }{%
         \RequirePackage[latin1]{inputenc}
         }
         }
\fi




%\RequirePackage[latin1]{inputenc}          % les bons codes pour les bonnes lettres

%\RequirePackage{ucs}
%\RequirePackage[utf8]{inputenc}

\ifxetex
\else
\RequirePackage[T1]{fontenc} % une police avec des caract\'ees accentu\'e 
\fi






%%%%%%%%%%%%%%%%%%%%%%%%%%
%% fourier
%%%%%%%%%%%%%%%%%%%%%%%%%

\ifthenelse{\boolean{kpfonts}}{%
         \ifthenelse{\boolean{nomaths}}{%
         \RequirePackage[fulloldstyle,light]{kpfonts}
         }
         {\RequirePackage[upright,light,partialup]{kpfonts}
         }
         }{
        \ifthenelse{\boolean{fourier}}{%
        \RequirePackage[upright]{fourier}
        \let\danger\undefined
	\DeclareMathSymbol{\mthdotlessiup}{\mathalpha}{operators}{25}%
	\DeclareMathSymbol{\mthdotlessiup}{\mathalpha}{operators}{16}%
	}{
         \ifthenelse{\boolean{beamer}}{%
        }{
\RequirePackage{lmodern}}
}
}



%\RequirePackage{framed}

\ifthenelse{\boolean{beamer}}{}
{\RequirePackage[framed]{ntheorem}}



%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Polices
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifthenelse{\boolean{kpfonts}}{%
         }{%
         \RequirePackage{amsmath,textcomp}
         }

\RequirePackage{amssymb,amsbsy,amsfonts,amstext,amscd,amsopn,amsxtra,upref}
% diverses fontes et %environnements de maths 
\RequirePackage[clock,weather,misc,alpine]{ifsym} % fontes symboles
 \let\Letter\undefined
 \let\Lightning\undefined
 \let\Sun\undefined
 \let\Cross\undefined


\RequirePackage{manfnt,marvosym,pifont,mathrsfs}    %   fontes   pour
                                % certains symboles 


\RequirePackage{url} % pour ecrire des url
%\RequirePackage{monster2e} %Pour  \'ecrire en tr\`es  gros : n'est  pas dans
                       %texlive/miktex !
%\RequirePackage[varumlaut]{yfonts} %pour le gothique

\RequirePackage{listings}% pour les listings informatiques
%\RequirePackage[baw]{ fvrb-ex} % pour  ecrire en  verbatim 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Multicolonne
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{multicol}   % Gestion des colonnes dans le texte
\setlength{\multicolsep}{3pt}   % Espace avant et apres
                                % qui 12pt par defaut

\newcommand{\MCintegre}{%                     Multicol sans espace
	\vspace{0.3\baselineskip}
	\setlength{\multicolsep}{0pt}}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  references
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\RequirePackage[french]{varioref}  %  pour faire des r\'e\'eences \'ela fran\'eise



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Inclusion de graphiques
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifthenelse{\boolean{beamer}}{%
\ifpdf
\DeclareGraphicsRule{*}{mps}{*}{}
\fi
}
{%
\ifxetex
\RequirePackage[bookmarks,colorlinks,linkcolor=blue,citecolor=red,pdfauthor={Guillaume CONNAN}]{hyperref}
\RequirePackage[xetex]{graphicx}
%\DeclareGraphicsRule{*}{mps}{*}{}
%\RequirePackage{auto-pst-pdf}
\RequirePackage[tikz]{bclogo}
\else
\ifpdf
\RequirePackage[bookmarks,colorlinks,linkcolor=blue,citecolor=red,pdfauthor={Guillaume CONNAN}]{hyperref}
\RequirePackage[pdftex]{graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
%\RequirePackage{auto-pst-pdf}
\RequirePackage[tikz]{bclogo}
\else
\RequirePackage{graphicx}
\RequirePackage[dvips,ps2pdf,bookmarks,colorlinks,linkcolor=blue,citecolor=red,pdfauthor={Guillaume
CONNAN}]{hyperref}
\RequirePackage{bclogo}
\fi
\fi
}

\ifthenelse{\boolean{utf8}}{\hypersetup{unicode=true}}{}

%\RequirePackage{picins}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%% Gestion des tableaux % %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{array}     % Nouveau package de tableau
\RequirePackage{tabularx}  % Nouveau package de tableau de
                           % fixe largeur
\RequirePackage{dcolumn}   % alignement sur la virgule
\RequirePackage{hhline}    % Nouvelle gestion des lignes 
                           % horizontales dans les tableaux
\RequirePackage{multirow}  % package permettant de d'\'erire sur plusieures
                           % lignes dans un tableau
\RequirePackage{slashbox}  % ligne diagonale dans une case

%%%%%%%%%%%%%%%%%%%%%%
% %%% Les listes % %%%
%%%%%%%%%%%%%%%%%%%%%%

% Redefinir les etiquettes des listes
\RequirePackage[flushleft,alwaysadjust]{paralist}

% D\'eini les \'eiquettes des listes par d\'eaut.
\setdefaultenum{\bf 1.}{a)}{\it i.}{}



% % red\'eini les labels d\'eum\'eation


% \renewcommand{\theenumi}{\arabic{enumi}}
%         \renewcommand{\labelenumii}{\theenumii)}
% \renewcommand{\theenumii}{\alph{enumii}}
%         \renewcommand{\labelenumiii}{\theenumiii)}
% \renewcommand{\theenumiii}{\roman{enumiii}}




% D\'eini les \'eiquettes des itemize par d\'eaut. grace a paralist
\setdefaultitem{$\triangleright$}{$\triangleright$}{$\triangleright$}{$\triangleright$}







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%% Gestion des espaces % %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{xspace}	    % Pour bien g\'eer les espaces \'ela fin de macros 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%% Gestion conditionnelle % %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\RequirePackage{calc}              % permet les calculs
%\RequirePackage{lastpage}   % utilis\'edans tounez la page et
                            % les tableaux de signes et de variations



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Entete et pied de page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{fancyhdr}%,fancybox} conflit avec fancyvrb quand on met une option \`a VerbatimOut


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% index
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{makeidx} % pour faire un index


%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  pour ecrire en utilisant des formes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{shapepar}
% pour les touches du clavier
\RequirePackage{keystroke}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pour les bidules \`a Nicolas
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Redefinir les etiquettes des listes
\RequirePackage[flushleft,alwaysadjust]{paralist}

%% xlop

% \RequirePackage{xlop}
% \makeatletter \let\@nil\undefcreboudiou \makeatother 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Divers (certains sont peut-\'ere inutiles :-)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{ float,parallel, subfigure} 
        
\RequirePackage{numprint} % pour écrire les grands nombres
%\RequirePackage{casio,ti83font} % pour  \'ecrire en casio et ti  : n'est pas
                            % dans ctan !









%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   M A C R O S                          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\thefootnote}{\textcolor{blue}{\alph{footnote}}}     %pour ne pas confondre avec les puissances... 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   MATHS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\newcommand{\deuz}{2\up{nde}}

\newcommand{\ds}{\displaystyle}  % raccourci pour avoir de grandes formules

\newcommand{\fonc}[4]{#1\colon \begin{array}{rll} #2 &\to &#3\\ x& \mapsto &#4 \end{array}} % fonction de x $
\newcommand{\Fonc}[5]{#1\colon \begin{array}{rll} #2 &\to &#3\\ #4& \mapsto &#5 \end{array}} % fonction d'une autre variable



\newcommand{\limd}[2][x]{\ds\lim_{{#1\to #2}\atop{#1>#2}} } % limite \'edroite

 \newcommand{\limg}[2][x]{\ds\lim_{{#1\to #2}\atop{#1<#2}} } %  limite \'egauche


\newcommand{\R}{\bbr}  % parce que quand on copie le texte d'un autre, y a toujours un idiot pour utiliser \R
\newcommand{\N}{\bbn}
\newcommand{\Z}{\bbz}


%  VECTEURS

%\newcommand{\ve}[1]{\overrightarrow{#1}}

\let\overrightarrow\relax
\DeclareRobustCommand{\overrightarrow}{%
   \mathpalette{\overarrow@\rightarrowfill@}}
\makeatother

\DeclareRobustCommand{\ve}[1]{%
\overrightarrow{\rule{0em}{1.2ex} #1 \rule{0.15em}{0ex}}}


%{\overrightarrow{\kern-2pt\mathstrut #1 \kern2pt}}   % vecteur

% %%% Commande pour d\'ecaler les parenth\'ees vers le bas autour
% %%% des vecteurs par exemple :
\newcommand{\DecalV}[2][2pt]{%
	\raisebox{#1}{%
		$\left(\raisebox{-#1}{\ensuremath{#2}}\right)$}}

\newcommand{\DecalNorme}[2][2pt]{%
	\raisebox{#1}{%
		$\left\|\raisebox{-#1}{\ensuremath{#2}}\right\|$}}

\newcommand{\pav}{\DecalV}

\newcommand{\psv}[3][2pt]{%
	\raisebox{#1}{%
		$\left\langle\raisebox{-#1}{\ensuremath{\ve{#2},\ve{#3}}}\right\rangle$}}


\newcommand{\abv}[2][2pt]{%
	\raisebox{#1}{%
		$\left|\raisebox{-#1}{\ensuremath{#2}}\right|$}}





%transposee


\newcommand\tr{\vphantom{}^{\rm t}}




% %%% AXES OI, OJ, OK
\newcommand{\oi}[1][O]{\DecalV[.8pt]{#1;\ve{\imath}\,}\xspace}
\newcommand{\oj}[1][O]{\DecalV[.8pt]{#1;\ve{\jmath}\,}\xspace}
\newcommand{\ok}[1][O]{\DecalV[.8pt]{#1;\ve{k}\,}\xspace}
\newcommand{\ou}[1][O]{\DecalV[.8pt]{#1;\ve{u}}\xspace}
\newcommand{\ov}[1][O]{\DecalV[.8pt]{#1;\ve{v}}\xspace}


% %%% REPERE OIJ
\newcommand{\oij}[1][O]{\DecalV[.8pt]{#1;\ve{\imath},\ve{\jmath}\,}\xspace}
\newcommand{\oijn}[2][O]{\DecalV[.8pt]{#1;\ve{\imath_{#2}},\ve{\jmath_{#2}}\,}\xspace}
\newcommand{\oik}[1][O]{\DecalV[.8pt]{#1;\ve{\imath},\ve{k}\,}\xspace}
\newcommand{\ojk}[1][O]{\DecalV[.8pt]{#1;\ve{\jmath},\ve{k}\,}\xspace}

% %%% REPERE OUV
\newcommand{\ouv}[1][O]{\DecalV[.8pt]{#1;\ve{u},\ve{v}}\xspace}

% %%% REPERE OIJK
\newcommand{\oijk}[1][O]{\DecalV[.8pt]{#1;\ve{i},\ve{j},\ve{k}\,}\xspace}



%%%%%%%%%%%%%%%%%%%%%%%%%
% limites

\newcommand{\lin}{\ds\lim_{n\to +\infty}}   % limite de suite
\newcommand{\Lim}[2][x]{\displaystyle{\lim_{#1 \to #2}}} % limite quand 1 tend vers 2 avec 1=x par d\'eaut



% %%% Fausse limite
\newcommand{\tendvers}[2][x]{\xrightarrow[#1\to#2]{}}
%{\underset{#1\xrightarrow #2}{\longrightarrow}}  %  lim avec fl\'ehe


% %%% Parties reelle et imaginaire
%\renewcommand{\Re}{\RC e}

%\renewcommand{\Im}{\IC m}



% %%% Int\'erales
\newcommand{\Int}[2]{\displaystyle{\int_{#1}^{#2}}}
\renewcommand{\d}{\medspace\text{d}}


% %%% Int\'eration par parties dans l'ordre u,v',u',v
\newcommand{\intpp}[4]{%
	$\left\{%
	\begin{matrix}
	\vtab u(x) = #1 & \vtab u'(x) = #3 \\
	\stackrel{}{ v'(x) = #2} & \stackrel{}{v(x) = #4} \\
	\end{matrix}
	\right.$}

\newcommand{\intpps}[5]{%
	$\left\{%
	\begin{matrix}
	\vtab u_{#5}(x) = #1 & \vtab u_{#5}'(x) = #3 \\
	\stackrel{}{ v_{#5}'(x) = #2} & \stackrel{}{v_{#5}(x) = #4} \\
	\end{matrix}
	\right.$}


%%%%Equivalent,DL
\newcommand{\ege}[1]{\underset{#1}{=}} %egal en
\newcommand{\eqe}[1]{\underset{#1}{\sim}}    % equiv en
\newcommand{\ese}[1]{\underset{#1}{\simeq}}  %sensiblement \'eal en


% %%% Congruence
\newcommand{\congru}[3]{#1\equiv #2\thickspace [#3]}


%%%%angle de vecteur avec chapeau
\newcommand{\anglevec}[2]{%
	\DecalV{%
	\widehat{%
	\ve{#1};\ve{#2}
	}}}

\newcommand{\ao}[2]{\DecalV{\ve{#1},\ve{#2}}}   % angle de vect sans chapeau
\newcommand{\ps}[2]{\ve{#1}\cdot\ve{#2}}    %  produit scalaire lyc\'e avec point


%%% fraction hors texte
\newcommand{\fr}{\ds\frac}


%%%%%Derive partielle
\newcommand{\dr}[2]{\fr{\partial #1}{\partial #2}}
\newcommand{\ddr}[2]{\fr{\partial^2 #1}{\partial#2 ^2}}
\newcommand{\dddr}[3]{\fr{\partial^2 #1}{\partial#2 \partial #3}}

% %%% Fraction en exposant
\newcommand{\efr}[2]{%
	\raisebox{.3ex}{\scriptsize{$#1$}}\negmedspace\slash
	\negthinspace\raisebox{-.2ex}{\scriptsize{$#2$}}}
	
% %%% Fraction en oblique
\newcommand{\ofr}[2]{%
	\raisebox{0ex}{$#1$}\negthinspace\slash
	\raisebox{-.5ex}{$#2$}}





% %%% Parallelisme
\renewcommand{\parallel}{\mbox{\slash\negthickspace\slash}}

% %%% un ; avec un peu d'espace autour pour les intervalles
\newcommand{\pv}{\ensuremath{\: ; \,}}

% Un vrai virgule pour les d\'eimaux
%  \catcode\active
%  \def{{,}} 

%\DeclareMathSymbol{@}{\mathord}{letters}{"3B}

% %%% Somme majuscule
\newcommand{\Sum}{\displaystyle\sum}


%%%% Macro qui permet de d'avoir de colonnes centr\'es de dimension fixe. pour les tableaux
\newcommand{\Coltitre}[2]{\makebox[#1][c]{\vtab\textbf{#2}}}



\newcommand{\im}{{\rm Im}\,} % image
\newcommand{\ke}{{\rm Ker}\,}  %  noyau




\newcommand{\ens}[2]{\left\{\left.{#1}\,\right\vert\, {#2}\right\}}  %ensemble en extension avec barre
\newcommand{\ensbis}[2]{\left\{\left.{#1}\,\right\mid\, {#2}\right\}}  % ensemble avec virgule


% Majuscules de mathcal 

\newcommand{\AR}{\mathcal{A}}
\newcommand{\BR}{\mathcal{B}}
\newcommand{\CR}{\mathcal{C}}
\newcommand{\DR}{\mathcal{D}}
\newcommand{\ER}{\mathcal{E}}
\newcommand{\FR}{\mathcal{F}}
\newcommand{\GR}{\mathcal{G}}
\newcommand{\HR}{\mathcal{H}}
\newcommand{\IR}{\mathcal{I}}
\newcommand{\JR}{\mathcal{J}}
\newcommand{\KR}{\mathcal{K}}
\newcommand{\LR}{\mathcal{L}}
\newcommand{\MR}{\mathcal{M}}
\newcommand{\NR}{\mathcal{N}}
\newcommand{\OR}{\mathcal{O}}
\newcommand{\PR}{\mathcal{P}}
\newcommand{\QR}{\mathcal{Q}}
\newcommand{\RR}{\mathcal{R}}
\newcommand{\SR}{\mathcal{S}}
%\renewcommand{\TR}{\mathcal{T}}
\newcommand{\UR}{\mathcal{U}}
\newcommand{\VR}{\mathcal{V}}
\newcommand{\WR}{\mathcal{W}}
\newcommand{\XR}{\mathcal{X}}
\newcommand{\YR}{\mathcal{Y}}
\newcommand{\ZR}{\mathcal{Z}}

% majuscules encore plus curvilignes, comme \'el'\'eole

\newcommand{\AC}{\mathscr{A}}
\newcommand{\BC}{\mathscr{B}}
\newcommand{\CC}{\mathscr{C}}
\newcommand{\DC}{\mathscr{D}}
\newcommand{\EC}{\mathscr{E}}
\newcommand{\FC}{\mathscr{F}}
\newcommand{\GC}{\mathscr{G}}
\newcommand{\HC}{\mathscr{H}}
\newcommand{\IC}{\mathscr{I}}
\newcommand{\JC}{\mathscr{J}}
\newcommand{\KC}{\mathscr{K}}
\newcommand{\LC}{\mathscr{L}}
\newcommand{\MC}{\mathscr{M}}
\newcommand{\NC}{\mathscr{N}}
\newcommand{\OC}{\mathscr{O}}
\newcommand{\PC}{\mathscr{P}}
\newcommand{\QC}{\mathscr{Q}}
\newcommand{\RC}{\mathscr{R}}
\newcommand{\SC}{\mathscr{S}}
\renewcommand{\TC}{\mathscr{T}}
\newcommand{\UC}{\mathscr{U}}
\newcommand{\VC}{\mathscr{V}}
\newcommand{\WC}{\mathscr{W}}
\newcommand{\XC}{\mathscr{X}}
\newcommand{\YC}{\mathscr{Y}}
\newcommand{\ZC}{\mathscr{Z}}




%%%%%%%%%%%%%%%%%%%%%%%%%%
%  ensembles de nombres 

\newdimen\AAdi%
\newbox\AAbo%
\font\AAFf=cmex10%   %ou cmex10
\def\AArm{\fam0 \rm}%
\def\AAk#1#2{\setbox\AAbo=\hbox{#2}\AAdi=\wd\AAbo\kern#1\AAdi{}}%
\def\AAr#1#2#3{\setbox\AAbo=\hbox{#2}\AAdi=\ht\AAbo\raise#1\AAdi\hbox{#3}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% alphabet blackboard
\def\bba{{\AArm A}}%
\def\bbb{\mathbb{B}}%
\def\bbc{\mathbb{C}}%
\def\bbd{\mathbb{D}}%
\def\bbe{\mathbb{E}}%
\def\bbf{\mathbb{F}}%
\def\bbg{{\AArm G\AAk{-1.02}{G}\AAr{.9}{I}{\AAFf\char"3F}}}%
\def\bbh{\mathbb{H}}%
\def\bbi{\mathbb{I}}%
\def\bbj{{\AArm J}}%
\def\bbk{\mathbb{K}}%
\def\bbl{\mathbb{L}}%
\def\bbm{\mathbb{M}}%
\def\bbn{\mathbb{N}}%
\def\bbo{{\AArm O\AAk{-1.02}{O}\AAr{.9}{I}{\AAFf\char"3F}}}%
\def\bbp{\mathbb{P}}%
\def\bbq{\mathbb{Q}}%
\def\bbr{\mathbb{R}}%
\def\bbs{{\AArm S}}%
\def\bbt{{\AArm T\AAk{-.62}{T}T}}%
\def\bbu{{\AArm U\AAk{-1}{U}\AAr{.95}{I}{\AAFf\char"3F}}}%
\def\bbv{\mathbb{V}}%
\def\bbw{{\AArm W}}%
\def\bbx{{\AArm X}}%
\def\bby{{\AArm Y}}%
\def\bbz{\mathbb{Z}}%
%% 1 blackboard
\def\BBone{{\AArm 1\AAk{-.8}{I}I}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





%%% raccourci matrice, mais ya assistant texmaker 
\newcommand{\bmat}{\begin{pmatrix}}
\newcommand{\emat}{\end{pmatrix}}


\newcommand{\ud}{\fr{1}{2}}  % pour faire un demi !


%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  syst\'ees

\newcommand{\bsys}{\begin{cases}}% syst\'ee sans alignement 
\newcommand{\esys}{\end{cases}}


\newcommand{\bsyf}{\left\{\begin{array}{lcl}}  % syst\'ee align\'e\'egauche
\newcommand{\esyf}{\end{array}\right.}

\newcommand{\bsyc}{\left\{\begin{array}{rcl}} % syst\'ee serr\'esur le \'eal
\newcommand{\esyc}{\end{array}\right.}


%%%% Pour faire des systemes
\newenvironment{systeme}[1][5]{ % encore plus joli mais complique: rentre le nombre de colonnes 5 par defaut
	\setlength{\arraycolsep}{1pt}     % c'est un environnement !! 
	$\left\{\begin{array}{*{#1}{r}}}    
	{\end{array}\right.$}


%%% comparaison


\newcommand{\ie}{\leqslant}  % inf\'eieur ou \'eal
\newcommand{\se}{\geqslant}  % sup\'eieur ou \'eal


%%% grec

\newcommand{\e}{\varepsilon} % epsilonn
\newcommand{\f}{\othervarphi} % fonction phi
\newcommand{\g}{\gamma}  
\newcommand{\al}{\alpha}
\newcommand{\de}{\delta}
\newcommand{\De}{\Delta}
\newcommand{\Ga}{\Gamma}
\newcommand{\La}{\Lambda}
\newcommand{\la}{\lambda}
\renewcommand{\o}{\otheromega}
\newcommand{\si}{\sigma}
\newcommand{\Ta}{\Theta}
\newcommand{\ta}{\othertheta}
\renewcommand{\O}{\Omega}




%% implique, equivalent

\newcommand{\SSi}{\quad\text{si et seulement si}\quad} 
\newcommand{\ssi}{\Longleftrightarrow}
\newcommand{\imp}{\Longrightarrow}
\newcommand{\suf}{\Longleftarrow}


%% fonctions math affichees en romain

\newcommand{\Loc}{\operatorname{Loc}}
\newcommand{\Arg}{\operatorname{Arg}}
\newcommand{\ch}{\operatorname{ch}}
\newcommand{\sh}{\operatorname{sh}}
\newcommand{\cotan}{\operatorname{cotan}}
\renewcommand{\tanh}{\operatorname{th}}
\newcommand{\Arccos}{\operatorname{Arccos}}
\newcommand{\Arcsin}{\operatorname{Arcsin}}
\newcommand{\Arctan}{\operatorname{Arctan}}
\newcommand{\Argch}{\operatorname{Argch}}
\newcommand{\Argsh}{\operatorname{Argsh}}
\newcommand{\Argth}{\operatorname{Argth}}
\newcommand{\val}{\operatorname{val}}
\renewcommand{\sec}{\operatorname{sec}}
\newcommand{\cosec}{\operatorname{cosec}}
\renewcommand{\cotan}{\operatorname{cotan}}
%% Parentheses crochets, etc

\newcommand{\pa}[1]{\left({#1}\right)}
\newcommand{\cro}[1]{\left[{#1}\right]}
\newcommand{\ab}[1]{\left|{#1}\right|}
\newcommand{\ac}[1]{\left\{{#1}\right\}}
\renewcommand{\no}{\DecalNorme}
\newcommand{\nov}[1]{\no{\ve{#1}}}
%[1]{\left\|{#1}\right\|}

%%% 1er 2eme

\newcommand{\er}{\up{er}\ }
\newcommand{\eme}{\up{e}\ }
\newcommand{\ere}{\up{\`ere}\ }

%% Divers

\newcommand{\epi}[2]{\E^{\,\efr{#1\I\pi}{#2}}} % e machin i pi sur truc
\newcommand{\intt}{\ds\int\!\!\!\int}  % double int\'erale
\newcommand{\inttt}{\ds\int\!\!\!\int\!\!\!\int} 
\newcommand{\eq}{\mathrel{\sim}}
\newcommand{\widefrown}{\resizebox{0.6cm}{0.13cm}{$\frown$}}
\newcommand{\rg}{{\rm rg}\,}
\newcommand{\vect}[1]{{\rm Vect}\{#1\}}
\renewcommand{\dim}{\dim\,}
\newcommand{\un}{(u_n)_{n\in\bbn}\ }  % suite un
\newcommand{\vn}{(v_n)_{n\in\bbn}\ }  %suite vn
\newcommand{\co}{\choose}   % p parmi n
\newcommand{\Co}[2]{\coordp{#2}{#1}} 


\newcommand{\jok}[1]{\begin{flushright}\rotatebox{180}{\textit{#1}}\end{flushright}}  % joker \'erit \'el'envers en italique

\newcommand{\ut}{\fr{1}{3}}  % un tiers
\newcommand{\dt}{\fr{2}{3}}  % 2 tiers



\newcommand{\E}{{\rm e}}
\newcommand{\I}{{\rm i}}

%\newcommand{\C}{\bbc}
%\renewcommand{\bar}{\overline}  % barrre pour les conjugu\'e

\newcommand{\qcmr}{\bigcirc\  }

\newcommand{\maj}{\mathscr}

\newcommand\vi{\ve \imath}
\newcommand\vj{\ve \jmath}


\newcommand{\env}[1]{\begin{flushright}\rotatebox{180}{\textit{#1}}\end{flushright}} % comme jok



% %%% Notation scientifique.
\newcommand{\Sc}[2]{%
	\ensuremath{%
	#1\cdot 10^{#2}}}


% %%% Mes d'un angle
\newcommand{\Mes}[1]{%
	\ensuremath{%
	\mathrm{mes}
	\DecalV{\widehat{#1}}
	}}




% Du gras en mode maths mais en italique contrairement \'e\mathbf
% juste pour un petit bout, sinon utiliser \boldmath et \unboldmath
% \'el'ext\'eieur des $$
\newcommand{\Mathbold}[1]{\mbox{\boldmath$#1$\unboldmath}}






%%%% Macros pour un Vrai-Faux

\newcommand{\Q}{\mbox{\ding{114}\hspace{-.7em}\raisebox{.2ex}[1ex]{\ding{51}}}}

\newcommand{\VF}{%
	\hfill\makebox[1cm][s]{\bf V\hfill F}
	}
	
\newcommand{\Rep}[1][]{%
	\ifthenelse{\equal{#1}{v}}{%
		\hfill\makebox[1cm][s]{\Q\hfill \ding{114}}}{%
		\ifthenelse{\equal{#1}{f}}{%
			\hfill\makebox[1cm][s]{\ding{114} \hfill\Q}}{%
			\hfill\makebox[1cm][s]{\ding{114} \hfill\ding{114}}}}}


%%%% Qcm
\newcounter{num}
\newcounter{qcm}[num]
\newcommand{\Nqcm}{\stepcounter{qcm}\theqcm) }

\newenvironment{Question}[2][5.43cm]
	{\begin{minipage}{#1}%
	\Nqcm #2%
	\begin{Pilist}{pzd}{114}}%
	{\end{Pilist}%
	\end{minipage}%
	
	\vspace{0.2cm}
	}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% T A B L E A U X 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%







% Permet de centrer qqchose dans une case de tableau qui n'est pas
% definie comme cent\'e.
\newcommand{\Centre}[1]{\hfill#1\hfill\strut\ignorespaces}

% Ou de fa\c con plus professionnelle
\newcolumntype{C}[3]{>{\hfill#2}#1<{#3\hfill\strut\ignorespaces}}


% %%% Place verticale dans un tableau
\newcommand{\vtab}[1][1]{\rule[-0.9em*\real{#1}]{0pt}{2.2em*\real{#1}}}

%%%%%%% Colonne \'eaisse
\newcolumntype{I}{!{\vrule width 2pt}}

%%%%%%%%%%%%%%% ligne \'eaisse
\newlength\savedwidth
\newcommand\whline{\noalign{\global\savedwidth\arrayrulewidth
                                             \global\arrayrulewidth 2pt}%
                                 \hline
                                 \noalign{\global\arrayrulewidth\savedwidth}}





%%%%%%%%%%%%% entete tableau normal
\newcolumntype{N}[1]{  I@{\vrule height.5cm width0pt depth.2cm\hspace{.5cm}}c@{\hspace{.5cm}}I@{\vrule height.5cm width0pt depth.2cm\hspace{.5cm}}c@{\hspace{.5cm}}*#1{|@{\vrule height.5cm width0pt depth.2cm\hspace{.5cm}}c@{\hspace{.5cm}}}I  }

\setlength\extrarowheight{4pt}

\renewcommand\tabularxcolumn[1]{m{#1}}  % pour centrer verticalement
\newcolumntype{Z}{>{\centering\arraybackslash}X} % pour centrer horizontalement
\newcolumntype{Y}[1]{IcIZ*{#1}{|Z} I}
%\newcommand{\Coltitre}[2]{\makebox[#1][c]{\vtab\textbf{#2}}}
% %%% Place verticale dans un tableau
\newcommand{\vtabplus}{\rule[-1.2em]{0pt}{3em}}

% %%% Double Place verticale dans un tableau
\newcommand{\vtabb}{\rule[-1.6em]{0pt}{4em}}



% %%% Place verticale dans un systeme
\newcommand{\systab}{\rule[-1.05em]{0pt}{1.05em}}

% %%% Coordonn\'es verticales dans le plan
\newcommand{\coordp}[2]{%
	\begin{pmatrix}
	#1 \\ #2
	\end{pmatrix}}

% %%% Coordonn\'es verticales dans l'espace
\newcommand{\coordpp}[3]{%
	\scalebox{.7}{%
	\ensuremath{	\begin{pmatrix}
		#1 \\ #2 \\ #3
		\end{pmatrix}}}}





\newlength{\Hauteur}
\newcommand{\Hautf}[1]{%
	\setlength{\Hauteur}{#1\baselineskip}
	\setlength{\Hauteur}{.5\Hauteur}
	\rule{0pt}{\Hauteur}}










%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%    DESSIN
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% adapte a mon ordi : \'echanger
\renewcommand{\figurename}{Figure}
\newcommand{\captionlabeldelim}{\ }

% \newcommand{\des}[2]{
% \begin{center}
% \includegraphics[height=#2cm]{/home/moi/Lycee/TS/figures/#1}\caption{}
% \end{center}}



% %% Inclusion d'un dessin \'epartir d'un fichier eps externe
% \newcommand{\dessin}[4][Exercice \theex]%
% {\centering %\begin{center}
% %\graphicspath{{#2}}
% \includegraphics{#2#3}
% \figtitre[#1]{#4}
% %\end{center}
% }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Couleurs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{orange}{rgb}{0.589999,0.269997,0.080004}
\definecolor{or}{rgb}{1,0.843104,0}
\definecolor{orc}{rgb}{1,0.943104,0}
\definecolor{0.8white}{rgb}{0.8,0.8,0.8}
\definecolor{bleu_ciel}{rgb}{0.635286,0.9693528,1}
\definecolor{bleu_m}{rgb}{0.423524,0.6462352,0.7372784}
\definecolor{bleu_f}{rgb}{0.211762,0.3231176,0.3686392}
\definecolor{0.6white}{rgb}{0.6,0.6,0.6}
\definecolor{0.4white}{rgb}{0.4,0.4,0.4}
\definecolor{0.8white}{rgb}{0.8,0.8,0.8}
\definecolor{0.2white}{rgb}{0.2,0.2,0.2}
\definecolor{0.1white}{rgb}{0.1,0.1,0.1}
\definecolor{0.3white}{rgb}{0.3,0.3,0.3}
\definecolor{0.9white}{rgb}{0.9,0.9,0.9}
\definecolor{bleur}{rgb}{0.529405,0.807794,1}
\definecolor{rose}{rgb}{1.0, 0.752907, 0.796106}
\definecolor{0.9white}{rgb}{0.9,0.9,0.9}
\definecolor{vert_e}{rgb}{0,0.790002,0.340007}
\definecolor{vert_fonce}{rgb}{0,0.392193,0}
%\definecolor{white}{rgb}{1,1,1}
%\definecolor{blanc}{rgb}{1,1,1}
\definecolor{chamois}{rgb}{0.255,0.230,0.179}
\definecolor{brun}{rgb}{0.222,0.184,0.135}

\definecolor{creme}{rgb}{0.448,0.999,0.594}
\definecolor{ciel}{rgb}{0.220,0.890,0.999}
\definecolor{cielg}{rgb}{.9,0.9,0.9}

\definecolor{bleu}{rgb}{0.4,0.2,1} \newrgbcolor{bleu}{0.4 0.2 1}
\definecolor{rouge}{rgb}{1,0,0} \newrgbcolor{rouge}{1 0 0}
\definecolor{vert}{rgb}{0.1,0.6,0} \newrgbcolor{vert}{0.1 0.6 0}
\definecolor{blanc}{rgb}{1,1,1} \newrgbcolor{blanc}{1 1 1}
\definecolor{noir}{rgb}{0,0,0} \newrgbcolor{noir}{0 0 0}
\definecolor{gris}{rgb}{0.5,0.5,0.5} \newrgbcolor{gris}{0.5 0.5 0.5}
\definecolor{grisclair}{rgb}{0.9,0.9,0.9} \newrgbcolor{grisclair}{0.9 0.9 0.9}
\definecolor{jorange}{rgb}{0.9,0.9,0} \newrgbcolor{jorange}{0.9 0.9 0}







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TITRES et vieux trucs obsoletes Sections, sous-sections, etc
%
%%%%%%%%%%% LES MACROS DU BOUQUIN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\NoLecon}{}
\newcommand{\NomSection}{}
\newcommand{\NomChap}{}
\newcommand{\NomLecon}{}
\newcommand{\NumLecon}{}


%%%%%%%%%%%%%%%%%NUL
%%%   LECOND{numero}{ecrire  trucieme}{titre}{suite   du  titre   en  dessous}{titre   en   un  seul
%%% morceau}{image sur le côt\'e}
\IfFileExists{monster2e.sty}{\RequirePackage{monster2e}}{}


\newcommand{\LECOND}[6]{
%\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
%\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}
\renewcommand{\NomLecon}{#5}
\renewcommand{\NumLecon}{#1 - }\renewcommand{\NoLecon}{#2}
%\thispagestyle{empty}
\begin{minipage}[t]{0.75\textwidth}\vspace{0cm}
\begin{center}
%\pscharpath[linestyle=none,fillstyle=gradient,gradbegin=black,gradend=bleu,gradmidpoint=0.5]
\textcolor{bleu_f}{\huge\fontfamily{ugq}\selectfont #2 Le\c con}\\
\bigskip\bigskip\bigskip
\textcolor{bleu_f}{\bfseries\fontfamily{ugq}\selectfont
  \IfFileExists{monster2e.sty}{{\monster #3}}{{\Huge #3}}
} \\ 
\textcolor{bleu_f}{\bfseries\fontfamily{ugq}\selectfont\IfFileExists{monster2e.sty}{{\monster #4}}{{\Huge #4}}}   
%\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{bleu}{\textsc{#2\ \ Le\c con} : \ #5}} \ \sm}
\end{center}
\end{minipage}
\begin{minipage}[t]{0.3\textwidth}\vspace{0cm}      % \'erajouter si on veut une illustration
\hspace{-1.5cm}
\includegraphics[width=\textwidth]{#6}
\end{minipage}
}


%%%%%%%%%%%%%% NUL :
%%%   LECON{numero}{ecrire  trucieme}{titre}{suite   du  titre   en  dessous}{titre   en   un  seul
%%% morceau}{laisser vide}







\newcommand{\LECON}[6]{
\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}\renewcommand{\NomLecon}{#5}
\renewcommand{\NumLecon}{#1}\renewcommand{\NoLecon}{#2}\setcounter{rem}{0}\setcounter{exemp}{0}
\thispagestyle{empty}

\begin{center}

{\Huge\textsc{Chapitre #1 }}\\
\bigskip\bigskip\bigskip
\pscharpath[linestyle=none,fillstyle=gradient,gradbegin=black,gradend=bleu,gradmidpoint=0.5]
{ \Huge{ #3}} \\ 
\pscharpath[linestyle=none,fillstyle=gradient,gradbegin=black,gradend=bleu,gradmidpoint=0.5]
{\Huge{ #4}}   
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{bleu}{\large\textsc{Chapitre \ \ #1} : \ #5}} \ \sm}
\end{center}
}




%%%%%% TITRE{vide}{intitule chapitre : lecon, chapitre ...}{debut titre}{fin titre}{titre toc}{dessin}
%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\newcounter{NumLecon}
\newcommand{\TITRE}[6]{%
\thispagestyle{empty}
\stepcounter{NumLecon}\setcounter{numEXO}{0}
\setcounter{pbm}{0}\setcounter{section}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{definit}{0}\setcounter{propri}{0}\setcounter{theor}{0}\setcounter{retenir}{0}\setcounter{exem}{0}
\renewcommand{\NomLecon}{#5}

\begin{minipage}[t]{0.75\textwidth}\vspace{0cm}
\begin{center}
\fontfamily{ugq}\selectfont\textcolor{0.2white}{\huge #2 \ \theNumLecon}\\
\bigskip\bigskip\bigskip
\textcolor{0.2white}{\bfseries{ \huge{ #3}}} \\
\vspace{.8cm} 
\textcolor{0.2white}{\bfseries{\huge{ #4}}   }
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{0.2white}{\large \textsc{ Le\c con\ \theNumLecon} : \ \textsc{#5}}} \ \sm}
\end{center}
\end{minipage}
\begin{minipage}[t]{0.3\textwidth}\vspace{0cm}      % \'erajouter si on veut une illustration
\hspace{-1.5cm}
%\includegraphics[width=\textwidth]{#6}
\includegraphics[height=5cm]{#6}
\end{minipage}
}






%%%%%%%
%%% TITRE de Calcul en liberte 
%%%%%
%%%%%% TITREd{vide}{intitule :chapitre, lecon, }{titre}{suite titre}{titre toc}
%%%%%%%%%



\newcommand{\TITREd}[5]{
\thispagestyle{empty}
\stepcounter{NumLecon}
\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}\setcounter{rem}{0}\setcounter{exemp}{0}
\renewcommand{\NomLecon}{#5}
\begin{center}
\psshadowbox*[fillcolor=0.9white,framearc=.25]{\begin{minipage}{\textwidth}
\sffamily\textcolor{0.4white}{\bfseries\Huge\textsc{#2}\ \scalebox{3}[2]{\theNumLecon}}

\vspace{-.8cm} 

\DeclareFixedFont{\bigsfd}{T1}{phv}{b}{n}{1.2cm}
\psboxfill{\scriptsize \textsf{\bfseries cn:=fourier\_cn(x\^2,x,2*Pi,n,-Pi);limit(abs(cn),n=infinity)}}
\begin{pspicture*}(8,4)
\centerline{
\pscharpath[fillstyle=gradient,gradangle=-85,gradmidpoint=0.5,addfillstyle=boxfill,gradend=0.6white,gradbegin=white,fillcolor=0.8white,fillangle=45,fillsep=0.7mm]
{\rput[b](0,0.1){ \scalebox{1}[1.5]{\bigsfd #3}}}
}
\end{pspicture*}

\vspace{-1.5cm} 

\DeclareFixedFont{\bigsfd}{T1}{phv}{b}{n}{1.2cm}
\psboxfill{\scriptsize \textsf{\bfseries cn:=fourier\_cn(x\^2,x,2*Pi,n,-Pi);limit(abs(cn),n=infinity)}}
\begin{pspicture*}(8,4)
\centerline{
\pscharpath[fillstyle=gradient,gradangle=-85,gradmidpoint=0.5,addfillstyle=boxfill,gradend=0.6white,gradbegin=white,fillcolor=0.8white,fillangle=45,fillsep=0.7mm]
{\rput[b](0,0.1){ \scalebox{1}[1.5]{\bigsfd #4}}}
}
\end{pspicture*}

 \end{minipage} }
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{0.2white}{\large \textsc{ Chapitre\ \theNumLecon} : \ \textsc{#5}}} \ \sm}
\end{center}
}
















%%%%%%%
%%% TITRE COURT de Calcul en liberte 
%%%%%
%%%%%% TITRED{laisser vide}{intitule :chapitre, lecon, }{titre}{laisser vide}{titre toc}
%%%%%%%%%






\newcommand{\TITRED}[5]{
\thispagestyle{empty}
\stepcounter{NumLecon}\setcounter{rem}{0}
\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}\setcounter{exemp}{0}
\renewcommand{\NomLecon}{#5}
\begin{center}
\psshadowbox*[fillcolor=0.9white,framearc=.25]{\begin{minipage}{\textwidth}
\sffamily\textcolor{0.4white}{\bfseries\Huge\textsc{#2}\ \scalebox{3.5}[2]{\theNumLecon}}

\vspace{-.5cm} 



\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1.5cm}
\psboxfill{\scriptsize \textsf{\bfseries cn:=fourier\_cn(x\^2,x,2*Pi,n,-Pi);limit(abs(cn),n=infinity)}}
\begin{pspicture*}(8,4)
\centerline{
\pscharpath[fillstyle=gradient,gradangle=-85,gradmidpoint=0.5,addfillstyle=boxfill,gradend=0.6white,gradbegin=white,fillcolor=0.8white,fillangle=45,fillsep=0.7mm]
{\rput[b](0,0.1){ \scalebox{1}[2]{\bigsf #3}}}
}
\end{pspicture*}


 \end{minipage} }
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{0.2white}{\large \textsc{ Chapitre\ \theNumLecon} : \ \textsc{#5}}} \ \sm}
\end{center}
}








%
%
% TITRE des CHAPITRES (NOUVEAU) {Intitul\'e : chapitre, le\c con, etc.}{Nom du chapitre}{couleur de
% fond}
%
%



\newcommand{\TITREC}[3]{
\thispagestyle{empty}
\stepcounter{NumLecon}\setcounter{rem}{0}
\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}\setcounter{exemp}{0}
\renewcommand{\NomLecon}{#2}
\begin{center}
\psshadowbox*[fillcolor=#3,framearc=.25]{\begin{minipage}{\textwidth}
\sffamily\textcolor{0.4white}{\bfseries\Huge\textsc{#1}\ \scalebox{3.5}[2]{\theNumLecon}}

\vspace{-.5cm} 



\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1.5cm}
\psboxfill{ $\Mathbold{\ds\sum_{k=1}^{n}\int_0^{\pi}\E^{\i k\theta_k}\lambda_k\cos(k\theta_k)\intt\limd[t]{0}g(t)g(x)\tendvers{+\infty}+\infty}$}
\begin{pspicture*}(8,4)
\centerline{
\pscharpath[fillstyle=gradient,gradangle=-85,gradmidpoint=0.5,addfillstyle=boxfill,gradend=0.6white,gradbegin=white,fillcolor=0.8white,fillangle=45,fillsep=0.2mm]
{\rput[b](0,0.1){ \scalebox{1}[2]{\bigsf #2}}}
}
\end{pspicture*}


 \end{minipage} }
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{0.2white}{\large \textsc{ Chapitre\ \theNumLecon} : \ \textsc{#2}}} \ \sm}
\end{center}
}





%
%
% TITRE des CHAPITRES LONGS (NOUVEAU) {Intitul\'e : chapitre, le\c con, etc.}{Nom du chapitre}{couleur de
% fond}{Taille h}{taille v}
%
%




\newcommand{\TITREL}[5]{
\stepcounter{NumLecon}\setcounter{rem}{0}
\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}\setcounter{exemp}{0}
\renewcommand{\NomLecon}{#2}
\begin{center}
\psshadowbox*[fillcolor=#3,framearc=.25]{\begin{minipage}{\textwidth}
\sffamily\textcolor{0.4white}{\bfseries\Huge \textsc{#1}\ \scalebox{3.5}[2]{\theNumLecon}}

\vspace{-.5cm} 

\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1.5cm}
\psboxfill{ $\Mathbold{\ds\sum_{k=1}^{n}\int_0^{\pi}\E^{\i k\theta_k}\lambda_k\cos(k\theta_k)\intt\limd[t]{0}g(t)g(x)\tendvers{+\infty}+\infty}$}
\begin{pspicture*}(8,4)
\centerline{
\pscharpath[fillstyle=gradient,gradangle=-85,gradmidpoint=0.5,addfillstyle=boxfill,gradend=0.6white,gradbegin=white,fillcolor=0.8white,fillangle=45,fillsep=0.2mm]
{\rput[b](0,0.1){ \scalebox{#4}[#5]{\bigsf #2}}}
}
\end{pspicture*}


 \end{minipage} }
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{0.2white}{\large \textsc{ Chapitre\ \theNumLecon} : \ \textsc{#2}}} \ \sm}
\end{center}
}



%
%
% ENCADRE (NOUVEAU) {Titre}{couleur de
% fond}{taille h}
%
%



\newcommand{\Enc}[3]{
\thispagestyle{empty}
\stepcounter{NumLecon}\setcounter{rem}{0}
\setcounter{pb}{0}\setcounter{sec}{0}\setcounter{num}{0}\setcounter{solnum}{0}
\setcounter{Def}{0}\setcounter{Prop}{0}\setcounter{Th}{0}\setcounter{exemp}{0}
\renewcommand{\NomLecon}{#2}
\begin{center}
\psshadowbox*[fillcolor=#2,framearc=.25]{\begin{minipage}{\textwidth}
\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1.5cm}
\psboxfill{ $\Mathbold{\ds\sum_{k=1}^{n}\int_0^{\pi}\E^{\i k\theta_k}\lambda_k\cos(k\theta_k)\intt\limd[t]{0}g(t)g(x)\tendvers{+\infty}+\infty}$}
\begin{pspicture*}(8,3)
\centerline{
\pscharpath[fillstyle=gradient,gradangle=-85,gradmidpoint=0.5,addfillstyle=boxfill,gradend=0.6white,gradbegin=white,fillcolor=0.8white,fillangle=45,fillsep=0.2mm]
{\rput[b](0,0.1){ \scalebox{#3}[1.5]{\bigsf #1}}}
}
\end{pspicture*}

 \end{minipage} }
\addcontentsline{toc}{chapter}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \textcolor{0.2white}{\large \textsc{#1}}} \ \sm}
\end{center}
}

% definition de couleurs

% mise en valeur forte
\newcommand*{\strong}[1]{{\color{rouge}\bfseries#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% S E C T I ON S




% \definecolor{vert_e}{rgb}{0,0.790002,0.340007}
% \definecolor{vert_fonce}{rgb}{0,0.392193,0}
% %\definecolor{white}{rgb}{1,1,1}
% %\definecolor{blanc}{rgb}{1,1,1}
% \definecolor{chamois}{rgb}{0.255,0.230,0.179}
% \definecolor{brun}{rgb}{0.222,0.184,0.135}

% \definecolor{creme}{rgb}{0.448,0.999,0.594}
% \definecolor{ciel}{rgb}{0.220,0.890,0.999}


% \definecolor{bleu}{rgb}{0.4,0.2,1} \newrgbcolor{bleu}{0.4 0.2 1}
% \definecolor{rouge}{rgb}{1,0,0} \newrgbcolor{rouge}{1 0 0}
% \definecolor{vert}{rgb}{0.1,0.6,0} \newrgbcolor{vert}{0.1 0.6 0}
% \definecolor{blanc}{rgb}{1,1,1} \newrgbcolor{blanc}{1 1 1}
% \definecolor{noir}{rgb}{0,0,0} \newrgbcolor{noir}{0 0 0}
% \definecolor{gris}{rgb}{0.5,0.5,0.5} \newrgbcolor{gris}{0.5 0.5 0.5}
% \definecolor{grisclair}{rgb}{0.9,0.9,0.9} \newrgbcolor{grisclair}{0.9 0.9 0.9}
% \definecolor{jorange}{rgb}{0.9,0.9,0} \newrgbcolor{jorange}{0.9 0.9 0}

\definecolor{corange}{rgb}{0.8,0.9,0} \newrgbcolor{corange}{0.8 0.9 0}

\definecolor{vert_b}{rgb}{0.2,0.790002,0.590007}


\definecolor{vert_c}{rgb}{0,0.9,0.240007}

\definecolor{vert_o}{rgb}{0.2,0.790002,0.340007}

%% On red\'efinit l'allure des sections en gardant \section, etc.
\ifthenelse{\boolean{beamer}}{}
{%
 \RequirePackage{sectsty}
 % \sectionfont{\LARGE \sffamily\color{0.2white}}
 % \subsectionfont{\sffamily\color{0.4white}}
 % \renewcommand\thesection{\Roman{section} -}
 % \renewcommand\thesubsection{\alph{subsection}. }
 % \subsubsectionfont{\sffamily\color{0.6white}}
 % \renewcommand\thesubsubsection{\roman{subsubsection}. }







\newlength{\largsec}
 \sectionfont{\def\currentsectioncolor{MidnightBlue}\setlength{\largsec}{1em}\LARGE
   \bfseries\fontfamily{ugq}\selectfont\color{\currentsectioncolor}}
 \subsectionfont{\def\currentsectioncolor{bleu_f}\setlength{\largsec}{1.9em}\Large\bfseries\fontfamily{ugq}\selectfont\color{\currentsectioncolor}}
\subsubsectionfont{\def\currentsectioncolor{bleu}\setlength{\largsec}{2.7em}\large\bfseries\fontfamily{ugq}\selectfont\color{\currentsectioncolor}}
 \renewcommand\thesection{\Alph{section}}
 \renewcommand\thesubsection{\thesection\,\arabic{subsection}}
 \renewcommand\thesubsubsection{\thesubsection\,\alph{subsubsection} }
\setcounter{secnumdepth}{3}






\RequirePackage[explicit]{titlesec}
\newcommand*\chapterlabel{}
\titleformat{\chapter}
  {\gdef\chapterlabel{}
   \normalfont\sffamily\huge\bfseries}
  {\gdef\chapterlabel{\fontfamily{ugq}\selectfont {\IfFileExists{monster2e.sty}{\monster}{\Huge} \thechapter}\ -\ }}{0pt}
  {\begin{tikzpicture}[remember picture,overlay]
    \node[yshift=-3cm] at (current page.north west)
      {\begin{tikzpicture}[remember picture, overlay]
        \draw[fill=jorange!70] (0,0) rectangle
          (\paperwidth,3cm);
        \node[anchor=east,xshift=.975\paperwidth,rectangle,
              rounded corners=10pt,inner sep=11pt,
              fill=MidnightBlue]
              {\color{jorange!40}\chapterlabel#1};
       \end{tikzpicture}
      };
   \end{tikzpicture}
  }
\titlespacing*{\chapter}{0pt}{50pt}{60pt}


}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\makeatletter
\def\@seccntformat#1{\fboxsep=5pt\colorbox{\currentsectioncolor}{\color{jorange!30}\hbox
    to \largsec {\protect\vphantom{bp}\hfill\csname the#1\endcsname\hfill}}\hskip0.5em}
\makeatother



% \makeatletter
% \def\@seccntformat[1]{\fboxsep=5pt\colorbox{\currentsectioncolor}{\color{jorange!30}\hbox
%     to \largsec {\protect\vphantom{bp}\hfill\csname the#1 \endcsname\hfill}}\hskip0.5em}
% \makeatother






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% obsol\`ete:




% \newcounter{ppb}
% %\newcommand{\SUBSUBSECTION}[1]{\refstepcounter{ppb}\subsubsection*{#1} 


% \makeatletter

% \newcommand\SUBSUBSECTION{\@startsection{subsubsection}{3}{2pt}{\baselineskip}{0.5\baselineskip}{\bfseries\sffamily \textcolor{0.6white} }}
% %\addcontentsline{toc}{subsubsection}{\protect\numberline{}{\footnotesize{#1}}} }

% \makeatother



% \newcounter{pb}
% \makeatletter

% \newcommand\SUBSECTION{\setcounter{ppb}{0}\@startsection{subsection}{2}{0pt}{\baselineskip}{0.5\baselineskip}{\large\bfseries \textcolor{0.4white} }}
% %\addcontentsline{toc}{subsection}{\protect\numberline{}{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\small{#1}}} }
% \makeatother


% \newcounter{sec}
% \renewcommand{\thesec}{\Roman{sec}} 


% \newcommand{\SECTION}[2][]{
% \refstepcounter{sec}\setcounter{pb}{0}\setcounter{ppb}{0}\setcounter{subsection}{0}
% \renewcommand{\NomSection}{#2}
%   \bigskip\vspace{1.5cm}
%   {   \LARGE\textcolor{0.2white}{\textbf{\textsf{\thesec}\ -\ \textsf{\textsc{#2}}}}   }\par\nobreak
%          \bigskip                  %}                                 
% \addcontentsline{toc}{section}{\protect\numberline{\textbf{\textcolor{0.4white}{\thesec}}}{\textbf{\textcolor{0.4white}{#2}}}}
% }


% \newcommand{\SECTIONT}[2][]{
% \setcounter{pb}{0}\setcounter{ppb}{0}\setcounter{subsection}{0}
% \renewcommand{\NomSection}{#2}
%   \bigskip\vspace{1.5cm}
%   {   \LARGE\textcolor{bleu_f}{\textbf{ #2}}   }
%          \bigskip                  %}                                 
% \addcontentsline{toc}{section}{\protect\numberline{{\!\!\!\!\!\!\large\textbf{\textcolor{bleu_f}{#2}}}}}}


% \newcounter{chap}
% \newcommand{\CHAP}[2]{\refstepcounter{chap}\setcounter{sec}{0}\setcounter{pb}{0}\setcounter{ppb}{0}
% \renewcommand{\NomChap}{#1}
% \psframebox[fillstyle=solid,fillcolor=bleu]
% {     \white{   \Huge\textbf{\Roman{chap}}\Huge\textbf{\ -\ #1}   }           }                                                    
% %\addcontentsline{toc}{chapter}{\protect\numberline{\!\!\!\!\!\!\!\!\Roman{chap}.}{\!\!\!\!\!\!\!\!#2}}
% }


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  T i T r e s
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\Titre}[2][30]{%
\begin{center}
 {\fontsize{#1 pt}{100pt}\selectfont \pscharpath[linestyle=none,fillstyle=gradient,gradbegin=black,gradend=bleu,gradmidpoint=0.5]
{#2 }} 
\end{center}
\vspace{2cm}
}


\newcommand{\titre}[2][30]{%
\begin{center}
 {\fontsize{#1 pt}{100pt}\selectfont \textcolor{bleu_f}
{\textbf{#2} }} 
\thispagestyle{empty}
\end{center}
\vspace{2cm}
}

%% Environnement encadr\'e
%\newcommand{\coursi}{\refstepcounter{courscomp} \thecourscomp . \hfill}

\newsavebox{\fmbox}
\newenvironment{encadrer}{%
	\vspace{1em}
    \begin{lrbox}{\fmbox}\begin{minipage}{.98\linewidth}}
    {%\vspace{1em}
    \end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}
	
	\vspace{1em minus .5em }
	}
     



\newcommand{\bs}{\bigskip}


%%%%%%%%%%%%
%% Listes et compagnie
%%%%%%%%%%%%%%%%%%%%%%%


%% Environnements divers.. 
\newenvironment{rubric}[2][]%
	{\textsc{\textbf{#2}} \hspace{2ex} \textit{#1}\par}%
	{\par\addvspace{1em}}



\newenvironment{bezig}                                                                                 % avec un zigouigoui
{\begin{list}{}{\renewcommand{\makelabel}{\ding{229}}}}{\end{list}}

\newcommand{\bez}{\begin{bezig}}
\newcommand{\ez}{\end{bezig}}




% \newenvironment{belet}                                                                                 % avec un triangle
% {\begin{list}{}{\renewcommand{\makelabel}{$\triangleright$}}}{\end{list}}
% \newcommand{\bel}{\begin{belet}}
% \newcommand{\el}{\end{belet}}




\newenvironment{Abstract}[1]    % r\'esum\'e avant chapitre ou ds
{\begin{center}
\begin{minipage}{10cm}
{\fontfamily{ugq}\selectfont\color{bleu_f} R\'esum\'e} \footnotesize{#1}} {\end{minipage}
\end{center}
\bigskip\bigskip}






\newcommand{\gros}[1]{\textcolor{blue}{\textbf{#1}}}


\newcommand{\grosf}[1]{\textcolor{blue}{\textbf{\textsf{#1}}}}


%%%%%%%%%%%%%%
% ENCADREMENT des definitions, theormemes,... 
%
% \ENC{titre du th en gras}{ corps du th }
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\newcommand{\ENC}[2]{                             % encadr\'epour th\'er\'ees rempli en bleu ciel
\bigskip

%\begin{Boxedminipage}{\textwidth}
\psshadowbox*[fillcolor=0.9white,framearc=.25]{
\begin{minipage}{\textwidth}
\sm

\textbf{#1}

\sm

{ #2}

\sm
\end{minipage}
}
\bigskip
}





% %  Th\'er\'ees d\'einitions

% \newcounter{Def}
% \newcommand{\Def}[1]{\addtocounter{Def}{1}  \textbf{D\'efinition \theDef}}


% \newcounter{Prop}
% \newcommand{\Prop}[1]{\addtocounter{Prop}{1}  \textbf{Propri\'et\'e\theProp}}
% \newcommand{\Props}[1]{\addtocounter{Prop}{1}  \textbf{Propri\'et\'es \theProp}}


% \newcounter{Th}
% \newcommand{\Thm}[1]{\addtocounter{Th}{1}  \textbf{Th\'eor\`eme \theTh\ \ }}




%% MIEUX %% NOUVEAU %%% avec ntheorem

\ifthenelse{\boolean{beamer}}{}
{%
% \shadecolor{yellow}
\theoremstyle{break}
\theoremheaderfont{\scshape\bfseries}
\theorembodyfont{\sffamily}
 \def\theoremframecommand{\psshadowbox*[fillcolor=0.8white,framearc=.25]}
 \newshadedtheorem{Defi}{D\'efinition}[NumLecon]
\newshadedtheorem{Pro}{Propri\'et\'e}[NumLecon]
\newshadedtheorem{The}{Th\'eorème}[NumLecon]

%\newshadedtheorem{The}{Thรฉorรจme}[NumLecon]

\def\theoremframecommand{\psshadowbox*[framearc=.25,fillcolor=0.9white]}
}



%% MIEUX %% NOUVEAU %%% avec ntheorem


% % \shadecolor{yellow}
% \theoremstyle{break}
% \theoremheaderfont{\scshape\bfseries}
% \theorembodyfont{\sffamily}
%  \def\theoremframecommand{\psshadowbox*[fillcolor=0.8white,framearc=.25]}
%  \newshadedtheorem{Defi}{D\'efinition}[NumLecon]
% \newshadedtheorem{Pro}{Propri\'et\'e}[NumLecon]
% \newshadedtheorem{The}{Th\'eor\`eme}[NumLecon]

% %\newshadedtheorem{The}{ThÃ©orÃ¨me}[NumLecon]

% \def\theoremframecommand{\psshadowbox*[framearc=.25,fillcolor=0.9white]}

% \newtheorem{exemple}{{\LARGE \Smiley} Exemple}[NumLecon]
%%%%
%%% petit encadre



\newcommand{\enc}[1]{ % petit encadr\'e
\begin{center} \psshadowbox*[fillcolor=0.9white,framearc=.25]{   #1 } \end{center}  
}

%%%%%%%%%%%%%%%%%%%%
\newcommand{\sm}{\smallskip}    % petit espace



\newenvironment{Boxedminipage} % pour fabriquer l'encadr\'e
{\begin{Sbox}\begin{minipage}} {\end{minipage}\end{Sbox}\fbox{\TheSbox}}



% %%% Permet d'\'erire dasn une liste en revenant contre la marge de gauche
% %%% Ind\'eendemment de la num\'eotation des questions.
\newcommand{\HorsListe}[2][1]{%
	\par\nopagebreak[4]\addvspace{2\itemsep}\hspace{-#1\leftmargin}%
	\begin{minipage}{\linewidth+#1\leftmargin}
	#2
	\end{minipage}%
	\nopagebreak[2]}


\newcommand{\Listetr}{$\blacktriangleright$}
\newcommand{\Listetro}{$\vartriangleright$}
\newcommand{\Listecr}{$\blacksquare$}
\newcommand{\Listecro}{$\square$}
\newcommand{\Listerd}{$\bullet$}
\newcommand{\Listerdo}{$\circ$}

\newenvironment{listetr}%
	{\begin{list}{\Listetr}{}}%
	{\end{list}}

\newenvironment{listerd}%
	{\begin{list}{\Listerd}{}}%
	{\end{list}}

\newenvironment{listecr}%
	{\begin{list}{\Listecr}{}}%
	{\end{list}}

\newenvironment{listetro}%
	{\begin{list}{\Listetro}{}}%
	{\end{list}}

\newenvironment{listerdo}%
	{\begin{list}{\Listerdo}{}}%
	{\end{list}}

\newenvironment{listecro}%
	{\begin{list}{\Listecro}{}}%
	{\end{list}}

\newenvironment{qcm}%
	{\begin{list}{\ding{114}}{}}%
	{\end{list}}


%%%% Environnement de demonstration sur plusieures lignes mais
%%%% mais en un seul bloc int\'er\'e\'ela ligne en cours. 
\newenvironment{arrayl}[1][rcl]%
	{\setlength{\arraycolsep}{1.5pt}
	 $\begin{array}[t]{#1}}%
	{\end{array}$}%

% %%% premet d'\'erire la r\'eonse encadr\'e apr\'e un arrayl au bout de la ligne
% %%% coll\'e\'edroite
\newcommand{\Reponse}[2][-1]{%
	\hfill\raisebox{#1\baselineskip}{\smash{\makebox[0pt][r]{\fbox{#2}}}}}


% environnement avec un zigouigoui ondul\'esur la gauche
\newsavebox{\MYbox}%
\newlength\MYh\newlength\MYd%

\newenvironment{Zigoui}[1][ondule.1]{%
    \def\Barre{#1}
    \begin{lrbox}{\MYbox}
		\begin{minipage}[b]{\linewidth -4bp -.5cm -.3cm }}{%
    	\end{minipage}
	\end{lrbox}%
	\settoheight{\MYh}{\usebox{\MYbox}}%
	\settodepth{\MYd}{\usebox{\MYbox}}%
	\addtolength{\MYh}{\MYd+4bp}%
	
	\medskip
	\hfill
	\raisebox{\totalheight-3bp}{%
		\includegraphics*[clip=true,bb= 1 -2 \MYh*72.27 2,angle=-90]{\Barre}}
	\hspace{0.3cm}\usebox{\MYbox}%
	\par\addvspace{2ex}
	}%

%%% Permet d'avoir autant de ligne de r\'eonse que l'on veut
%%% comme un enumerate ou un itemize
\newlength{\REPsep}
\setlength{\REPsep}{1.5em}

\newcommand{\REPenum}[2][\bf 1.]{%
	\begin{enumerate}[#1]
	\multido{\i=1+1}{#2}{
	\item \rule{0pt}{\REPsep}\dotfill }
	\end{enumerate}
	\addvspace{2em}}

\newcommand{\REPitem}[2][\Listerd]{%
	\begin{itemize}
	\multido{\i=1+1}{#2}{
	\item[#1] \rule{0pt}{\REPsep}\dotfill }
	\end{itemize}
	\addvspace{\REPsep}}

\newenvironment{DeuxCols}[1][2]{%                             pour \'erire en deux colonnes , 2 par d\'eaut
	\setlength{\columnsep}{30pt}
	\setlength{\columnseprule}{.5pt}
	\begin{multicols}{#1}}%
	{\end{multicols}}



% %%% Enumerate de second niveau sur deux colonnes.
\newenvironment{Sliste}[1][a)]%
	{\setlength{\multicolsep}{8pt}
	 \begin{multicols}{2}
	 \begin{enumerate}[#1]}%
	{\end{enumerate}
	 \end{multicols}}

%%%% enumerate sur n colonnes
\newenvironment{nliste}[2][{\bf 1.}]%
	{%\setlength{\multicolsep}{8pt}
           \setlength{\columnseprule}{0pt}
	 \begin{multicols}{#2}
	 \begin{enumerate}[#1]}%
	{\end{enumerate}
	 \end{multicols}}


%%%%%%%%%%%%%% Divers raccourcis 
\newcommand{\bet}{\begin{center}\begin{tabular}}
\newcommand{\et}{\end{tabular}\end{center}}



\newcommand{\bqa}{\begin{eqnarray}}
\newcommand{\eqa}{\end{eqnarray}}

\newcommand{\bd}{\begin{document}}
\newcommand{\ed}{\end{document}}

\newcommand{\bqas}{\begin{eqnarray*}}
\newcommand{\eqas}{\end{eqnarray*}}

\newcommand{\been}{\begin{enumerate}}
\newcommand{\een}{\end{enumerate}}





\newcommand{\bfi}{\begin{figure} }

\newcommand{\efi}{\end{figure}}

\newcommand{\id}{\IR\!d}

\newcommand{\ba}{\begin{array}}
\newcommand{\ea}{\end{array}}

\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}

\newcommand{\bi}{\begin{itemize}}
\newcommand{\ei}{\end{itemize}}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Tableau de variation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\croi}{% croissante
\unitlength=1cm
\begin{minipage} {1cm}%pour centrer verticalement f(x)
\begin{picture}(1,1) % dessin de 2 X 2
\put(0,0){\vector(1,1){1}} % 1 \'epartir (0,0) direction (1,1)
\end{picture}
\end{minipage}}


\newcommand{\dec}{%d\'eroissante
\setlength{\unitlength}{1cm}
\begin{minipage} {1cm}%pour centrer verticalement f(x)
\begin{picture}(1,1) % dessin de 2 X 2
\put(0,1){\vector(1,-1){1}}
\end{picture}
\end{minipage}
}


% xcas


  \newcommand{\p}{\textasciicircum}  % pour avoir le chapeau de la puissance


\newcommand{\cas}[1]{
\texttt{#1}
}

\newcommand{\map}[1]{\begin{center}
\textbf{\textsf{\color{blue} #1}}\end{center}}


\newcommand{\mup}[1]{

 \smallskip 


\texttt{\textcolor{red}{#1}}


  \smallskip

}




%%%%%%%%%%%%%%%%%%%% ENTETES %%%%%%%%%


\newcommand{\entete}[3]{
\fancyfoot[C]{{\scriptsize\textsl{ Guillaume Connan, #3, 2009-2010}}}
 \fancyhead[RO,LE]{\color{MidnightBlue}\fontfamily{ugq}\selectfont\bfseries\thepage} \fancyhead[RE,LO]{ }
 \fancyhead[CO]{\color{0.2white}\fontfamily{ugq}\selectfont     #1     }
 \fancyhead[CE]{\color{MidnightBlue}\fontfamily{ugq}\selectfont\MakeLowercase
     #2  }
\renewcommand{\headrulewidth}{0.4pt}
 \pagestyle{fancy}
}


\newcommand{\entetano}[3]{
\fancyfoot[C]{{\scriptsize\textsl{  #3 }}}
 \fancyhead[RO,LE]{} \fancyhead[RE,LO]{ }
 \fancyhead[CO]{  #1 } \fancyhead[CE]{\textbf{#2 } }
\renewcommand{\headrulewidth}{0.4pt}
 \pagestyle{fancy}
}


\newcommand{\entetinfo}[3]{
\fancyfoot[C]{{\scriptsize\textsl{  #3, 2006-2007}}}
 \fancyhead[RO,LE]{\thepage} \fancyhead[RE,LO]{ }
 \fancyhead[CO]{  #1 } \fancyhead[CE]{\textbf{#2 } }
\renewcommand{\headrulewidth}{0.4pt}
 \pagestyle{fancy}
}



\newcommand{\entetalice}[2]{
\fancyfoot[C]{ }
 \fancyhead[RO,LE]{\thepage} \fancyhead[LO,RE]{ }
 \fancyhead[CO]{ \textbf{ #1} } \fancyhead[CE]{#2  }
\renewcommand{\headrulewidth}{0.4pt}
 \pagestyle{fancy}
}


\newcommand{\enteteroman}[2]{
\fancyfoot[C]{\thepage }
 \fancyhead[RO,LE]{ } \fancyhead[LO,RE]{ }
 \fancyhead[CO]{ \textit{\small #1} } \fancyhead[CE]{#2  }
\renewcommand{\headrulewidth}{0.4pt}
 \pagestyle{fancy}
}





% \newcommand{\etoile}{\begin{center}\begin{tabular}{ccc}
% *& &*\\
%  &*& 
% \end{tabular}
% \end{center}
% }








\setcounter{tocdepth}{3} %\setcounter{page}{0}


\pagenumbering{arabic} \setlength{\unitlength}{1cm} \setlength{\parindent}{0mm} \floatplacement{figure}{H}

\setlength{\parindent}{0mm}








% pour le sommaire

% \makeatletter
% \def\addcontentsline@toc#1#2#3{\addtocontents{#1}{}%
% \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}}

% \def\addcontentsline#1#2#3{\expandafter\@ifundefined{addcontentsline@#1}%
% {\addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}}} {\csname addcontentsline@#1\endcsname{#1}{#2}{#3}}}



%% Nouvelle partie
% \newcommand{\partie}[2][]{%
% 	\addvspace{1em}
	
% 	\textbf{Partie #2}\qquad\textit{#1}%
	
% 	\nopagebreak[4]}
 



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  EXERCICE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





%\ifthenelse{\boolean{tikz}}{
\RequirePackage{tikz}
\usetikzlibrary{calc}
%%%%% EXERCICES JOLIS AVEC TIKZ
\newcounter{numEXOL}[NumLecon]
\newcounter{numEXO}
\newlength\longueurdutitre

\newsavebox{\exercicE}
\newlength{\decalage}\setlength{\decalage}{5mm}   % marge int\'erieure
\newlength{\epaisseur}\setlength{\epaisseur}{5pt} % \'epaisseur filet
\newlength{\total}
\addtolength{\total}{\epaisseur} 
\addtolength{\total}{\decalage}

% avec reference a NumLecon

\newenvironment{exercicet}[2][MidnightBlue]{% couleur par d\'efaut ici
 \noindent
 \colorlet{macouleur}{#1}
 \newcommand\monbeautitre{#2}
\settowidth{\longueurdutitre}{\monbeautitre} 
\par
 \vspace{5pt}
%\par
 \begin{lrbox}{\exercicE}
  \addtocounter{numEXOL}{1}
  \begin{minipage}[b]{\columnwidth}
   \begin{tikzpicture}[remember picture]
    \node (debut) {};
   \end{tikzpicture}
   \medskip\par
   \hspace{\total}
   \begin{minipage}{0.99\columnwidth-\total}
}{%
   \end{minipage}\\
   \begin{tikzpicture}[remember picture]
    \node (fin) {};
   \end{tikzpicture}
  \end{minipage}
 \end{lrbox}
 \usebox{\exercicE}
 \begin{tikzpicture}[remember picture, overlay]
  \draw[overlay, line width = 15pt, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+3cm+\longueurdutitre,\y1) -- (\x1,\y1);
  \draw[overlay, line width = \epaisseur, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+0.5\epaisseur,\y1) -- (\x1+0.5\epaisseur,\y2);
  \node[text=macouleur,right, minimum width = 3cm]
  at (debut.north east) { {\bfseries\fontfamily{ugq}\selectfont Exercice~\theNumLecon.\thenumEXOL}\ \ \monbeautitre };
 \end{tikzpicture}
}


% sans titre

\newenvironment{EXOL}[1][MidnightBlue]{% couleur par d\'efaut ici
 \noindent
 \colorlet{macouleur}{#1}
\par
 \vspace{5pt}
\par 
\begin{lrbox}{\exercicE}
  \addtocounter{numEXOL}{1}
  \begin{minipage}[b]{\columnwidth}
   \begin{tikzpicture}[remember picture]
    \node (debut) {};
   \end{tikzpicture}
   \medskip\par
   \hspace{\total}
   \begin{minipage}{0.99\columnwidth-\total}
}{%
   \end{minipage}\\
   \begin{tikzpicture}[remember picture]
    \node (fin) {};
   \end{tikzpicture}
  \end{minipage}
 \end{lrbox}
 \usebox{\exercicE}
 \begin{tikzpicture}[remember picture, overlay]
  \draw[overlay, line width = 15pt, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+3cm,\y1) -- (\x1,\y1);
  \draw[overlay, line width = \epaisseur, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+0.5\epaisseur,\y1) -- (\x1+0.5\epaisseur,\y2);
  \node[text=macouleur,right, minimum width = 3cm]
  at (debut.north east) {\bfseries\fontfamily{ugq}\selectfont Exercice~\theNumLecon.\thenumEXOL};
 \end{tikzpicture}
}
%}{}

% sans reference a NumLecon

\newenvironment{exercice}[2][MidnightBlue]{% couleur par d\'efaut ici
 \noindent
 \colorlet{macouleur}{#1}
 \newcommand\monbeautitre{#2}
\settowidth{\longueurdutitre}{\monbeautitre} 
\par
 \vspace{5pt}
%\par
 \begin{lrbox}{\exercicE}
  \addtocounter{numEXO}{1}
  \begin{minipage}[b]{\columnwidth}
   \begin{tikzpicture}[remember picture]
    \node (debut) {};
   \end{tikzpicture}
   \medskip\par
   \hspace{\total}
   \begin{minipage}{0.99\columnwidth-\total}
}{%
   \end{minipage}\\
   \begin{tikzpicture}[remember picture]
    \node (fin) {};
   \end{tikzpicture}
  \end{minipage}
 \end{lrbox}
 \usebox{\exercicE}
 \begin{tikzpicture}[remember picture, overlay]
  \draw[overlay, line width = 15pt, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+3cm+\longueurdutitre,\y1) -- (\x1,\y1);
  \draw[overlay, line width = \epaisseur, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+0.5\epaisseur,\y1) -- (\x1+0.5\epaisseur,\y2);
  \node[text=macouleur,right, minimum width = 3cm]
  at (debut.north east) {{\bfseries\fontfamily{ugq}\selectfont Exercice~\thenumEXO}\ \ \monbeautitre };
 \end{tikzpicture}
}


% sans titre non plus

\newenvironment{EXO}[1][red]{% couleur par d\'efaut ici
 \noindent
 \colorlet{macouleur}{#1}
\par
 \vspace{5pt}
%\par
 \begin{lrbox}{\exercicE}
  \addtocounter{numEXO}{1}
  \begin{minipage}[b]{\columnwidth}
   \begin{tikzpicture}[remember picture]
    \node (debut) {};
   \end{tikzpicture}
   \medskip\par
   \hspace{\total}
   \begin{minipage}{0.99\columnwidth-\total}
}{%
   \end{minipage}\\
   \begin{tikzpicture}[remember picture]
    \node (fin) {};
   \end{tikzpicture}
  \end{minipage}
 \end{lrbox}
 \usebox{\exercicE}
 \begin{tikzpicture}[remember picture, overlay]
  \draw[overlay, line width = 15pt, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+3cm,\y1) -- (\x1,\y1);
  \draw[overlay, line width = \epaisseur, draw=macouleur!20] 
  let \p1 = (debut.north west), \p2 = (fin) in
  (\x1+0.5\epaisseur,\y1) -- (\x1+0.5\epaisseur,\y2);
  \node[text=macouleur,right, minimum width = 3cm]
  at (debut.north east) {\bfseries\fontfamily{ugq}\selectfont Exercice~\thenumEXO};
 \end{tikzpicture}
}

%\newcounter{num}


\newcommand{\Exot}[1]{\refstepcounter{num}
\vspace{.8cm}  \textbf{\textsf{\textcolor{bleu_f}{{\LARGE\bcdanger}\ \ {\large Exercice  \thenum\ \  #1}}}  }  \\
 \vspace{0.005cm} }



\newcommand{\exol}[1]{\refstepcounter{num}

\vspace{.3cm}
\ifxetex
\textcolor{0.4white}{\textbf{\textsf{{{\Large\bcdanger}\  \  {  Exercice
          \theNumLecon -\thenum\ \ #1}}} \\ } }\par\nobreak 
 \vspace{0.5cm}
\else
\ifpdf
\textcolor{0.4white}{\textbf{\textsf{{{\Large\bcdanger}\  \  {  Exercice
          \theNumLecon -\thenum\ \ #1}}} \\ } }\par\nobreak 
 \vspace{0.5cm}
\else
  \psshadowbox*[fillcolor=0.9white,framearc=.25]{\textbf{\textsf{{{\large\bcdanger}\
          \ { Exercice \theNumLecon -\thenum\ \ #1}}} \\ } }\par\nobreak 

\normalsize
 \vspace{0.15cm} 
\fi
\fi
}




\newcommand{\exot}[1]{\refstepcounter{num}

\vspace{.3cm}
\ifxetex
\textcolor{MidnightBlue}{\bfseries\fontfamily{ugq}\selectfont{{\Large\bcdanger}\ \ { Exercice \NumLecon \thenum\ \  #1} \\  }  }\par\nobreak 
 \vspace{0.5cm}
\else
\ifpdf
\textcolor{MidnightBlue}{\textbf{\textsf{{{\Large\bcdanger}\ \ { Exercice \NumLecon \thenum\ \  #1}}} \\  }  }\par\nobreak 
 \vspace{0.5cm}
\else
  \psshadowbox*[fillcolor=green!50,framearc=.05]{\color{MidnightBlue}\bfseries\fontfamily{ugq}\selectfont{\large\bcdanger}\ \  Exercice  \NumLecon  \thenum\ \  #1 \\    }\par\nobreak 

\normalsize
 \vspace{0.15cm}
\fi
\fi
}



\newcommand{\exo}[1]{\refstepcounter{num}

\vspace{.3cm}
\ifxetex
\textcolor{0.4white}{\textbf{\textsf{{{\Large\bcdanger}\ \ { Exercice  \thenum\ \  #1}}} \\  }  }\par\nobreak 
 \vspace{0.5cm}
\else
\ifpdf
\textcolor{0.4white}{\textbf{\textsf{{{\Large\bcdanger}\ \ { Exercice  \thenum\ \  #1}}} \\  }  }\par\nobreak 
 \vspace{0.5cm}
\else
  \psshadowbox*[fillcolor=0.9white,framearc=.25]{\textbf{\textsf{{{\large\bcdanger}\ \ { Exercice  \thenum\ \  #1}}} \\  }  }\par\nobreak 

\normalsize
 \vspace{0.15cm}
\fi
\fi
}


\newcommand{\exop}[1]{\refstepcounter{num}

%\hrulefill

\vspace{.3cm}

\textcolor{0.4white}{\textbf{\textsf{{{\Large\bcdanger}\ \ { Exercice  \thenum\ \  #1}}} \\  }  }\par\nobreak 


 \vspace{0.5cm} }






\newcommand{\exott}[1]{\refstepcounter{num}
\smallskip   \textbf{\textsf{\textcolor{bleu_f}{{\LARGE\bcdanger\bcdanger}\ \ {Exercice  \thenum\ \  #1}}}  }  \\

 \vspace{0.5cm} }




\newcommand{\exottt}[1]{\refstepcounter{num}
\smallskip   \textbf{\textsf{\textcolor{bleu_f}{{\Huge\ComputerMouse}\ \ {Exercice  \thenum\ \  #1}}}  }  \\

 \vspace{0.005cm} }







\newcommand{\danger}{\raisebox{1.1ex}{\hspace{0.2cm} \dbend \hspace{.5cm} }}








%%environnement danger
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newlength{\largeurdanger}
\newlength{\hauteurdanger}
\newlength{\paddingdanger}
\newlength{\identationdanger}
\newlength{\largeurlignedanger}
\setlength{\largeurdanger}{.5cm}
\setlength{\hauteurdanger}{.25cm}
\setlength{\paddingdanger}{5pt}
\newenvironment{Danger}{%
\begin{list}{}{%
\itshape
\setlength{\labelsep}{0pt}%
\setlength{\rightmargin}{15pt}}
\item%
\setlength{\identationdanger}{%
\@totalleftmargin+\largeurdanger+\paddingdanger}%
\setlength{\largeurlignedanger}{%
\linewidth-\largeurdanger-\paddingdanger}%
\parshape=4%
\identationdanger\largeurlignedanger%
\identationdanger\largeurlignedanger%
\identationdanger\largeurlignedanger%
\@totalleftmargin\linewidth%
\raisebox{-\hauteurdanger}[0pt][0pt]{%
\makebox[0pt][r]{%
{\Large\dbend}%
\hspace*{\paddingdanger}}}%
\ignorespaces}{%
\end{list}
\vspace{.5cm}}




% autre danger sur fond \`a couleur variable avec le panneau d\'ecal\'e vers le haut



\newsavebox{\dangerbox}

% On r\`egle les marges d\'efinitivement ici
\newlength{\marge}\setlength{\marge}{5mm}
% Contrôle fin pour le panneau
\newlength{\margehaut}\setlength{\margehaut}{2mm}

\newlength{\margegauche}
\newlength{\extraline}\setlength{\extraline}{4mm}
\newenvironment{DANGER}[1][\linewidth-3\marge-\widthof{\Large\textdbend}]{%
 \setlength{\margegauche}{#1}
 \par
 % Ajout pour que le haut du panneau ne touche pas
                  % le texte au-dessus.
 \begin{lrbox}{\dangerbox}
   \begin{minipage}{\linewidth-2\marge-2\pslinewidth-\extraline}
     \par\vspace*{\margehaut}
}
{%
   \end{minipage}%
 \end{lrbox}%
 % Affiche le texte dans un cadre en couleur.
 \rput[tl](0,0){%
   \psframebox[fillstyle=solid, fillcolor=0.9white, framesep=\marge]{%
     \usebox{\dangerbox}%
   }%
 %
 % Affiche l'extension des lignes
    \setlength{\dimen0}{-\dp\dangerbox-\marge-0.5\pslinewidth}%

\rput(-0.5\pslinewidth,\dimen0){\psline(\extraline,0)(0,0)(0,-\extraline)}
  }%


 % Affiche le panneau
 %\begingroup
 \psset{unit=1mm, linestyle=none, fillstyle=solid, fillcolor=white}
 % fond du panneau en blanc
 \rput(2\marge,0){\rput(\margegauche,2\margehaut){\pspolygon[linearc=0.2]
                             (0,-2.7)(-4.2,1.3)(0,5.3)(4.2,1.3)}}
 % fond du pied en blanc
 \rput(2\marge,0){\rput(\margegauche,2\margehaut){\psframe(-0.5,-2.4)(0.5,-4.7)}}
% \endgroup
 % panneau proprement dit
 \rput(2\marge,0){\rput(\margegauche,2\margehaut){\Large\textdbend}}
 % R\'eserve la place verticale pour la suite
 \par
 \setlength{\marge}{\ht\dangerbox+\dp\dangerbox+2\marge+\extraline}
 \vspace{\marge}
}










%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%environnement id\'ee encadr\'e en couleur
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




%\newsavebox{\dangerbox}

% On r\`egle les marges d\'efinitivement ici
%\newlength{\marge}\setlength{\marge}{5mm}
% Contrôle fin pour le panneau
%\newlength{\margehaut}\setlength{\margehaut}{2mm}

% D\'epassement des zigouigouis de ligne dans le
% coin inf\'erieur droit
\setlength{\extraline}{4mm}

\newenvironment{Idee}[1][\linewidth-4\marge-\widthof{\Large\Peace}]{%
  \setlength{\margegauche}{#1}%
  \par
  \begin{lrbox}{\dangerbox}
    \begin{minipage}{\linewidth-2\marge-2\pslinewidth-\extraline}
      \par\vspace*{\margehaut}
}
{%
    \end{minipage}%
  \end{lrbox}
  % Affiche le texte dans un cadre en couleur.
  \rput[tl](0,0){%
    \psframebox[fillstyle=solid, fillcolor=0.9white, framesep=\marge]{%
      \usebox{\dangerbox}%
    }%
    % Affiche l'extension des lignes
    \setlength{\dimen0}{-\dp\dangerbox-\marge-0.5\pslinewidth}%

\rput(-0.5\pslinewidth,\dimen0){\psline(\extraline,0)(0,0)(0,-\extraline)}
  }%
  % Efface le trait juste ce qu'il faut
 % \rput(\marge,0){%
  %  \rput(\margegauche,0){%
   %   \psline[linewidth=2\pslinewidth,linecolor=white](0.5em,0)(2.4em,0)
    %}
  %}
 



 % Affiche le panneau
 %\begingroup
 \psset{unit=1mm, linestyle=none, fillstyle=solid, fillcolor=white}
 % fond du piece en blanc
 \rput(2\marge,0){\rput(\margegauche,2\margehaut){\pswedge[linearc=0.2](-1,0.5){3.5}{290}{0} }}
\rput(2\marge,0){\rput(\margegauche,2\margehaut){\pswedge[linearc=0.2](0.5,.5){3}{195}{260} }}
\rput(2\marge,0){\rput(\margegauche,2\margehaut){\pswedge[linearc=0.2](0.5,.5){2.5}{180}{195} }}
                            % (0,-2.7)(-4.2,1.3)(0,5.3)(4.2,1.3)}}
% \endgroup
 % panneau proprement dit
\rput(2\marge,0){\rput(\margegauche,2.5\margehaut){\Huge\Peace}}


  % R\'eserve la place verticale pour la suite
  \par
  \setlength{\marge}{\ht\dangerbox+\dp\dangerbox+2\marge+\extraline}
  \vspace{\marge}
}

\columnseprule0.4pt




%\newcommand{\exott}[1][]{\addtocounter{num}{1}
%\medskip   \textbf{\textsf{\textcolor{bleu}%{\Radioactivity\Radioactivity}\ \thenum\ \ #1}}}

%\newcommand{\exottt}[1][]{\addtocounter{num}{1}
%\medskip   \textbf{\textsf{\textcolor{bleu}%{\Radioactivity\Radioactivity\Radioactivity}\ \thenum\ \ #1}}}









\newcounter{solnum}
\newcommand{\sol}[2]{\addtocounter{solnum}{1}
\medskip   \textbf{\textsf{Solution  \thesolnum\ \ #1}}\\
\ \small{{#2}}}







%% environnement Exercice

% \newcounter{ex}
% \newenvironment{exercice}[1][]{%
% 	\pagebreak[3]
% 	\refstepcounter{ex}
% 	\vspace{0.5em}
% 	%\setcounter{equation}{0} %remise du compteur equation \'ezero
% 				  %\'echaque nouvel exercice    
% 	{\large \textbf{\textsc{\textcolor{bleu_f}{{\LARGE\bomb}Exercice \theex}}}}
% 	\qquad{\large \textsl{#1}}
	
% 	\nopagebreak[4]}%
% 	{\par\addvspace{1em}}








% %% Exercice avec r\'e\'eence au fichier inclus
% \newcommand{\exo}[2][]{%
% 	\pagebreak[3]
% 	\refstepcounter{ex}
% 	\vspace{0.5em}
% 	%\setcounter{equation}{0} %remise du compteur equation \'ezero
% 				  %\'echaque nouvel exercice    
% 	{\large \textbf{\textsc{\textcolor{bleu_f}{{\LARGE\bomb}Exercice \theex}}}}	
% 	\qquad{\large \textit{#1}}
% 	\hfill\makebox[0cm][r]{\scriptsize\textit{#2}}
	
% 	\nopagebreak[4]

% 	\input{#2}
	
% 	\addvspace{1em}}
% %








% %% Exercice sans r\'e\'eence au fichier inclus
% \newcommand{\Exo}[2][]{%
% 	\pagebreak[3]
% 	\refstepcounter{ex}
% 	\vspace{0.5em}
% 	%\setcounter{equation}{0} %remise du compteur equation \'ezero
% 				  %\'echaque nouvel exercice    
% 	{\large \textbf{\textsc{\textcolor{bleu_f}{{\LARGE\bomb}Exercice \theex}}}}	
% 	\qquad{\large \textit{#1}}
	
% 	\nopagebreak[4]

% 	\input{#2}
	
% 	\addvspace{1em}}













\renewcommand{\un}{(u_n)_{n\in\bbn}\ }









% % REMARQUE
% \newcounter{rem}
% \newcommand{\Remarque}[2][Remarque]{%
% 	\refstepcounter{rem}
%         \begin{description}
% 	\item[#1 \theNumLecon.\therem] ~:~\textsl{#2}
% 	\end{description}}








% \newcounter{exemp}
% \newcommand{\Exemple}[2][Exemple \theexemp]{%
% 	\refstepcounter{exemp}
%         \begin{description}
% 	\item[#1 \theexemp] ~:~\textsl{#2}
% 	\end{description}}










% %% Commande info avec syntaxe sans index
\newcommand\Coms[2]{%
\shorthandoff{;:}\textcolor{0.4white}{\bfseries \textsf{#1}}(\texttt{#2})}


\renewcommand{\simeq}{\approx}


%%%%%%  Commande personnelle ou bout de code

\newcommand{\code}[1]{\texttt{#1}}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Pour inclure des illustrations dans du texte ou en parall\'ee
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\figpara}[2]{\begin{minipage}[t]{0.45\textwidth}\vspace{0cm}\begin{flushleft}\includegraphics[height=5cm]{#1.eps}\end{flushleft}\end{minipage}\hspace{0.5cm}\begin{minipage}[t]{0.45\textwidth}\vspace{-0.5cm}
\hspace{5.5cm}
\begin{flushright}\includegraphics[height=5cm]{#2.eps}\end{flushright}\end{minipage}}

\newcommand{\ill}[2]{\begin{minipage}[t]{0.75\textwidth}\vspace{0cm}#1\end{minipage}\hspace{0.5cm}\begin{minipage}[t]{0.2\textwidth}\vspace{-0.5cm}
\hspace{5.5cm} \begin{flushright}\includegraphics[height=5cm]{#2.eps}\end{flushright}\end{minipage}}



\newcommand{\illps}[3]{\begin{minipage}[t]{0.75\textwidth}\vspace{0cm}#1\end{minipage}\hspace{0.5cm}\begin{minipage}[t]{0.2\textwidth}\vspace{-0.5cm}
\hspace{5.5cm} \begin{flushright}\includegraphics[height=#3cm]{#2.ps}\end{flushright}\end{minipage}}

\newcommand{\illmp}[2]{\begin{minipage}[t]{0.65\textwidth}\vspace{0cm}#1\end{minipage}\hspace{0.5cm}\begin{minipage}[t]{0.3\textwidth}\vspace{-0.5cm}
\hspace{5.5cm} \begin{flushright}\includegraphics{#2}\caption{}\end{flushright}\end{minipage}}



\newcommand{\illmpl}[4]{\begin{minipage}[t]{#3\textwidth}\vspace{0cm}#1\end{minipage}\hspace{0.5cm}\begin{minipage}[t]{#4\textwidth}\vspace{-0.5cm}
\hspace{5.5cm} \begin{flushright}\includegraphics[width=\textwidth]{#2}\end{flushright}\end{minipage}}








\newcommand{\derniere}{
%num\'eotation des pages par rapport \'ela derni\'ee
\makeatletter
\renewcommand{\@evenfoot}
    {\hfill
    page {\thepage}/\pageref{LastPage}
    \hfill}
\renewcommand{\@oddfoot}{\hfill
    page {\thepage}/\pageref{LastPage}
    \hfill}
\makeatother
%fin de la macro pour num\'eoter les pages
}


%%%% vieux trucs pour le bouquin
\newcommand{\bq}{\bbq}
%\newcommand{\m}{Montrer que}
\newcommand{\Qcm}{\bigcirc\ }


\newcommand{\mg}{\mathversion{bold}}


\newcommand{\mat}{T\'ehessin}



\newcommand{\MAT}[1]{
\smallskip

{ \textbf{T\'ehessin} : #1}

\smallskip
}

\newcommand{\pro}{
\smallskip

 \textbf{Math\'emator}~: }


\newcommand{\tsx}{
\smallskip

 \textbf{T\'ehessin}~: }


\newcommand{\MATA}[1]{
\smallskip

{ \textbf{T\'ehessin (\`a part)} : \textit{#1}} }

\newcommand{\REV}{\mat, vous rêvez ! Je vous entends !}





\newcommand{\bmx}{
\smallskip

 \textbf{Biom\'ecanix}~: }



\newcommand{\bmxap}[1]{
\smallskip

{ \textbf{Biom\'ecanix (\`a part)} : \textit{#1} {\bf (tout haut) : }} }



\newcommand{\bmxa}[1]{
\smallskip

{ \textbf{Biom\'ecanix (\`a part)} : \textit{#1}  }} 






%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% P S T ricks de Nicolas : pour les fichiers tarassconf
%
%%%%%%%%%%%%%%%%%%%%%%


%%%% Trigonometrie \`a diviser par 1.5 pour a4

\newcommand{\Trigo}[1]{%
\begin{pspicture}(-16.875,-4.65)(8.445,4.65)

% Dessin du quadrillage
\psaxes[linewidth=0.6pt,xunit=.65625,yunit=3.75,labels=none]%
			{->}(0,0)(-12.5,-1.2)(12.75,1.2)
\psgrid[gridlabels=0,subgriddiv=0,gridwidth=0.4pt,%
			griddots=8,xunit=0.65625,yunit=.9375]%
			(-12,-4)(12,4)
{\psset{xunit=.65625,yunit=3.75}
\uput{.2}[270](-12,0){\small $-2\pi$}
\uput{.2}[270](-6,0){\small $-\pi$}
\uput{.2}[235](0,0){\small $0$}
\uput{.2}[270](6,0){\small $\pi$}
\uput{.2}[270](12,0){\small $2\pi$}
\uput{.2}[180](0,1){\small $1$}
\uput{.2}[180](0,-1){\small $-1$}
\rput[t](-6,1.2){#1}}

% Dessin du cercle trigo
\psaxes[linewidth=0.6pt,unit=3.75,labels=none,ticks=none]%
			{->}(-12.75,0)(-14.25,-1.5)(-11.1,1.65)

\pscustom[linestyle=dashed,linewidth=0.1pt]{%
\translate(-12.75,0)
\SpecialCoor
\multido{\i=15+15}{24}{\psline(0,0)(3.75;\i)}}

\pscircle(-12.75,0){3.75}
\end{pspicture}}


% Dessine un rep\'ee sp\'eial trigo 0 \'e12 en x, -4 \'e4 en y:
% Etiquettes :
% #1 : 6 en x
% #2 : 12 en x
% #3 : -2 en y
% #4 : 2 en y
\newcommand{\AxesTrigo}[4]
{\psaxes[linewidth=0.6pt,dx=0.5,dy=0.5,labels=none]%
			{->}(0,0)(-0.1,-2.4)(6.4,2.4)
\psgrid[gridlabels=0,subgriddiv=0,gridwidth=0.5pt,%
			griddots=5,unit=.5](0,-4)(12,4)
\uput{.2}[180](0,0){\small $0$}
\uput{.2}[270](3,0){\small $#1$}
\uput{.2}[270](6,0){\small $#2$}
\uput{.2}[180](0,1){\small $#3$}
\uput{.2}[180](0,-1){\small $#4$}
\rput[Bc](3,-2.8){$y=\points[3cm]$}}


% #3*sin(x*#1+#2)+#4
% o x varie entre 0 et 720
\newcommand{\CourbeTrigo}[4]
{\psplot[plotpoints=500]{0}{6}{x 120 mul #1 mul #2 add sin #3 mul #4 add}}



%%%% Une boule en d\'erad\'e

%\newsavebox{\BBoule}

%\begin{lrbox}{\BBoule}
%\begin{pspicture}(-.3,-.3)(.3,.3)
%\pscircle[fillstyle=solid,fillcolor=bleu_f](0,0){.4}

%\setlength{\MYh}{0.25cm}
%\multido{\n=0.30 + .01}{70}{%
%	\newgray{mygray}{\n}
%	\addtolength{\MYh}{-.003cm}
%	\pscircle[fillstyle=solid,linestyle=none,fillcolor=mygray]%
%		(.09,-.06){\MYh}}
%\end{pspicture}
%\end{lrbox}

%\newcommand{\Boule}[1][.4]{\scalebox{#1}{\usebox{\BBoule}}}


%%%%%%%%%%% fonctions math\'eatiques pour Pstricks %%%%%%%%%%%%%%%

\newcommand{\ppi}{ 3.1416 }
\newcommand{\pe}{ 2.718 }
\newcommand{\prd}{ 180 \ppi div mul }                 %% transforme des rd en degres
\newcommand{\pdeg}{ \ppi mul 180 div }                %% transforme des degres en rd
\newcommand{\pExp}{ \pe exch exp }                    %% exponentielle
\newcommand{\pCos}{ \prd cos }                        %% cosinus (argument en radian)
\newcommand{\pSin}{ \prd sin }                        %% sinus (argument en radian)
\newcommand{\ptan}{ dup sin exch cos div }            %% tangente (argument en degr\'e
\newcommand{\pcotan}{ dup cos exch sin div }          %% cotangente (argument en degr\'e
\newcommand{\pTan}{ dup \pSin exch \pCos div }        %% tangente (argument en radian)
\newcommand{\pcoTan}{ dup \pCos exch \pSin div }      %% cotangente (argument en radian)
\newcommand{\parctan}{ dup 0 ge {1 atan} {neg 1 atan neg} ifelse }
                                                      %% arctan r\'eultat en degr\'e\newcommand{\pArctan}{ \parctan \pdeg }               %% arctan r\'eultat en radian
\newcommand{\parccos}{ dup dup mul neg 1 add sqrt exch atan } %% arccos -> degr\'e\newcommand{\pArccos}{ \parccos \pdeg }               %% arccos -> radian
\newcommand{\parcsin}{ dup dup mul neg 1 add sqrt atan dup 90 lt {} {360 sub} ifelse }
                                                      %% arcsin -> degr\'e\newcommand{\pArcsin}{ \parcsin \pdeg }               %% arcsin -> radian
\newcommand{\pcosh}{ dup \pExp exch neg \pExp add 2 div }     %% cosinus hyperbolique
\newcommand{\psinh}{ dup \pExp exch neg \pExp sub 2 div }     %% sinus hyperbolique
\newcommand{\ptanh}{ dup \psinh exch \pcosh div }     %% tangente hyperbolique
\newcommand{\pcotanh}{ dup \pcosh exch \psinh div }   %% cotangente hyperbolique
\newcommand{\pfactorielle}{ dup 0 eq {pop 1} {dup 1 sub \pfactorielle mul} ifelse }
                                                      %% factorielle
\newcommand{\parctanh}{ dup 1 add exch neg 1 add  div sqrt ln }
                                                      %% tangente hyperbolique inverse
\newcommand{\parcsinh}{ dup 2 exp 1 add sqrt add ln } %% sinus hyperbolique inverse
\newcommand{\parccosh}{ dup 2 exp 1 sub sqrt add ln } %% cosinus hyperbolique inverse


%%%% Style des grilles
\newpsstyle{grille}{gridlabels=0,subgriddiv=0,gridwidth=0.5pt,griddots=10}

\newcommand{\MaGrille}[5][10]{%
	\psgrid[gridlabels=0,%
	        subgriddiv=0,%
			gridwidth=0.5pt,%
			griddots=#1](0,0)(#2,#3)(#4,#5)}

\newcommand{\MesAxes}[5][.6pt]{%
	{\footnotesize
	\psaxes[labelsep=3pt,ticksize=2pt,linewidth=#1]{->}(0,0)(#2,#3)(#4,#5)
	\pnode(#4,0){XX}\pnode(0,#5){YY}}}

\newcommand{\MesAxesEtiquettes}[2]{%
	\SpecialCoor
	\uput{.2cm}[270](XX){#1}
	\uput{.2cm}[180](YY){#2}}

\newcommand{\MonRepereij}{%
	\psline[arrowsize=3pt 3,linewidth=1.2pt]{<->}(1,0)(0,0)(0,1)
	\uput{.2cm}[270](0.5,0){$\vec{\imath}$}
	\uput{.25cm}[180](0,0.5){$\vec{\jmath}$}}

\newcommand{\MonRepereuv}{%
	\psline[arrowsize=3pt 3,linewidth=1.2pt]{<->}(1,0)(0,0)(0,1)
	\uput{.2cm}[270](0.5,0){$\vec{u}$}
	\uput{.25cm}[180](0,0.5){$\vec{v}$}}

\newcommand{\Origine}{\uput{.2}[225](0,0){$o$}}

%%%% Mes pointill\'e
\newpsstyle{pointilles}{linewidth=0.015,linestyle=dashed,%
		dash=0.015 0.085,arrows=cc-cc}

%%%% hachures plus fines dans les 2 sens
\newpsstyle{hachured}{fillstyle=hlines,hatchwidth=0.2pt,hatchsep=2pt}
\newpsstyle{hachureg}{fillstyle=vlines,hatchwidth=0.2pt,hatchsep=2pt}

%%%% tangente et asymptote
\newpsstyle{tangente}{arrowsize=3pt 3,linewidth=.8pt}
\newpsstyle{asymptote}{linestyle=dashed,linewidth=.3pt}

%%% Faire une tangente
\newcommand{\Tangente}[5][<->]{%
	\pscustom[style=tangente]{%
	\translate#2\rotate{#3}
	\psline{#1}(#4,0)(#5,0)}
	\psdots#2}

%%% Prolongement par continuit\'e%\makeatletter
\def\psas@d{
/SD {-30 210 arc stroke} def
{\pst@usecolor\psfillcolor true} false \psk@dotsize
  \tx@EndDot
/SD {0 360 arc fill} def
}
%\makeatother


%%%% Des gris
\newgray{grisclair}{.75}
\newgray{grismoyen}{.50}
\newgray{grisfonce}{.25}

%%%% Papier millim\'er\'ex*y en cm
\newcommand{\PapierMill}[2]{%
	\begin{pspicture*}(0,0)(#1,#2)
	
	\psgrid[gridwidth=0.3pt,
		gridlabels=0,
		subgriddiv=10,
		subgridcolor=black,
		subgridwidth=0.05pt](0,0)(21,29.7) % il faut \'ere sr
				% que \'e d\'easse, sinon il y a des soucis avec
				% des lignes qui ne vont pas jusqu'au bout
				% \'ecause des arrondis entier de multido
				% pspicture* coupe aux bonnes dimensions
	
	% Grille de 5cm en 5cm
	\psgrid[xunit=5,yunit=5,gridwidth=0.5pt,
		gridlabels=0,
		subgriddiv=0](0,0)(#1,#2)%
		
	\psline[linewidth=1.5pt](0,0)(0,#2)(#1,#2)(#1,0)(0,0)	
	\end{pspicture*}
	}





%%%%%%%%%%%%

%%%%%%    XCAS

%%%%%%%%%%

\IfFileExists{bold-extra.sty}{\RequirePackage{bold-extra}}{}
\IfFileExists{luximono.sty}{\RequirePackage[scaled=0.85]{luximono}}{}
\RequirePackage{fancyvrb}
\DefineVerbatimEnvironment{boxedverbatim}{Verbatim}{gobble=2,frame=single,framesep=4mm,label=\textit{\small
    R\'eponse du logiciel}}



% \lstloadlanguages{XCAS}
% \lstset{numbers=none,language=XCAS,xleftmargin=10pt,%
% keywordstyle =\color{0.2white}\bfseries\usefont{OT1}{cmtt}{b}{n},basicstyle=\ttfamily,commentstyle=\normalfont\scriptsize\itshape,%\small,
%     backgroundcolor=\color{0.9white},breaklines=true}
   


% \makeatletter
% \renewcommand\@makefntext[1]{%
% \noindent\makebox[1.8em][r]{\@thefnmark \ }#1}
% \makeatother



% \newlength{\moitie}
% \newlength{\longmot}
% \newenvironment{BoxedVerbatim}[1][(\linewidth)/2-1em]{%
%   \setlength{\margegauche}{#1}
% \setlength{\moitie}{(\widthof{\texttt{R\'eponse du logiciel}})/2}%
% \setlength{\longmot}{\widthof{\texttt{R\'eponse du logiciel}}} 
%  \par
%   \begin{lrbox}{\dangerbox}
%     \begin{minipage}{\linewidth-2\marge-2\pslinewidth}
%       \par\vspace*{\margehaut}  %\fontfamily{ccm}\selectfont
% }
% {%
%     \end{minipage}%
%   \end{lrbox}
%   % Affiche le texte dans un cadre en couleur.
%   \rput[tl](0,0){%
%     \psframebox[framesep=\marge,linewidth=.5\pslinewidth]{%
%       \usebox{\dangerbox}%
%     }%
%   }%
%  %  Efface le trait juste ce qu'il faut
%   \rput(\marge,0){%
%     \rput(\margegauche,0){%
%       \psline[linewidth=2\pslinewidth,linecolor=white](-\moitie,0)(\moitie,0)
%     }
%   }
% \rput(\marge,0){\rput(\margegauche,0){{\ttfamily \itshape \small R\'eponse du logiciel}}}
%   % R\'eserve la place verticale pour la suite
%  \par
%   \setlength{\marge}{\ht\dangerbox+\dp\dangerbox+2\marge+\extraline}
%   \vspace{\marge}
% }







% \lstset{numbers=none,language=XCAS,xleftmargin=10pt,%
% keywordstyle =\color{0.2white}\usefont{OT1}{cmtt}{b}{n},basicstyle=\ttfamily,commentstyle=\normalfont\scriptsize\itshape,
%     backgroundcolor=\color{0.8white},breaklines=true}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  appel xcas dans latex


% \RequirePackage{moreverb,fancyvrb}


% \makeatletter
% %commande pour faire appel \`a giac
% \newcommand{\executGiac}[1]{
% %\immediate\write18{@echo off}
% \immediate\write18{giac  <#1 } }
% \makeatother




% \begin{verbatimwrite}{Xcas.in}
% maple_mode(0);
% Sortie:=fopen("xcas.tex");
% read("xcas.out");
% simplify(ans());
% Resultat:=cat(latex(ans()[0]));
% fprint(Sortie,Unquoted,Resultat);
% fclose(Sortie);
% \end{verbatimwrite}



% \newenvironment{xcas}
% {\VerbatimEnvironment\begin{VerbatimOut}{xcas.out}}
% {\end{VerbatimOut}
%            \executGiac{Xcas.in}
%             $\input{xcas}$\ }

% \newenvironment{Xcas}
% {\VerbatimEnvironment\begin{VerbatimOut}{xcas.out}}
% {\end{VerbatimOut}
%            \executGiac{Xcas.in}
%             \[\input{xcas}\]}

\newcommand\Prog[1]{{\bfseries\ttfamily #1}}
%


\newcommand{\Oij}{\oij}
\newcommand{\Ouv}{\ouv}
\newcommand{\Oijk}{\oijk}

%\newcommand{\C}{\bbc}
\renewcommand{\vect}{\ve}


\ifthenelse{\boolean{beamer}}{}
{%
% petits environnements bclogo

\newcounter{remar}\newcounter{exem}\newcounter{definit}\newcounter{propri}
\newcounter{theor}\newcounter{retenir}\newcounter{pbm}


\renewenvironment{DANGER}[1][\bfseries\fontfamily{ugq}\selectfont Attention !]{%
\begin{bclogo}[logo=\bctakecare,arrondi=0.05,couleur=white]{\color{blue}\bfseries\fontfamily{ugq}\selectfont #1}}
{\end{bclogo}}

\renewenvironment{Idee}[1]{%
\begin{bclogo}[logo=\bclampe,arrondi=0.05,couleur=white]{\color{blue}\bfseries\fontfamily{ugq}\selectfont  #1}}
{\end{bclogo}}


\newenvironment{Remarque}[1][]{%
\refstepcounter{remar}
\begin{bclogo}[logo=\bcnote,arrondi=0.05,couleur=white]{\color{blue}\bfseries\fontfamily{ugq}\selectfont  Remarque  \NumLecon \theremar\ : #1}}
{\end{bclogo}}


\newenvironment{Retenir}[1][]{%
\refstepcounter{retenir}
\begin{bclogo}[logo=\bcnote,arrondi=0.05,couleur=white]{\color{blue}\bfseries\fontfamily{ugq}\selectfont    \`A retenir (\theretenir)\ : #1}}
{\end{bclogo}}


\newenvironment{Exemple}[1][]{%
\refstepcounter{exem}
\begin{bclogo}[logo=\bcpanchant,arrondi=0.05,couleur=white]{\color{blue}\bfseries\fontfamily{ugq}\selectfont    Exemple  \NumLecon  \theexem\ : #1}}
{\end{bclogo}}



\newenvironment{Definition}[1][]{%
\refstepcounter{definit}
\begin{bclogo}[ombre=true,logo=\bcbook,arrondi=0.05,couleur=green!20]{\color{blue}\bfseries\fontfamily{ugq}\selectfont    D\'efinition \NumLecon \thedefinit\ : #1}}
{\end{bclogo}}




\newenvironment{Propriete}[1][]{%
\refstepcounter{propri}
\begin{bclogo}[ombre=true,logo=\bccoeur,arrondi=0.05,couleur=green!20]{\color{blue}\bfseries\fontfamily{ugq}\selectfont    Propri\'et\'e \NumLecon \thepropri\ : #1}}
{\end{bclogo}}




\newenvironment{Theoreme}[1][]{%
\refstepcounter{theor}
\begin{bclogo}[ombre=true,logo=\bctrefle,arrondi=0.05,couleur=green!20]{\color{blue}\bfseries\fontfamily{ugq}\selectfont Th\'eor\`eme
  \NumLecon  \thetheor\ : #1}}
{\end{bclogo}}




\newenvironment{Probleme}[1][]{%
\refstepcounter{pbm}
\begin{minipage}{0.9\linewidth}
\begin{bclogo}[ombre=true,logo=\bcsmbh,arrondi=0.05,couleur=green!20]{\color{blue}\bfseries\fontfamily{ugq}\selectfont    Exploration \thepbm\ : #1}}
{\end{bclogo}
\end{minipage}
\vspace{0.35cm}
}
}


%%%%%%%%%%%%%%
%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                MATRICES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





%%
%% Zi end
