%=========================================
%Macros personnelles
%christophe.poulain@melusine.eu.org
%création : 25 Septembre 1999
%dernière modification : 07 Avril 2003
%=========================================
\newtheorem{ppte}{Propriété}
\newtheorem{theo}{Théorème}
\newtheorem{defi}{Définition}
\newtheorem{lemme}{Lemme}
\newtheorem{coro}{Corollaire}
\newtheorem{prop}{Proposition}
\newtheorem{reg}{Règle}
\newtheorem{conj}{Conjecture}
\newtheorem{remar}{Remarque}
\newtheorem{exem}{Exemple}

\newcommand{\rema}{\underline{Remarque} }
\newcommand{\exe}{\underline{Exemple} }
\newcommand{\pre}{\underline{Preuve}}
\newcommand{\cas}{\underline{Cas particulier}}
\newcommand{\cass}{\underline{Cas particuliers}}
\newcommand{\Not}{\underline{Notation} }
\newcommand{\Si}{\underline{Si} }
\newcommand{\si}{\underline{si} }
\newcommand{\alors}{\underline{alors} }
\newcommand{\cons}{\underline{Conséquence}}
\newcommand{\Comme}{\underline{Comme} }
\newcommand{\comme}{\underline{comme} }


\def\qed{\hfill\raise -2pt\hbox{\vrule\vbox to 10pt{\hrule width4pt\vfill\hrule}\vrule}}
\def\cqfd{\hfill\unskip\kern 6pt\penalty 500\qed\par}

\catcode`\@=11
\def\Eqalign#1{\null\,\vcenter{\openup\jot\m@th\ialign{
\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
&&\quad\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$
\hfil\crcr #1\crcr}}\,}
\catcode`\@=12

