\input{../tex/entete.tex}


%%%%%%%% TODO
%%% aligner les « soit » avec barre verticale et [t] (idem pour certains «
%%% alors »).

%%% retour à la ligne ou non après une def / thm /prop ? pas après nott, rmq
%%% différents niveaux de prop / def selon l'importance.
%%% refaire tous les styles : cadre, bords arrondis, titre en cartouche, fond
%%% coloré dans le cartouche pour les plus importants (1 ou 2 par paragraphe)
%%% et fond de la prop coloré pour les incontournables.
%%% en cas de rappel (thm & cie) : lien hypertexte + numéro ad hoc
%%% thm de cauchy, csq du théorème : argument optionnel pour modifier
%%% l'intitulé en gras.
% - surligner les passages importants (pgf ?)
\def\sli{\null}        % souligner à l'oral (beamer), ne pas inscrire le mot
                   % immédiatement (demander à un élève).
\def\rmqorale{\vphantom}   % Remarque orale : grisée ? on/off ? info bulle ?

%%%%%%%% /TODO


%%%%%% Théorèmes
%\theoremstyle{definition}\theorembodyfont{\rm}
\newtheorem{exo}{Exercice}
\newtheorem{deftn}{Définition}
\newtheorem{theo}{Théorème}
\newtheorem{lemme}[theo]{Lemme}
\newtheorem{prop}[theo]{Propriété}
\newtheorem{dprop}[theo]{Définition -- Propriété}
\newtheorem{cor}[theo]{Corollaire}
\newtheorem{nott}{Notation}
\newtheorem{vocab}[nott]{Vocabulaire}
\newtheorem{rmq}{Remarque}
\newtheorem{methode}{Méthode}

\newenvironment{rmqex}{\noindent {\bf Remarque}} % Remarque dans un exemple
                                % (TODO : barre verticale à gauche pour
                                % identifier ce qui est « remarque », mais léger)

\newtheorem{csq}{Conséquence}
\newtheorem{ex}{Exemple}          % TODO : exemples, meme numérotation.
\newtheorem{exs}[ex]{Exemples}          % TODO : exemples, meme numérotation.
\newtheorem{c-ex}[ex]{Contre-exemple}
\newtheorem{appli}{Application}
\newtheorem{rappel}{Rappel}
% Environnements encadrés
\newenvironment{deftnE}{\renewcommand*{\arraystretch}{0}\begin{tabular}{|p{\linewidth}|}\hline\begin{deftn}}
{\end{deftn}\\\hline\end{tabular}\bigskip\\}
\newenvironment{theoE}{\renewcommand*{\arraystretch}{0}\begin{tabular}{|p{\linewidth}|}\hline\begin{theo}}
{\end{theo}\\\hline\end{tabular}\bigskip\\}
\newenvironment{corE}{\renewcommand*{\arraystretch}{0}\begin{tabular}{|p{\linewidth}|}\hline\begin{cor}}
{\end{cor}\\\hline\end{tabular}\bigskip\\}
\newenvironment{propE}{\renewcommand*{\arraystretch}{0}\begin{tabular}{|p{\linewidth}|}\hline\begin{prop}}
{\end{prop}\\\hline\end{tabular}\bigskip\\}
\newenvironment{nottE}{\renewcommand*{\arraystretch}{0}\begin{tabular}{|p{\linewidth}|}\hline\begin{nott}}
{\end{nott}\\\hline\end{tabular}\bigskip\\}
%%% \def\deftnE#1\end#2{\fbox{\parbox[xcm]{#1}}}

%%% D\'efinition des environnements "demo", "sol" etc
%\newenvironment{sol}{\noindent\textbf{Solution.}}{\hfill $\Box$\vspace{5mm}}
\newenvironment{demop}{\noindent\textbf{Démonstration.}}{}
\newenvironment{demo}{\noindent\textbf{Démonstration.}}{\hfill $\Box$\vspace{5mm}}
\newenvironment{demoth}[1]{\noindent\textbf{Démonstration du théorème \ref{#1} (unicité).}}{\hfill $\Box$\vspace{5mm}}
\newenvironment{demol}[1]{\noindent\textbf{Démonstration du lemme \ref{#1}.}}{\hfill $\Box$\vspace{5mm}}
\newenvironment{csqg}{\noindent\textbf{Conséquences graphiques.}}{}


%%%%%% Section et subsection comme dans le cours. %%%%%%
\setcounter{secnumdepth}{4}
\renewcommand{\thesection}{\Roman{section})}
\renewcommand{\thesubsection}{\Alph{subsection})}
%\renewcommand{\thesubsection}{\arabic{subsection})}
\renewcommand{\thesubsubsection}{\arabic{subsubsection})}
\renewcommand{\theparagraph}{\alph{paragraph})}
\makeatletter
\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
    -.2ex}{2.3ex plus .2ex}{\Large\bf}}
\def\subsection{\@startsection{subsection}{2}{5ex}{-3.25ex plus -1ex minus 
   -.2ex}{1.5ex plus .2ex}{\large\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{10ex}{-3.25ex plus
-1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
\def\paragraph{\@startsection
     {paragraph}{4}{15ex}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}{\normalsize\bf}}
% Raccourci :
\newcommand{\subsubsubsection}[1]{\paragraph{#1}}
%\def\subparagraph{\@startsection
%     {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
%     .2ex}{-1em}{\normalsize\bf}}
\makeatother
%%%%%%   %%%%%%  %%%%%%  %%%%%%  %%%%%%   %%%%%%  %%%%%%  %%%%%%

%%%%%% Commentaires & co %%%%%%
\def\bla#1{{\small \color{red} #1}} % Commentaires oraux
\def\blo#1{{\color{blue} #1}} % trous du poly
\def\bloblo{\blue}
\newenvironment{code}{}{} % informatique
%%%%%% Dessins %%%%%%
\newcommand{\cadre}[2]{\fbox{\begin{tabularx}{#1}[t]{c}\vspace{#2}\end{tabularx}}}
\newcommand{\vcadre}[2]{\mbox{\begin{tabularx}{#1}{c}\vspace{#2}\end{tabularx}}}

%%%%%% Table des matieres %%%%%%

% \makeatletter
% \let\vxexo\exo
% \def\exoopt[#1]{\addcontentsline{toc}{subsubsection}{#1}\vxexo[#1]}
% \renewcommand{\exo}{\@ifnextchar[{\exoopt}{\vxexo}}
% \makeatother