\newcommand{\vecteur}[1]
{\overrightarrow{\strut #1}}

\font\tenbb=msbm10
\font\sevenbb=msbm7
\font\fivebb=msbm5
\newfam\bbfam
\textfont\bbfam=\tenbb
\scriptfont\bbfam=\sevenbb
\scriptscriptfont\bbfam=\fivebb
\def\bb{\fam\bbfam\tenbb}
\let\oldbb=\bb
\def\bb #1{{\oldbb #1}}

\def\tvi{\vrule height 12pt depth 5pt width 0pt}
\def\tvj{\vrule height 12pt depth 5pt width 1pt}
\def\hfq{\hfill\,\,}
\def\cc#1{\hfq #1\hfq}
\def\tv{\tvi\vrule}
\def\tw{\tvj\vrule}
\def\traithorizontal{\noalign{\hrule}}
\def\traithorizontale{\noalign{\hrule height 1pt}}

\newcommand{\encadre}[1]
{\begin{center}
\fbox{\begin{minipage}{\linewidth}
{#1}
\end{minipage}}
\end{center}
}

\def\pgcd{\mathop{\rm PGCD}\nolimits}
\def\ppcm{\mathop{\rm ppcm}\nolimits}

\def\cut{{}\hfill\cr \hfill{}}

\newcommand{\biindice}[3]%
{
\renewcommand{\arraystretch}{0.5}
\begin{array}[t]{c}
#1\\
{\scriptstyle #2}\\
{\scriptstyle #3}
\end{array}
\renewcommand{\arraystretch}{1}
}

\newlength{\ltxt}
\newcommand{\compo}[4]{
\setlength{\ltxt}{\linewidth}
\setbox#1=\hbox{\includegraphics[scale=#3]{#2.#1}}
\addtolength{\ltxt}{-\wd#1}
\addtolength{\ltxt}{-10pt}
\begin{minipage}{\wd#1}
\includegraphics[scale=#3]{#2.#1}
\end{minipage}
\hfill
\begin{minipage}{\ltxt}
#4
\end{minipage}
}

\newlength{\lntxt}
\newcommand{\Compo}[4]{
\setlength{\lntxt}{\linewidth}
\setbox#1=\hbox{\includegraphics[scale=#3]{#2}}
\addtolength{\lntxt}{-\wd#1}
\addtolength{\lntxt}{-10pt}
\begin{minipage}{\wd#1}
\includegraphics[scale=#3]{#2}
\end{minipage}
\hfill
\begin{minipage}{\lntxt}
#4
\end{minipage}
}

\newlength{\lnttxt}
\newcommand{\dispo}[3]{
\setlength{\lnttxt}{\linewidth}
\setbox#1=\hbox{#2}
\addtolength{\lnttxt}{-\wd#1}
\addtolength{\lnttxt}{-20pt}
\begin{minipage}{\wd#1}
#2
\end{minipage}
\hfill
\begin{minipage}{\lnttxt}
#3
\end{minipage}
}

\newlength{\lttxt}
\newcommand{\Dispo}[3]{
\setlength{\lttxt}{\linewidth}
\setbox#1=\hbox{#2}
\addtolength{\lttxt}{-\wd#1}
\begin{minipage}{\lttxt}
#3
\end{minipage}
\hfill
#2\\
}

\newcounter{num}[section]
\newcommand{\exo}{\addtocounter{num}{1}
\par
\par\underline{\bf Exercice~\thenum} }

\newcounter{nume}[section]
\newcommand{\EXo}{\addtocounter{nume}{1}
\par
\par\underline{\bf Exercice~\thenume :} }

\newcommand{\titrage}[2]{
{\Large #1}\hfill#2
\par\rule[+6pt]{\linewidth}{0.5mm}
\par
}

\newcommand{\titragedossier}[1]{
{\small #1}\hfill{\small www.melusine.eu.org/syracuse/poulecl/}
\par\rule[+6pt]{\linewidth}{0.5mm}
\par
}

\newcommand{\partie}[2]{
\begin{center}
\begin{minipage}{#1pt}
\begin{center}
\boxput*(0,0){\colorbox{white}{#2}}
{\rule{\linewidth}{0.5mm}}
\end{center}
\end{minipage}
\end{center}
\par
}

\newenvironment{myenumerate}{
\renewcommand{\theenumi}{\arabic{enumi}}
\def\labelenumi{{\bf \theenumi /}}
\begin{enumerate}}{\end{enumerate}}

%dessintexte{image}{échelle}{texte}
%Macro du à Denis Lefur.
\newlength{\lnntt}
\newcommand{\dessintexte}[3]{
\setlength{\lnntt}{\linewidth}
\setbox2=\hbox{\includegraphics[scale=#2]{#1}}
\addtolength{\lnntt}{-\wd2}
\addtolength{\lnntt}{-50pt}
\begin{minipage}{\wd2}
\includegraphics[scale=#2]{#1}
\end{minipage}
\hfill
\begin{minipage}{\lnntt}
#3
\end{minipage}
}

%Macro du à Anthony Phan
\newdimen\shadeshift\shadeshift=1pt
\def\shadedtext#1{{\setbox0=\hbox{#1}\leavevmode
        \vtop to 0pt{\rlap{\special{color push rgb 0.75 0.75 0.75}%
        \kern0.1em\lower0.1em\copy0
        \special{color pop}}\vss}\box0}}%
\long\def\shadedparagraph#1{{\setbox0=\vbox{\hsize=\hsize#1}%
        \noindent\leavevmode
        \vtop to 0pt{\rlap{\special{color push rgb 0.75 0.75 0.75}%
        \kern0.1em\lower0.1em\copy0
        \special{color pop}}\vss}\box0\par}}%

%macro pour les exercices.
\newcounter{numer}[section]
%enoncé seul
\newcommand{\EXO}[1]{\addtocounter{numer}{1}
\par
\underline{\bf Exercice~\thenumer}\input{#1}
}
%enoncé avec solution
\newcommand{\EXOSOL}[1]{\addtocounter{numer}{1}
\par
\begin{leftbar}
\underline{\bf Exercice~\thenumer}\par\input{#1}
\end{leftbar}
\par
\IfFileExists{#1cor}{
\underline{\shadedtext{Corrigé de l'exercice~\thenumer}}\par\input{#1cor}
}{\underline{\shadedtext{Corrigé de l'exercice~\thenumer}} Non disponible}}
%solution seule
\newcommand{\SOL}[1]{\addtocounter{numer}{1}
\par
\underline{\shadedtext{Corrigé de l'exercice~\thenumer}}\par\input{#1cor}
}