%%% Classe personnelle
%%% A placer dans ~\Library\texmf\tex\latex
\ProvidesClass{personnel}

%%% Chargement de la classe de reference
\LoadClass[12pt,english,french]{article}

%%% Chargement des packages les plus courants
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\RequirePackage{ifthen}
\RequirePackage{shadow}
\RequirePackage{multicol}
\RequirePackage{parskip}
\RequirePackage{geometry}
\RequirePackage{xcolor}
\RequirePackage{chemfig}
\RequirePackage{amsmath,amsfonts,amssymb}
\RequirePackage{frenchmath}
\RequirePackage{siunitx}
\RequirePackage{tikz}
\RequirePackage{pgfplots}
  \pgfplotsset{compat=1.17}
  \usetikzlibrary{shapes}
  \usetikzlibrary{arrows.meta}
  \usetikzlibrary{decorations.markings}
  \usetikzlibrary{arrows}
  \usetikzlibrary{patterns}
\RequirePackage{qrcode}
\RequirePackage[center,explicit]{titlesec}
\RequirePackage{array,multirow,tabularx,booktabs}
\RequirePackage{boxedminipage2e}
\RequirePackage{tcolorbox}
  \tcbuselibrary{breakable}
  \tcbuselibrary{skins}
  \tcbuselibrary{theorems}
\RequirePackage{eurosym}
\RequirePackage{pifont}
\RequirePackage{manfnt}
\RequirePackage{dashundergaps}
\RequirePackage{frcursive}
\RequirePackage{lettrine}
\RequirePackage{wrapfig}
\RequirePackage[english,french]{babel}
\RequirePackage[europeanresistors,straightvoltages,RPvoltages]{circuitikz}
   \usetikzlibrary{babel}
\PassOptionsToPackage{hyphens}{url}
\RequirePackage[pdftex,hidelinks,bookmarksnumbered]{hyperref}
\RequirePackage[babel=true,kerning=true]{microtype}

\newcommand\encercle[1]{%
  \tikz[baseline=(X.base)] 
    \node(X)[draw,shape=circle,inner sep=0]{\strut #1};}

\newcommand{\toucheee}{\rectanglearrondi{\scriptsize{}$\boldsymbol{\mathsf{EE}}$}}

%%% Charges partielles - couleurs personnelles !
\newcommand{\chargepp}{\textcolor{blue}{$\delta+$}}
\newcommand{\chargepn}{\textcolor{red}{$\delta-$}}
\newcommand{\chargepps}{\textcolor{blue}{$\scriptstyle\delta+$}}
\newcommand{\chargepns}{\textcolor{red}{$\scriptstyle\delta-$}}

%%% Pour obtenir la dernière page
\AtEndDocument{\label{Fin}}

\newcommand{\norme}[1]{\left\Vert #1\right\Vert}

%%% chemfig: raccords entre liaisons simples
\setchemfig{atom sep=5ex,bond join=true}

%%% Unités personnalisées pour siunitx
\DeclareSIUnit{\calorie}{cal}
\DeclareSIUnit{\Calorie}{\kilo\calorie}

%%% Réglages hyperref
\hypersetup{pdfauthor={Pierre-Marie Chaurand},
            pdfcreator={LaTeX},
            pdfproducer={LaTeX}}
%            ,
%            pdfborder=0 0 0}

%%% Déclaration des raccourcis SIunit --- Nouvelles unités !
%\sisetup{group-digits=integer,tight-spacing=true,valuesep=\ ,output-decimal-marker={,},separate-uncertainty,detect-all,load-configurations=abbrevations,inter-unit-product=\ensuremath{{}\!\cdot{}\!{}}}
\sisetup{group-digits=integer,tight-spacing=true,output-decimal-marker={,},separate-uncertainty,detect-all,load-configurations=abbrevations,number-unit-product={\ {}},inter-unit-product=\ensuremath{{}\!\cdot{}\!{}}}

\DeclareSIUnit\kWh{kWh}
\DeclareSIUnit\Wh{Wh}
\DeclareSIUnit\wpmpk{\watt\!\cdot\!\meter^{-1}\!\cdot\!\kelvin^{-1}}
\DeclareSIUnit\uacceleration{\meter\!\cdot\!\second^{-2}}
\DeclareSIUnit{\moleparlitre}{\mol\per\liter}
\DeclareSIUnit{\millimoleparlitre}{\milli\mol\per\liter}
\DeclareSIUnit{\anneelumiere}{AL}

%%% Pour Tikz
\tikzset{>={LaTeX[width=2mm,length=2mm]}}
\newcommand{\grossesfleches}{\tikzset{>={LaTeX[width=3mm,length=3mm]}}}
\newcommand{\petitesfleches}{\tikzset{>={LaTeX[width=2mm,length=2mm]}}}

%%% Sources
\newcommand{\fichebacseconde}{\begin{source}Patrice \textsc{Brossard}, {\itshape{}Fiches Bac 2\fup{nde} Physique-Chimie}, Hatier 2015.\end{source}}
\newcommand{\prepabacseconde}{\begin{source}Jacques \textsc{Royer} et Nathalie \textsc{Benguigui}, {\itshape{}Prépabac Cours \& Entraînement 2\fup{nde} Physique-Chimie}, Hatier, janvier 2016.\end{source}}
\newcommand{\centpourcentexosseconde}{\begin{source}Nathalie \textsc{Benguigui}, {\itshape{}100 \%{} Exos 2\fup{nde} Physique-Chimie}, Hatier, juillet 2013.\end{source}}
\newcommand{\belinparisiseconde}{\begin{source}{\itshape{}Physique-chimie 2\fup{nde}}, Belin, collection Parisi.\end{source}}
\newcommand{\bordasseconde}{\begin{source}{\itshape{}Physique-chimie 2\fup{nde}}, Bordas.\end{source}}
\newcommand{\hatierheliumseconde}{\begin{source}{\itshape{}Physique-chimie 2\fup{nde}}, collection Hélium, Hatier.\end{source}}

%%% Exos résolus
\tikzset{positionfleche/.style args={#1}{postaction = decorate,decoration={name=markings,mark=at position #1 with {\arrow[scale=1.25]{latex}}}}}

\definecolor{violetnathan}{rgb}{0.4667,0.2235,0.6157}
\definecolor{violetinternathan}{rgb}{0.2667,0.0235,0.4175}
\definecolor{violetclairnathan}{rgb}{0.894117647059,0.811764705882,0.925490196078}
\definecolor{rougenathan}{rgb}{0.894117647059,0.129411764706,0.180392156863}
\definecolor{orangenathan}{rgb}{0.894117647059,0.454901960784,0.141176470588}
\definecolor{orangeinternathan}{rgb}{0.752941176471,0.313725490196,0}
\definecolor{orangeclairnathan}{rgb}{0.964705882353,0.854901960784,0.639215686275}

\newcommand{\questiondedebut}[2]{%
\begin{tikzpicture}[scale=0.5]
\fill[violetnathan,rounded corners=3] (0.1,0.915)--(0.96,0.915)--(0.8,0.1)--(0.1,0.1)--cycle;
\fill[white] (0.435,0.2375) circle(0.07);
\fill[white] (0.29,0.72) .. controls (0.5,0.87) and (0.6,0.77) .. (0.625,0.72) .. controls (0.69,0.56) and (0.59,0.54) .. (0.54,0.5) .. controls (0.46,0.44) and (0.46,0.44) .. (0.47,0.35)--(0.4,0.35) .. controls (0.36,0.51) and (0.36,0.51) .. (0.45,0.58) .. controls (0.53,0.63) and (0.5,0.69) .. (0.41,0.64)--(0.34,0.6)--cycle;
\end{tikzpicture}
\textcolor{violetnathan}{\textbf{#1}} \hfill(p.~#2)}

\newcommand{\exonathan}[1]{\colorbox{violetnathan}{\textcolor{white}{\textbf{\arabic{numexos}}}} \textcolor{violetnathan}{\textbf{#1}}\stepcounter{numexos}}
\newcommand{\exonathanresolu}[2]{\colorbox{violetclairnathan}{\textcolor{violetnathan}{\textbf{\arabic{numexos}}}} \textcolor{violetnathan}{\textbf{#1}}\stepcounter{numexos} \hfill $\leadsto$ {\itshape{}Livre page #2.}}

\newcommand{\problemenathan}[1]{\colorbox{orangenathan}{\textcolor{white}{\textbf{\arabic{numexos}}}} \textcolor{orangenathan}{\textbf{#1}}\stepcounter{numexos}}
\newcommand{\problemenathanresolu}[2]{\colorbox{orangeclairnathan}{\textcolor{orangenathan}{\textbf{\arabic{numexos}}}} \textcolor{orangenathan}{\textbf{#1}}\stepcounter{numexos} \hfill $\leadsto$ {\itshape{}Livre page #2.}}

\newcommand{\titrenathan}[2]{
  \sansfilet
  \setlength{\columnsep}{1cm}
  \imagedecaleedeux{-0.625cm}{-1.6cm}{21cm}{Titre}
  \setcounter{numexos}{1}
  \lhead{}
  \chead{}
  \rhead{}
  \renewcommand{\headrulewidth}{0pt}
  \lfoot{Corrigés du chapitre #2 du livre}
  \setcounter{chapitre}{#2}
  \cfoot{Page \thepage{} sur \pageref{Fin}}
  \rfoot{#1}
  \renewcommand{\footrulewidth}{0.4pt}
  \lignemoins}

\newcommand{\cinqminuteschrono}{\imagedecalee{0.25cm}{0.5}{CinqMinutesChrono}}

\newcommand{\sectionnathan}[1]{%
  \begin{tikzpicture}[scale=0.9]
  \fill[violetnathan] (0,0)--(0.2,0.2)--(0,0.4)--cycle;
  \end{tikzpicture}
  %
  {\Large\textcolor{rougenathan}{\textbf{#1}}}}

\newcommand{\lesquestionsdedebut}{%
\begin{tikzpicture}
\fill[rounded corners=5pt,violetnathan] (0.3,0.1) rectangle (9.35,0.7);
\fill[rounded corners=7pt,violetinternathan,fill opacity=0.5] (0,0) rectangle (0.6,0.8);
\draw (4.9,0.4) node{\textcolor{white}{{\textbf{\textsc{Questions de début de chapitre}}}}};
\end{tikzpicture}}

\newcommand{\mobilisersesconnaissances}{%
\begin{tikzpicture}
\fill[rounded corners=5pt,violetnathan] (0.3,0.1) rectangle (9.35,0.7);
\fill[rounded corners=7pt,violetinternathan,fill opacity=0.5] (0,0) rectangle (0.6,0.8);
\draw (4.9,0.4) node{\textcolor{white}{{\textbf{\textsc{Mobiliser ses connaissances}}}}};
\end{tikzpicture}}

\newcommand{\utilisersescompetences}{%
\begin{tikzpicture}
\fill[rounded corners=5pt,orangenathan] (0.3,0.1) rectangle (9.35,0.7);
\fill[rounded corners=7pt,orangeinternathan,fill opacity=0.5] (0,0) rectangle (0.6,0.8);
\draw (4.9,0.442) node{\textcolor{white}{{\textbf{\textsc{Utiliser ses compétences}}}}};
\end{tikzpicture}}

\newcommand{\exercicesdentrainement}[1]{%
\begin{tikzpicture}
\fill[rounded corners=5pt,violetnathan] (0.3,0.1) rectangle (9.35,0.7);
\fill[rounded corners=7pt,violetinternathan,fill opacity=0.5] (0,0) rectangle (0.6,0.8);
\draw (4.9,0.45) node{\textcolor{white}{{\textbf{\textsc{Exercices d'entraînement}}}}};
\end{tikzpicture}

\demilignemoins
\begin{center}
{\itshape{}N'oubliez pas l'exercice résolu type page #1!}
\end{center}}

%%% Avec des entêtes
\newcommand{\pagelongue}{\pagestyle{empty}\geometry{a4paper,left=0.5cm,right=0.5cm,top=0.5cm,bottom=0.5cm,paperwidth=10.37cm,paperheight=16383pt}}

\newcommand{\activites}{%
\geometry{a4paper,scale=0.94,centering,includefoot,nomarginpar} % showframe
%\filet
\setlength{\columnsep}{6.35mm}
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\activitesasix}{%
\geometry{a6paper,scale=0.94,centering,includefoot,nomarginpar} % showframe
%\filet
\setlength{\columnsep}{5mm}
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\nouvelleactivites}{%
\newgeometry{scale=0.94,centering,includefoot,nomarginpar} % showframe
%\filet
\setlength{\columnsep}{5mm}
\pagestyle{fancy}}

\newcommand{\activiteslisible}{%
\newgeometry{centering,includefoot,nomarginpar} % showframe
%\filet
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\devoirlisible}{%
\newgeometry{height=26cm,centering,includefoot,nomarginpar} % showframe
%\filet
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\devoirlarge}{%
\newgeometry{scale=0.87,centering,includefoot,nomarginpar} % showframe
%\filet
\setlength{\columnsep}{6.86mm} % 6.35/0.87*0.94 = 6.86091954023
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\colle}{%
\usepackage{fancyhdr}
\pagestyle{fancy}}

% renew dans le texte et pas en préambule
\newcommand{\correctioncolle}{%
\newgeometry{margin=6.35mm,includefoot,includehead}
\pagestyle{fancy}
\fancyhfoffset[E,O]{0pt}
\filet
\setlenght{\columnsep}{6.35mm}}

\newcommand{\titrecolle}[2]{%
\newpage
\setcounter{page}{1}
\lhead{#1}
\rhead{PCSI}
\chead{Lycée Lafayette}
\renewcommand{\headrulewidth}{0.4pt}
\lfoot{#2}
\rfoot{Page \thepage{}}
\cfoot{P.-M. \textsc{Chaurand}}
\renewcommand{\footrulewidth}{0.4pt}
\section*{#1 -- #2}}

\newcommand{\laboratoire}{%
  \sansfilet
  \setlength{\columnsep}{1cm}
  \usepackage{fancyhdr}
  \pagestyle{fancy}}

\newcommand{\titrelaboratoire}[3]{%
  \newpage
  \setcounter{page}{1}
  \lhead{TP #2}
  \chead{Lycée Jeanne d'Arc}
  \rhead{Classe de #1}
  \renewcommand{\headrulewidth}{0.4pt}
  \lfoot{#3}
  \cfoot{P.-M. \textsc{Chaurand}}
  \rfoot{Programme 2019}
  \renewcommand{\footrulewidth}{0.4pt}
  \section*{#1 -- TP #2 \\ #3}
  \ligneplus}

\newcommand{\pageaccompagnement}{%
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\pagecompetences}{%
\newgeometry{scale=0.94,centering,includefoot,includehead,nomarginpar} % showframe
%\filet
\setlength{\columnsep}{6.35mm}
\usepackage{fancyhdr}
\pagestyle{fancy}}

\newcommand{\titreaccompagnement}[4]{%
\newpage
\setcounter{page}{1}
\lhead{Chapitre #2}
\rhead{AP}
\chead{Lycée Jeanne d'Arc}
\renewcommand{\headrulewidth}{0.4pt}
\lfoot{Méthode #4}
\rfoot{Page \thepage{}}
\cfoot{P.-M. \textsc{Chaurand}}
\renewcommand{\footrulewidth}{0.4pt}

\section*{Chapitre #2 -- #1 \\ Méthode #4 -- #3}}

\newcommand{\titrecompetences}[4]{%
\newpage
\setcounter{page}{1}
\lhead{Chapitre #2}
\rhead{AP}
\chead{Lycée Jeanne d'Arc}
\renewcommand{\headrulewidth}{0.4pt}
\lfoot{Méthode #4}
\rfoot{Page \thepage{}}
\cfoot{P.-M. \textsc{Chaurand}}
\renewcommand{\footrulewidth}{0.4pt}

\begin{center}
{\bfseries{}Chapitre #2 -- #1 \\ Méthode #4 -- #3}
\end{center}}

\newcommand{\titreactivitessimple}[3]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{Fiche #1}
\setcounter{chapitre}{#1}
\cfoot{Page \thepage{} sur \pageref{Fin}}
\rfoot{P.-M. \textsc{Chaurand}}
\renewcommand{\footrulewidth}{0.4pt}

\titreauto{#2 -- Fiche #1}{#3}}

\newcommand{\titreactivitesn}[2]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{#1}
\cfoot{Page \thepage{} sur \pageref{Fin}}
\rfoot{P.-M. \textsc{Chaurand}}
\renewcommand{\footrulewidth}{0.4pt}

\titreauto{#1}{#2}}

\newcommand{\titrelegende}[3]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\cfoot{#1 \no{}#2}
\setcounter{chapitre}{#2}
\rfoot{Page \thepage{} sur \pageref{Fin}}
\lfoot{P.-M. \textsc{Chaurand}}
\renewcommand{\footrulewidth}{0.4pt}

\titreauto{#1 \no{}#2}{#3}}

\newcommand{\titreactivites}[4]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{Chapitre #2}
\setcounter{chapitre}{#2}
\cfoot{P.-M. \textsc{Chaurand} -- Page \thepage{} sur \pageref{Fin}}
\rfoot{Séance #4}
\renewcommand{\footrulewidth}{0.4pt}

\titreauto{#1\ chapitre #2}{#3 -- Séance #4}}

\newcommand{\titreactivitespetit}[4]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{Chapitre #2}
\setcounter{chapitre}{#2}
\cfoot{Page \thepage{} sur \pageref{Fin}}
\rfoot{Séance #4}
\renewcommand{\footrulewidth}{0.4pt}

\titreautopetit{#1\ chapitre #2}{#3 -- Séance #4}}

\newcommand{\titreactivitesmps}[4]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\lfoot{Partie #2}
\setcounter{chapitre}{#2}
\cfoot{P.-M. \textsc{Chaurand} -- Page \thepage{} sur \pageref{Fin}}
\rfoot{Séance #4}
\renewcommand{\footrulewidth}{0.4pt}

\titreauto{#1\ Partie #2}{#3 -- Séance #4}}

\newcommand{\titreactivitespe}[3]{%
\lhead{}
\chead{}
\rhead{}
\renewcommand{\headrulewidth}{0pt}
\setcounter{chapitre}{#2}
\lfoot{Séance #2}
\cfoot{P.-M. \textsc{Chaurand}}
\rfoot{Page \thepage{} sur \pageref{Fin}}
\renewcommand{\footrulewidth}{0.4pt}

\titreauto{#1\ \no{}#2}{#3}}

%%% Sujet d'oral du Bac
\newcommand{\oralbac}[6]{%
{\Large
\begin{tabular}{@{}|@{}c@{}|@{}c@{}|@{}}
\hline
  \begin{tabular}[t]{@{}p{0.5\linewidth}@{}}
    \begin{tabular}[t]{p{0.94\linewidth}}
    \begin{123item}
    \restaure{123num}
    \item #1
    \sauve{123num}
    \end{123item}
    \end{tabular}
  \end{tabular}
&  
  \begin{tabular}[t]{@{}p{0.5\linewidth}@{}}
    \begin{tabular}[t]{p{0.94\linewidth}}
    \mbox{} \\
    \textbf{QRC:} #2 \\
    \mbox{} \\
    \end{tabular} \\
  \hline
    \begin{tabular}[t]{p{0.94\linewidth}}
    \mbox{} \\
    \textbf{QCM (un ou plusieurs choix sont possibles)}√ä\\
    \begin{bacitem}
    \item #3
    \item #4
    \item #5
    \item #6
    \end{bacitem}
    \end{tabular} \\
  \end{tabular} \\
\hline
\end{tabular}}}

%%% Dimensionnement des pages
\newcommand{\pleinepage}{%\sansindent
                         \pagestyle{empty}
                         \geometry{a4paper,margin=6.35mm}
                         \setlength{\columnsep}{6.35mm}
                         \setlength{\columnseprule}{0pt}}
                         
\newcommand{\pleinepageasix}{\pagestyle{empty}
                             \geometry{a6paper,margin=5mm}}
                         
\newcommand{\pleinepagenumeroteeasix}{\geometry{a6paper,margin=5mm,includefoot}}
                         
\newcommand{\pleinepagevideo}{\pagestyle{empty}
                              \geometry{total={12.575cm,7.0734375cm},left=2cm,right=2cm,top=0.25cm,bottom=0.25cm}}
                              % 16/9 = 1.77777777778
                              % 10.575/5.9484 = 1.77778898527
                              % 12.575/16*9 = 7.0734375
                         
\newcommand{\activitesvideo}{%
\geometry{papersize={12.575cm,7.0734375cm},left=2cm,right=2cm,top=0.25cm,bottom=0.25cm}
\usepackage{fancyhdr}
\pagestyle{empty}}

\newcommand{\pleinepagepaysage}{%\sansindent
                         \pagestyle{empty}
                         \geometry{a4paper,landscape,margin=6.35mm}
                         \setlength{\columnsep}{6.35mm}
                         \setlength{\columnseprule}{0pt}}
                         
\newcommand{\pleinepagenumerotee}{%\sansindent
                                  \geometry{a4paper,margin=0.7cm,height=26.6cm,includefoot}
                                  \setlength{\columnsep}{0.714cm} % 0.7cm plus 0.4pt 0.7+0.4/72*2.54 = 0.714111111111
%                                  \setlength{\columnseprule}{0.4pt}
}
                                  
\newcommand{\pleinepagelarge}{%\sansindent
                              \pagestyle{empty}
                              \geometry{a4paper,margin=1.3cm,height=26.6cm}
                              \setlength{\columnsep}{0.91mm}
                              \setlength{\columnseprule}{0pt}}
                              %\filet}

\newcommand{\pleinepagetreslarge}{%\sansindent
                                  \pagestyle{empty}
                                  \geometry{a4paper,margin=2.3cm,height=27.6cm}
                                  \filet}
                                  
\newcommand{\pleinepagenumeroteelarge}{%\sansindent
                                       \geometry{a4paper,margin=1.3cm,height=26.6cm,includefoot}
                                       \filet}
                                       
\newcommand{\pleinepagenumeroteetreslarge}{%\sansindent
                                           \geometry{a4paper,margin=2.3cm,height=26.6cm,includefoot}
                                           \filet}
                                           
\newcommand{\enonce}
  {\geometry{a4paper,margin=0.7cm,top=0.7cm,includefoot}
   %\sansindent
   \sansfilet
   \setlength{\columnsep}{1cm}}
                     
% Même chose mais en renewgeometry
\newcommand{\nouvellepleinepage}
  {\pagestyle{empty}
   \newgeometry{margin=6.35mm}
   \filet}
                                 
\newcommand{\nouvellepleinepagenumerotee}
  {\newgeometry{margin=0.7cm,height=26.6cm,includefoot}
   \filet}
                                          
\newcommand{\nouvellepleinepagelarge}
  {\pagestyle{empty}
   \newgeometry{margin=1.3cm,height=26.6cm}
   \filet}
                                      
\newcommand{\nouvellepleinepagenumeroteelarge}
  {\newgeometry{margin=1.3cm,height=26.6cm,includefoot}
   \filet}
                                               
\newcommand{\nouvelleenonce}
  {\newgeometry{margin=0.7cm,top=0.7cm,includefoot}
   \sansfilet
   \setlength{\columnsep}{1cm}}

%%% Spécial gain de place, une nouvelle commande \section, utilisation \masection
\newcounter{masection}
\setcounter{masection}{0}
\newcommand{\masection}[1]{\noindent\addtocounter{masection}{1}\textbf{\large{\arabic{masection}\quad{}#1}}}

%%% À supprimer progressivement
\newcommand{\dix}[1]{\ensuremath{\times 10^{#1}}}
\newcommand{\adix}[1]{\ensuremath{\!\cdot{}\!10^{#1}}}

\newcommand{\soleil}[1]{
% Soleil
\begin{tikzpicture}[scale=#1]
\draw (0,-1)--(0,1);
\draw (-1,0)--(1,0);
\draw (-0.7071,0.7071)--(0.7071,-0.7071);
\draw (-0.7071,-0.7071)--(0.7071,0.7071);
\draw (-0.692925,-0.287025)--(0.692925,0.287025);
\draw (-0.692925,0.287025)--(0.692925,-0.287025);
\draw (-0.287025,-0.692925)--(0.287025,0.692925);
\draw (-0.287025,0.692925)--(0.287025,-0.692925);
\fill[white] (0,0) circle(0.5);
\draw (0,0) circle(0.5);
\end{tikzpicture}}

%%% Compétences
\newcommand{\svert}{
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0.5,0.5) circle(0.5);
\fill (0.295,0.64) circle(0.07);
\fill (0.705,0.64) circle(0.07);
\draw[thick] (0.1575,0.41)--(0.8425,0.41);
\draw[thick] (0.183,0.41) arc(-169.5:-10.5:0.322);
\end{tikzpicture}}

\newcommand{\sjaune}{
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0.5,0.5) circle(0.5);
\fill (0.295,0.64) circle(0.07);
\fill (0.705,0.64) circle(0.07);
\draw[thick] (0.27,0.29) arc(-135:-45:0.322);
\end{tikzpicture}}

\newcommand{\sorange}{
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0.5,0.5) circle(0.5);
\fill (0.295,0.64) circle(0.07);
\fill (0.705,0.64) circle(0.07);
\draw[thick,domain=0.23:0.78] plot (\x,{cos((\x-0.25)*1450)/30+0.31});
\end{tikzpicture}}

\newcommand{\srouge}{
\begin{tikzpicture}[scale=0.5]
\draw[thick] (0.5,0.5) circle(0.5);
\fill (0.295,0.64) circle(0.07);
\fill (0.705,0.64) circle(0.07);
\draw[thick] (0.27,0.22) arc(135:45:0.322);
\fill (0.298,0.55)--(0.253,0.476)--(0.253,0.455)--(0.258,0.434)--(0.275,0.423)--(0.294,0.419)--(0.316,0.425)--(0.327,0.433)--(0.332,0.45)--(0.336,0.474)--(0.329,0.486);
\end{tikzpicture}}

\newcommand{\evaluationcompetences}{%
\begin{center}
{\renewcommand{\arraystretch}{1.3}
\begin{tabular}{|*{4}{c}|*{4}{c}|}
\hline
\multicolumn{4}{|c|}{Auto-évaluation} & \multicolumn{4}{c|}{évaluation professeur} \\
\hline
\rule{0cm}{0.7cm}\svert & \sjaune & \sorange & \srouge & \svert & \sjaune & \sorange & \srouge \\
\hline
\end{tabular}}
\end{center}}

\newcommand{\evaluationprofesseur}{%
{\renewcommand{\arraystretch}{1.3}
\begin{tabular}{*{4}{c}}
\rule{0cm}{0.7cm}\svert & \sjaune & \sorange & \srouge \\
\end{tabular}}}

%%% Insérer une image
\newcommand{\image}[2]{%
  \begin{center}
  \includegraphics[width=#1\linewidth]{#2}
  \end{center}}

%%% Insérer une image avec du texte autour
%%% Usage : \imagecoulee{r}{6cm}{image}
\newcommand{\imagecoulee}[3]{%
  \begin{wrapfigure}{#1}{#2}
  \lignemoins
  \image{1}{#3}
  \lignemoins
  \end{wrapfigure}}

%%% Insérer une image avec du texte autour
%%% Usage : \imagecouleefigure{Haricots sabre.}{r}{6cm}{Haricot_sabre}
\newcommand{\imagecouleefigure}[4]{%
  \begin{wrapfigure}{#2}{#2}
  \lignemoins
  \imagefigure{#1}{1}{#4}
  \lignemoins
  \end{wrapfigure}}

%%% Insérer une image
\newcommand{\poseimage}[2]{\includegraphics[width=#1\linewidth]{#2}}

%%% Insérer une image
%%% Avec un cadre, centrée
\newtcolorbox{fcadre}{%
  enhanced,
%  breakable,
  frame hidden,
  interior hidden,
  arc=0pt,
  outer arc=0pt,
  borderline={0.4pt}{0pt}{dashed}}
  
\newcommand{\imagecadre}[1]{
  \begin{center}
    \begin{minipage}{\linewidth}
      \begin{fcadre}
      \includegraphics[width=\linewidth]{#1}
      \end{fcadre}
    \end{minipage}
  \end{center}}

\newcommand{\imagecadred}[1]{
    \newpage
    \begin{minipage}{\linewidth}
      \begin{fcadre}
      \includegraphics[width=\linewidth]{#1}
      \end{fcadre}
    \end{minipage}
    \newpage
    \begin{minipage}{\linewidth}
      \begin{fcadre}
      \includegraphics[width=\linewidth]{#1}
      \end{fcadre}
    \end{minipage}
    }

\newcommand{\imagecadrei}[1]{
  \sauve{abcnum}
  \end{abcitem}
  \begin{center}
    \begin{minipage}{\linewidth}
      \begin{fcadre}
      \includegraphics[width=\linewidth]{#1}
      \end{fcadre}
    \end{minipage}
  \end{center}
  \begin{abcitem}
  \restaure{abcnum}}

\newcommand{\imagecadren}[1]{
  \sauve{123num}
  \end{123item}
  \begin{center}
    \begin{minipage}{\linewidth}
      \begin{fcadre}
      \includegraphics[width=\linewidth]{#1}
      \end{fcadre}
    \end{minipage}
  \end{center}
  \begin{123item}
  \restaure{123num}}

%%% Insérer une image
\newcommand{\imagedecalee}[3]{\hspace*{#1}\includegraphics[width=#2\linewidth]{#3}}
\newcommand{\imagedecaleedeux}[4]{\vspace*{#2}\hspace*{#1}\includegraphics[width=#3]{#4}}

%\newcommand{\imagesource}[3]{%
%  \begin{center}
%  \begin{minipage}{#2\linewidth}
%  \includegraphics[width=\linewidth]{#3}
%  \begin{source}
%  #1
%  \end{source}
%  \end{minipage}
%  \end{center}}

\newcommand{\imagenum}[2]{%
  \begin{center}
  \includegraphics[width=#1]{#2}
  \end{center}}

\newcommand{\imagens}[2]{\includegraphics[width=#1]{#2}}

\newcommand{\imagefig}[3]{%
  \begin{center}
  \begin{minipage}{0.98\linewidth}
  \begin{center}
  \includegraphics[width=#2]{#3} % \linewidth
  
  \mapetitecaption{#1}
  \end{center}
  \end{minipage}
  \end{center}}

\newcommand{\imagefigure}[3]{%
  \begin{center}
  \begin{minipage}{0.98\linewidth}
  \begin{center}
  \includegraphics[width=#2\linewidth]{#3} % \linewidth
  
  \mapetitecaption{#1}
  \end{center}
  \end{minipage}
  \end{center}}

\newcommand{\imagefigref}[4]{%
  \begin{center}
  \begin{minipage}{0.98\linewidth}
  \begin{center}
  \includegraphics[width=#3\linewidth]{#4}
  
  \monlabel{#2}
  \mapetitecaption{#1}
  \end{center}
  \end{minipage}
  \end{center}}

%%% Pour insérer un tableau dans un autre tableau (en particulier)
\newcommand{\minitableau}[1]{\begin{tabular}{@{}c@{}}#1 \\ \end{tabular}}

%%% Dérivées partielles et mathématiques
\newcommand{\cqfd}{\ensuremath{\quad\quad\mathrm{c.\,{}q.\,{}f.\,{}d.}}}
\newcommand{\ensemble}[1]{\ensuremath{\mathbf{\lbrace}\,}#1\ensuremath{\,\mathbf{\rbrace}}}
\newcommand{\derive}[2]{\ensuremath{\frac{\mathrm{d}#1}{\mathrm{d}#2}}}
\newcommand{\derivt}[1]{\ensuremath{\frac{\mathrm{d}#1}{\mathrm{d}t}}}
\newcommand{\derivs}[2]{\ensuremath{\frac{\mathrm{d}^{2}#1}{\mathrm{d}#2^{2}}}}
\newcommand{\differentielle}[3]{\ensuremath{\left(\frac{\partial #1}{\partial #2}\right)_{#3}}}
\newcommand{\vardifferentielle}[3]{\ensuremath{\left.\frac{\partial #1}{\partial #2}\right|_{#3}}}
\newcommand{\incertitude}[1]{\ensuremath{\frac{U{}#1}{#1}}}
\newcommand{\et}{\ensuremath{\quad\text{et}\quad}}
\newcommand{\miniet}{\ensuremath{\text{ et }}}
\newcommand{\ou}{\ensuremath{\quad\text{ou}\quad}}
\newcommand{\miniou}{\ensuremath{\text{ ou }}}
\newcommand{\avec}{\ensuremath{\quad\text{avec}\quad}}
\newcommand{\pour}{\ensuremath{\quad\text{pour}\quad}}
\newcommand{\donc}{\ensuremath{\quad\text{donc}\quad}}
\newcommand{\miniavec}{\ensuremath{\text{ avec }}}
\newcommand{\exces}{\ensuremath{\text{Excès}}}
\newcommand{\solvant}{\ensuremath{\text{Solvant}}}
\newcommand{\einitial}{\ensuremath{\text{EI}}}
\newcommand{\ecours}{\ensuremath{\text{Ec}}}
\newcommand{\efinal}{\ensuremath{\text{EF}}}
\newcommand{\emaximal}{\ensuremath{\text{EM}}}
\newcommand{\etheorique}{\ensuremath{\text{ET}}}

%%% Espacements supplémentaires pour les tabular et array
\newcommand{\trespetitarraypetit}{\ensuremath{\rule{0ex}{2.5ex}}} % sans \grand
\newcommand{\petitarraypetit}{\ensuremath{\rule{0ex}{3ex}}} % sans \grand
\newcommand{\petitarray}{\grand\ensuremath{\rule{0ex}{3ex}}} % sans aucune fraction
\newcommand{\moyenarray}{\grand\ensuremath{\rule{0ex}{4ex}}} % pour les simples fractions numériques
\newcommand{\grandarray}{\grand\ensuremath{\rule{0ex}{5ex}}} % pour les fractions avec variables
\newcommand{\assezgrandarray}{\grand\ensuremath{\rule{0ex}{5.5ex}}} % pour une racine carrée en plus d'une fraction
\newcommand{\tresgrandarray}{\grand\ensuremath{\rule{0ex}{6ex}}} % cas exceptionnel

%%% Espace aussi par le bas
\newcommand{\largearray}[1]{\renewcommand{\arraystretch}{0.25}\begin{tabular}{c}#1 \\ \mbox{}\\ \end{tabular}}
\newcommand{\troislignes}[1]{\renewcommand{\arraystretch}{0.8}\begin{tabular}{@{}c@{}} \mbox{} \\ #1 \\ \mbox{} \\ \end{tabular}}
\newcommand{\troiscases}[3]{\renewcommand{\arraystretch}{1.1}\begin{tabular}{@{}c@{}} #1 \\ #2 \\ #3 \\ \end{tabular}}

%%% Sauvegarde et restauration de compteurs
\newcounter{sauvegarde}
\newcommand{\sauve}[1]{\setcounter{sauvegarde}{\arabic{#1}}}
\newcommand{\restaure}[1]{\setcounter{#1}{\arabic{sauvegarde}}}

%%% Quelques définitions supplémentaires
\newcommand{\initial}{\ensuremath{_{\mathrm{i}}}}
\newcommand{\final}{\ensuremath{_{\mathrm{f}}}}
%\newcommand{\remarque}{\underline{Remar}q\underline{ue}: }
\newcommand{\optic}[1]{\ensuremath{\overline{\mathrm{#1}}}}
\newcommand{\mai}[1]{\ensuremath{\frac{1}{\overline{\mathrm{#1}}}}}

%%% Schémas de couleurs

% Nuances de gris
% pour impression noir et blanc
%\title{Nuances de gris}
%\author{Pour impression noir et blanc}
%\date{}

% Schéma de couleurs douces et organiques
% base, principale, accent
% #909090,#6E6E6E,#4B4948

\definecolor{base}{HTML}{909090}
\definecolor{principale}{HTML}{6E6E6E}
\definecolor{accent}{HTML}{4B4948}

% Schéma de couleurs colorées et harmonieuses
% douce, accenttertiaire, accentsecondaire
% #FFA5A5,#A5FFC9,#A5C9FF

\definecolor{douce}{HTML}{FFA5A5}
\definecolor{accenttertiaire}{HTML}{A5FFC9}
\definecolor{accentsecondaire}{HTML}{A5C9FF}

%%% Fonds
\colorlet{fondbase}{base!25}
\colorlet{fondprincipale}{principale!25}
\colorlet{fondaccent}{accent!25}

\colorlet{fonddouce}{douce!25}
\colorlet{fondaccentsecondaire}{accentsecondaire!25}
\colorlet{fondaccenttertiaire}{accenttertiaire!25}

%%% Encadrés de mise en forme
%%% Objectif : indiquer la nature du texte dans le code source

\newtcbox{\rectanglearrondi}{on line,colback=white,colframe=red,left=0mm,right=0mm,top=0mm,bottom=0mm,boxsep=1mm,arc=2mm,borderline={0.5pt}{0mm}{black}}

%%% Encadré définition
%\newtcolorbox{definition}
%  {reset,
%   enhanced jigsaw,
%   colback=fondaccentsecondaire,
%   frame hidden,
%   fonttitle=\sffamily\bfseries\small,
%   boxsep=0pt,
%   top=0.3\baselineskip,
%   bottom=0.4\baselineskip,
%   left=2ex,
%   right=2ex,
%   boxrule=0pt,
%   before upper={\parskip.5\baselineskip plus 2pt\noindent},
%   %breakable,
%   attach boxed title to top left={yshift=-1.3087\baselineskip,
%                                   yshifttext=-1.3087\baselineskip},
%   boxed title style={size=small,
%                      frame hidden,
%                      colback=accentsecondaire},
%   before skip=.4\baselineskip plus 2pt,
%   after skip=.5\baselineskip plus 2pt,
%   adjusted title=Définition}

%%% Encadré propriété
\newtcolorbox{propriete}
  {reset,
   enhanced jigsaw,
   colback=fondbase, % fondaccenttertiaire
   frame hidden,
   fonttitle=\sffamily\bfseries\small,
   boxsep=0pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   boxrule=0pt,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   %breakable,
   attach boxed title to top left={yshift=-1.3087\baselineskip,
                                   yshifttext=-1.3087\baselineskip},
   boxed title style={size=small,
                      frame hidden,
                      colback=base}, % accenttertiaire
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   adjusted title=Propriété}

%%% Encadré conclusion
%\newtcolorbox{conclusion}
%  {reset,
%   enhanced jigsaw,
%   colback=fonddouce, % fondbase
%   frame hidden,
%   fonttitle=\sffamily\bfseries\small,
%   boxsep=0pt,
%   top=0.3\baselineskip,
%   bottom=0.4\baselineskip,
%   left=2ex,
%   right=2ex,
%   boxrule=0pt,
%   before upper={\parskip.5\baselineskip plus 2pt\noindent},
%   %breakable,
%   attach boxed title to top left={yshift=-1.3087\baselineskip,
%                                   yshifttext=-1.3087\baselineskip},
%   boxed title style={size=small,
%                      frame hidden,
%                      colback=douce}, % base
%   before skip=.4\baselineskip plus 2pt,
%   after skip=.5\baselineskip plus 2pt,
%   adjusted title=Conclusion}

%%% Encadré définitions
%%% sans titre
%\newtcolorbox{definitions}
%  {reset,
%   enhanced jigsaw,
%   colback=fondaccentsecondaire,
%   colframe=accentsecondaire,
%   arc=0pt,
%   boxsep=0pt,
%   top=0.5\baselineskip,
%   bottom=0.5\baselineskip,
%   left=2ex,
%   right=2ex,
%   leftrule=1mm,
%   rightrule=0pt,
%   toprule=0pt,
%   bottomrule=0pt,
%   before upper={\parskip.5\baselineskip plus 2pt\noindent},
%   %breakable,
%   before skip=.4\baselineskip plus 2pt,
%   after skip=.5\baselineskip plus 2pt}

%%% Encadré propriétés
%%% sans titre
\newtcolorbox{proprietes}
  {reset,
   enhanced jigsaw,
   colback=fondbase, % fondaccenttertiaire
   colframe=base, % accenttertiaire
   arc=0pt,
   boxsep=0pt,
   top=0.5\baselineskip,
   bottom=0.5\baselineskip,
   left=2ex,
   right=2ex,
   leftrule=1mm,
   rightrule=0pt,
   toprule=0pt,
   bottomrule=0pt,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   %breakable,
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt}

%%% Encadré conclusions
%%% sans titre
\newtcolorbox{conclusions}
  {reset,
   enhanced jigsaw,
   colback=fonddouce, % fondbase
   colframe=douce, % base
   arc=0pt,
   boxsep=0pt,
   top=0.5\baselineskip,
   bottom=0.5\baselineskip,
   left=2ex,
   right=2ex,
   leftrule=1mm,
   rightrule=0pt,
   toprule=0pt,
   bottomrule=0pt,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   %breakable,
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt}

%%% Réglages de la boîte de couleur pour les équations
\tcbset{reset,
        enhanced jigsaw,
        colback=fonddouce, % fondbase
        colframe=douce, % base
        frame hidden,
        boxrule=0pt,
        boxsep=0pt}

\newcommand{\boitedouce}[1]
  {\ensuremath{\tcboxmath{#1}}}

%%% Boîte pour une définition
\newtcolorbox{definition}
  {reset,
   enhanced jigsaw,
   colback=white,
   coltitle=black,
   colframe=black,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=white,
                      coltitle=black},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Définition}


%%% Boîte pour une définition
\newtcolorbox{boitelibre}[1]
  {reset,
   enhanced jigsaw,
   colback=white,
   coltitle=black,
   colframe=black,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=white,
                      coltitle=black},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=#1}

%%% Boîte pour une définition, brekable
\newtcolorbox{definitionb}
  {reset,
   enhanced jigsaw,
   colback=white,
   coltitle=black,
   colframe=black,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=white,
                      coltitle=black},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Définition}

%%% Boîte pour une question, brekable
\newtcolorbox{questionb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Question}

\newtcolorbox{conclusion}
  {reset,
   enhanced jigsaw,
   colback=white,
   coltitle=black,
   colframe=black,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=white,
                      coltitle=black},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Conclusion}

%%% Boîte pour des définitions
\newtcolorbox{definitions}
  {reset,
   enhanced jigsaw,
   colback=white,
   coltitle=black,
   colframe=black,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=white,
                      coltitle=black},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Définitions}

%%% Boîte pour des définitions
\newtcolorbox{definitionsb}
  {reset,
   enhanced jigsaw,
   colback=white,
   coltitle=black,
   colframe=black,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{black},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=white,
                      coltitle=black},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Définitions}

%%% Boîte pour une remarque
\newtcolorbox{remarque}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{principale,
                           dashed},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Remarque}

%%% Boîte pour une remarque, breakable
\newtcolorbox{remarqueb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{principale,
                           dashed},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Remarque}

%%% Boîte pour plusieurs remarques
%%% Boîte pour une remarque
\newtcolorbox{remarques}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{principale,
                           dashed},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Remarques}

%%% Boîte pour plusieurs remarquesb, breakable
%%% Boîte pour une remarque
\newtcolorbox{remarquesb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.4pt}{0mm}{principale,
                           dashed},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Remarques}

%%% Boîte pour un exemple
\newtcolorbox{exemple}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Exemple}

%%% Boîte pour des exemples
\newtcolorbox{exemples}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Exemples}

%%% Boîte pour un exemple
\newtcolorbox{exempleb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Exemple}

%%% Boîte pour un exemple numérotée
\newtcolorbox[auto counter]{exemplen}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
   %breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Exemple~\thetcbcounter}

%%% Boîte pour un exemple numérotée, breakable
\newtcolorbox[auto counter]{exemplenb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Exemple~\thetcbcounter}

%%%% Boîte pour plusieurs exemples
%\newtcolorbox{exemples}
%  {reset,
%   enhanced jigsaw,
%   colback=white,
%   colframe=principale,
%   colbacktitle=principale,
%   fonttitle=\upshape\sffamily\bfseries\footnotesize,
%   boxsep=-1pt,
%   top=0.3\baselineskip,
%   bottom=0.4\baselineskip,
%   left=2ex,
%   right=2ex,
%   frame hidden,
%   before upper={\parskip.5\baselineskip plus 2pt\noindent},
%   borderline={0.6pt}{0mm}{black,
%                           dotted},
%   breakable,
%   attach boxed title to top left={xshift=18pt,
%                                   yshift=-0.575\baselineskip,
%                                   yshifttext=-0.575\baselineskip},
%   boxed title style={size=small,
%                      arc=7pt,
%                      colback=principale,
%                      frame hidden},
%   before skip=.5\baselineskip plus 2pt,
%   after skip=.5\baselineskip plus 2pt,
%   arc=7pt,
%   adjusted title=Exemples}

%%% Boîte pour des corrigés
\newtcolorbox[auto counter]{solutionn}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
%   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Solution~\thetcbcounter}

%%% Boîte pour des corrigés
\newtcolorbox[auto counter]{solutionnb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=-1pt,
   top=0.3\baselineskip,
   bottom=0.4\baselineskip,
   left=2ex,
   right=2ex,
   frame hidden,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   borderline={0.6pt}{0mm}{black,
                           dotted},
   breakable,
   attach boxed title to top left={xshift=18pt,
                                   yshift=-0.575\baselineskip,
                                   yshifttext=-0.575\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=principale,
                      frame hidden},
   before skip=.5\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=7pt,
   adjusted title=Solution~\thetcbcounter}

%%% Boîte pour une méthode de résolution
\newtcolorbox{methode}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=0pt,
   top=0.5\baselineskip,
   bottom=0.4\baselineskip,
   left=1.8ex,
   right=1.8ex,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   boxrule=0.4pt,
   %breakable,
   attach boxed title to top center={yshift=-1pt},
   boxed title style={size=small,
                      arc=0pt,
                      frame hidden},
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=0pt,
   adjusted title=Méthode}

%%% Boîte pour une méthode de résolution
\newtcolorbox{methodeb}
  {reset,
   enhanced jigsaw,
   colback=white,
   colframe=principale,
   colbacktitle=principale,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   boxsep=0pt,
   top=0.5\baselineskip,
   bottom=0.4\baselineskip,
   left=1.8ex,
   right=1.8ex,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   boxrule=0.4pt,
   breakable,
   attach boxed title to top center={yshift=-1pt},
   boxed title style={size=small,
                      arc=0pt,
                      frame hidden},
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   arc=0pt,
   adjusted title=Méthode}

%%% Boîte à faire
\newtcolorbox{afaire}
  {reset,
   blanker,
   left skip=22pt,
   %breakable,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   before skip=.3\baselineskip plus 2pt,
   after skip=.6\baselineskip plus 2pt,
   coltitle=black,
   fonttitle=\LARGE,
   title=\ding{45},
   attach boxed title to top left={xshift=-31.65pt,
                                   yshift=-15pt}}

%%% Boîte à faire
\newtcolorbox{afaireb}
  {reset,
   blanker,
   left skip=22pt,
   breakable,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   before skip=.3\baselineskip plus 2pt,
   after skip=.6\baselineskip plus 2pt,
   coltitle=black,
   fonttitle=\LARGE,
   title=\ding{45},
   attach boxed title to top left={xshift=-31.65pt,
                                   yshift=-15pt}}

%%% Question
\newtcolorbox{question}
  {reset,
   blanker,
   left skip=22pt,
   %breakable,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   before skip=.3\baselineskip plus 2pt,
   after skip=.6\baselineskip plus 2pt,
   coltitle=black,
   fonttitle=\LARGE,
   title=\ding{43},
   attach boxed title to top left={xshift=-31.65pt,
                                   yshift=-16pt}}

%%% Exemple
%\newtcolorbox{exemple}
%  {reset,
%   blanker,
%   left skip=22pt,
%   %breakable,
%   before upper={\parskip.5\baselineskip plus 2pt\noindent},
%   before skip=.3\baselineskip plus 2pt,
%   after skip=.6\baselineskip plus 2pt,
%   coltitle=black,
%   fonttitle=\LARGE,
%   title=\ding{97},
%   attach boxed title to top left={xshift=-31.65pt,
%                                   yshift=-16pt}}

%%% Boîte attention ou danger
\newtcolorbox{danger}
  {reset,
   blanker,
   left skip=22pt,
   %breakable,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   before skip=.4\baselineskip plus 2pt,
   after skip=.6\baselineskip plus 2pt,
   coltitle=black,
   title=\textdbend,
   attach boxed title to top left={xshift=-31.25pt,
                                   yshift=-27.5pt}}

%%% Encadré compétences
%%% sans titre
\newtcolorbox{competences}
  {reset,
   enhanced jigsaw,
   colback=fondaccentsecondaire!50!fondbase,
   colframe=accentsecondaire!25!base,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   arc=0pt,
   boxsep=0pt,
   top=0.2\baselineskip,
   bottom=0.3\baselineskip,
   left=2ex,
   right=2ex,
   toprule=0.4pt,
   bottomrule=0.4pt,
   rightrule=0pt,
   leftrule=0pt,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   %breakable,
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   attach boxed title to top center={yshift=-0.57\baselineskip,
                                     yshifttext=-0.57\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=accentsecondaire!25!base,
                      frame hidden},
   adjusted title=Compétences}

%%% Encadré objectifs
%%% idem competences
\newtcolorbox{objectifs}
  {reset,
   enhanced jigsaw,
   colback=fondaccentsecondaire!50!fondbase,
   colframe=accentsecondaire!25!base,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   arc=0pt,
   boxsep=0pt,
   top=0.2\baselineskip,
   bottom=0.3\baselineskip,
   left=2ex,
   right=2ex,
   toprule=0.4pt,
   bottomrule=0.4pt,
   rightrule=0pt,
   leftrule=0pt,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   %breakable,
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   attach boxed title to top center={yshift=-0.57\baselineskip,
                                     yshifttext=-0.57\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=accentsecondaire!25!base,
                      frame hidden},
   adjusted title=Objectifs}

%%% Encadré compétences
%%% sans titre
\newtcolorbox{competencesb}
  {reset,
   enhanced jigsaw,
   colback=fondaccentsecondaire!50!fondbase,
   colframe=accentsecondaire!25!base,
   fonttitle=\upshape\sffamily\bfseries\footnotesize,
   arc=0pt,
   boxsep=0pt,
   top=0.2\baselineskip,
   bottom=0.3\baselineskip,
   left=2ex,
   right=2ex,
   toprule=0.4pt,
   bottomrule=0.4pt,
   rightrule=0pt,
   leftrule=0pt,
   before upper={\parskip.5\baselineskip plus 2pt\noindent},
   breakable,
   before skip=.4\baselineskip plus 2pt,
   after skip=.5\baselineskip plus 2pt,
   attach boxed title to top center={yshift=-0.57\baselineskip,
                                     yshifttext=-0.57\baselineskip},
   boxed title style={size=small,
                      arc=7pt,
                      colback=accentsecondaire!25!base,
                      frame hidden},
   adjusted title=Compétences}

%%% Encadré grisé pour les exos, avec un titre
\newtcolorbox{lumbrosotitre}[1]{reset,
                                enhanced jigsaw,
                                colback=lightgray!50,
                                boxrule=0pt,
                                colframe=lightgray!50,
                                %enforce %breakable,
                                fonttitle=\upshape\bfseries,
                                toptitle=\baselineskip,
                                boxsep=0pt,
                                bottom=0.8\baselineskip,
                                coltitle=black,
                                title=\subsubsection*{#1},
                                before upper={\parskip0.5\baselineskip plus 2pt\noindent},
                                arc=0pt}

%%% Paragraphe titré par Solution
\newenvironment{solution}{
  \subsubsection*{Solution}
  
  }{}

%%% Commande slumbroso à la place des environnements
\newcommand{\slumbroso}[3]{%
  \begin{lumbrosotitre}{#1}
  #2
  \end{lumbrosotitre}
  \begin{solution}
  #3
  \end{solution}}

%%% Encadré grisé simple, avec cadre
\newtcolorbox{lumbrosocadre}{reset,
                             enhanced jigsaw,
                             colback=lightgray!50,
                             boxrule=0.4pt,
                             colframe=black,
                             %enforce %breakable,
                             boxsep=0pt,
                             right=1ex,
                             left=1ex,
                             top=1ex,
                             bottom=1ex,
                             before upper={\parskip0.5\baselineskip plus 2pt\noindent},
                             arc=0pt}

%%% Commande vlumbroso à la place de l'environnement lumbroso cadre
\newcommand{\vlumbroso}[1]{%
  \begin{lumbrosocadre}
  #1
  \end{lumbrosocadre}}

%%% Sans l'encadré, spécial questions éparses dans un TP
\newtcolorbox{lumbrosogris}{reset,
                            enhanced jigsaw,
                            colback=lightgray!50,
                            boxrule=0pt,
                            colframe=lightgray!50,
              %              enforce breakable,
                            boxsep=0pt,
                            right=6pt,
                            left=6pt,
                            top=6pt,
                            bottom=6pt,
                            before upper={\parskip0.5\baselineskip plus 2pt\noindent},
                            arc=0pt}

%%% Sans l'encadré, spécial questions éparses dans un TP
\newtcolorbox{lumbrosogrisb}{reset,
                            enhanced jigsaw,
                            colback=lightgray!50,
                            boxrule=0pt,
                            colframe=lightgray!50,
                            enforce breakable,
                            boxsep=0pt,
                            right=6pt,
                            left=6pt,
                            top=6pt,
                            bottom=6pt,
                            before upper={\parskip0.5\baselineskip plus 2pt\noindent},
                            arc=0pt}

%%% Commande vslumbroso à la place de l'environnement lumbroso gris
\newcommand{\vslumbroso}[1]{%
  \begin{lumbrosogris}
  #1
  \end{lumbrosogris}}

%%% Encadré grisé pour les questions
\newcommand{\lumbroso}[1]{%
  \begin{lumbrosogris}
  \vspace*{-0.7\baselineskip}
  \begin{abcitem}
  \restaure{abcnum}
  \item #1
  \sauve{abcnum}
  \end{abcitem}
  \end{lumbrosogris}}

%%% Encadré grisé pour les questions
\newcommand{\lumbrosob}[1]{%
  \begin{lumbrosogrisb}
  \vspace*{-0.7\baselineskip}
  \begin{abcitem}
  \restaure{abcnum}
  \item #1
  \sauve{abcnum}
  \end{abcitem}
  \end{lumbrosogrisb}}

%%% Taper la source d'un texte, alignement à droite
\newenvironment{source}
  {\begin{flushright}
   \tiny{}}
  {\end{flushright}}

%%% Taper des équations sur plusieurs lignes, alignement sur une signe égal central
\newenvironment{resultat}
  {\begin{array}{@{}r@{\ =\ }l@{}}}
  {\end{array}}

%%% Taper un système d'équations sur plusieurs lignes, avec une accolade gauche
\newenvironment{systeme}
  {\left\lbrace\begin{array}{@{}r@{\ =\ }l@{}}}
  {\end{array}\right.}

%%% Taper des coordonnées de vecteur, avec un trait vertical à gauche
\newenvironment{coordonnees}
  {\left|\begin{array}{@{}r@{\ =\ }l@{}}}
  {\end{array}\right.}

%%% Taper un système d'inéquations >= sur plusieurs lignes, avec une accolade gauche
\newenvironment{inequation}
  {\left\lbrace\begin{array}{@{}r@{\ \geqslant\ }l@{}}}
  {\end{array}\right.}

%%% Taper un système d'inéquations <= sur plusieurs lignes, avec une accolade gauche
\newenvironment{inequationg}
  {\left\lbrace\begin{array}{@{}r@{\ \leqslant\ }l@{}}}
  {\end{array}\right.}

%%% Exemple(s) dans un cours dactylographié
%\newenvironment{exemple}
%  {\begin{flushright}
%   \begin{minipage}[t]{0.9\linewidth}
%   \underline{Exem}p\underline{le}: }
%  {\end{minipage}
%   \end{flushright}}
%
%\newenvironment{exemples}
%  {\begin{flushright}
%   \begin{minipage}[t]{0.9\linewidth}
%   \underline{Exem}p\underline{les}: }
%  {\end{minipage}
%   \end{flushright}}

%%% Minisection, pour les sous-titres dans les exos
\newcommand{\minisection}[1]{\textsf{\large{#1}\phantom{gp}}\vspace*{0.2ex}\hrule}

%%% Espacements maison
\newcommand{\grand}[0]{\ensuremath{\displaystyle}}

% avec un c comme commande, anciennes présentations
\newcommand{\objectifc}[1]{\quartlignemoins\begin{center}
                          \begin{minipage}{0.8\linewidth}
                          \hrule
                          \quartligneplus
                          \textsf{\textbf{Objectif}\quad\quad #1} \\
                          \demilignemoins
                          \hrule
                          \end{minipage}
                          \end{center}\quartlignemoins}

\newcommand{\objectifsc}[1]{\quartlignemoins\begin{center}
                           \begin{minipage}{0.8\linewidth}
                           \hrule
                           \quartligneplus
                           \textsf{\textbf{Objectifs}\quad\quad #1} \\
                           \demilignemoins
                           \hrule
                           \end{minipage}
                           \end{center}\quartlignemoins}

%%% Espacements verticaux, spécial bricolages avant impression
\newcommand{\lignemoins}{\vspace*{-\baselineskip}}
\newcommand{\demilignemoins}{\vspace*{-0.5\baselineskip}}
\newcommand{\quartlignemoins}{\vspace*{-0.25\baselineskip}}
\newcommand{\huitiemelignemoins}{\vspace*{-0.125\baselineskip}}
\newcommand{\troisquartlignemoins}{\vspace*{-0.75\baselineskip}}
\newcommand{\ligneplus}{\vspace*{\baselineskip}}
\newcommand{\demiligneplus}{\vspace*{0.5\baselineskip}}
\newcommand{\quartligneplus}{\vspace*{0.25\baselineskip}}
\newcommand{\huitiemeligneplus}{\vspace*{0.125\baselineskip}}
\newcommand{\troisquartligneplus}{\vspace*{0.75\baselineskip}}

%%% Notation des isotopes, dans l'ordre de lecture: \isotope{12}{6}{C}
\newcommand{\isotope}[3]{\ensuremath{^{#1}_{#2}\mathrm{#3}}}
\newcommand{\helium}{\isotope{4}{2}{He}}
\newcommand{\partalpha}{\isotope{4}{2}{He}}
\newcommand{\partbetaplus}{\isotope{0}{1}{e}}
\newcommand{\partbetamoins}{\isotope{\phantom{-}0}{-1}{e}}
\newcommand{\neutrino}{\isotope{0}{0}{\nu}}

%%% Un peu de radioactivité
\newcommand{\neutron}{\isotope{1}{0}{n}}
\newcommand{\proton}{\isotope{1}{1}{p}}
\newcommand{\hydrogeneun}{\isotope{1}{1}{H}}
\newcommand{\deuterium}{\isotope{2}{1}{H}}
\newcommand{\tritium}{\isotope{3}{1}{H}}

%%% Ecriture intuitive des equations chimiques
\newcommand{\gaz}{\ensuremath{_{\mathrm{(g)}}}}
\newcommand{\gazeux}{\ensuremath{_{\mathrm{(g)}}}}
\newcommand{\liquide}{\ensuremath{_{\mathrm{(\ell)}}}}
\newcommand{\solide}{\ensuremath{_{\mathrm{(s)}}}}
\newcommand{\aqueux}{\ensuremath{_{\mathrm{(aq)}}}}
\newcommand{\maximal}{\ensuremath{_{\mathrm{max}}}}
\newcommand{\vfinal}{\ensuremath{_{\mathrm{final}}}}
\newcommand{\electron}{\ensuremath{\mathrm{e^{-}}}}
\newcommand{\positron}{\ensuremath{\mathrm{e^{+}}}}
\newcommand{\positon}{\ensuremath{\mathrm{e^{+}}}}
\newcommand{\eqf}{\ensuremath{_{\text{éq}}}}
\newcommand{\fleche}{\ensuremath{\longrightarrow}}
\newcommand{\doublefleche}{\ensuremath{\leftrightharpoons}}
\newcommand{\reaction}{\ensuremath{\rightarrow}}
\newcommand{\equilibre}{\ensuremath{\rightleftarrows}}
\newcommand{\couple}[2]{\ensuremath{(#1/\,#2)}}
\newcommand{\couplelarge}[2]{\ensuremath{\left(#1/\,#2\right)}}
\newcommand{\concentration}[1]{\ensuremath{{[#1]}}}
\newcommand{\vconcentration}[1]{\ensuremath{{\left[#1\right]}}}
\newcommand{\conmath}[1]{{\mbox{[#1]}}}

%%% Molecules organiques
\newcommand{\ammoniac}{\ensuremath{\mathrm{NH_3^{\phantom{0}}}}}
\newcommand{\methane}{\ensuremath{\mathrm{CH_4^{\phantom{0}}}}}
\newcommand{\dichloromethane}{\ensuremath{\mathrm{CH_2^{\phantom{0}}C\ell_2^{\phantom{0}}}}}
\newcommand{\ethane}{\ensuremath{\mathrm{C_2^{\phantom{0}}H_6^{\phantom{0}}}}}
\newcommand{\propane}{\ensuremath{\mathrm{C_3^{\phantom{0}}H_8^{\phantom{0}}}}}
\newcommand{\butane}{\ensuremath{\mathrm{C_4^{\phantom{0}}H_{10}^{\phantom{0}}}}}
\newcommand{\pentane}{\ensuremath{\mathrm{C_5^{\phantom{0}}H_{12}^{\phantom{0}}}}}
\newcommand{\hexane}{\ensuremath{\mathrm{C_6^{\phantom{0}}H_{14}^{\phantom{0}}}}}
\newcommand{\cyclohexane}{\ensuremath{\mathrm{C_6^{\phantom{0}}H_{12}^{\phantom{0}}}}}
\newcommand{\ethyle}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{2}^{\phantom{0}}}}}
\newcommand{\ethylene}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{4}^{\phantom{0}}}}}
\newcommand{\eau}{\ensuremath{\mathrm{H_2^{\phantom{0}}O}}}
\newcommand{\eaul}{\ensuremath{\mathrm{H_2^{\phantom{0}}O^{\phantom{0}}_{(\ell)}}}}
\newcommand{\eauaq}{\ensuremath{\mathrm{H_2^{\phantom{0}}O^{\phantom{0}}_{(aq)}}}}
\newcommand{\aniline}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{2}^{\phantom{0}}}}}
\newcommand{\anilineaq}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\phenylammonium}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{3}^{+}}}}
\newcommand{\phenylammoniumaq}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{3\,(aq)}^{+}}}}
\newcommand{\aspirine}{\ensuremath{\mathrm{C_{9}^{\phantom{0}}H_{8}^{\phantom{0}}O_{4}^{\phantom{0}}}}}
\newcommand{\aspirineaq}{\ensuremath{\mathrm{C_{9}^{\phantom{0}}H_{8}^{\phantom{0}}O_{4\,(aq)}^{\phantom{0}}}}}
\newcommand{\baseaspirine}{\ensuremath{\mathrm{C_{9}^{\phantom{0}}H_{7}^{\phantom{0}}O_{4}^{-}}}}
\newcommand{\baseaspirineaq}{\ensuremath{\mathrm{C_{9}^{\phantom{0}}H_{7}^{\phantom{0}}O_{4\,(aq)}^{-}}}}
\newcommand{\acidesalicylique}{\ensuremath{\mathrm{C_{7}^{\phantom{0}}H_{6}^{\phantom{0}}O_{3}^{\phantom{0}}}}}
\newcommand{\acidesalicyliqueaq}{\ensuremath{\mathrm{C_{7}^{\phantom{0}}H_{6}^{\phantom{0}}O_{3\,(aq)}^{\phantom{0}}}}}
\newcommand{\salicylate}{\ensuremath{\mathrm{C_{7}^{\phantom{0}}H_{5}^{\phantom{0}}O_{3}^{-}}}}
\newcommand{\salicylateaq}{\ensuremath{\mathrm{C_{7}^{\phantom{0}}H_{5}^{\phantom{0}}O_{3\,(aq)}^{-}}}}
\newcommand{\acideborique}{\ensuremath{\mathrm{B(OH)_{3}^{\phantom{0}}}}}
\newcommand{\dioxygene}{\ensuremath{\mathrm{O_2^{\phantom{0}}}}}
\newcommand{\dihydrogene}{\ensuremath{\mathrm{H_2^{\phantom{0}}}}}
\newcommand{\diazote}{\ensuremath{\mathrm{N_2^{\phantom{0}}}}}
\newcommand{\sulfuredhydrogene}{\ensuremath{\mathrm{H_2^{\phantom{0}}S}}}
\newcommand{\eauoxygenee}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}O_{2}^{\phantom{0}}}}}
\newcommand{\methanol}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}OH}}}
\newcommand{\propanol}{\ensuremath{\mathrm{C_3^{\phantom{0}}H_8^{\phantom{0}}O}}}
\newcommand{\propanone}{\ensuremath{\mathrm{C_3^{\phantom{0}}H_6^{\phantom{0}}O}}}
\newcommand{\ethanol}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}CH_{2}^{\phantom{0}}OH}}}
\newcommand{\varethanol}{\ensuremath{\mathrm{C_2^{\phantom{0}}H_5^{\phantom{0}}OH}}}
\newcommand{\ethanolbrute}{\ensuremath{\mathrm{C_2^{\phantom{0}}H_6^{\phantom{0}}O}}}
\newcommand{\benzene}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{6}^{\phantom{0}}}}}
\newcommand{\ethanal}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}CHO}}}
\newcommand{\acetone}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}\!-\!CO\!-\!CH_{3}^{\phantom{0}}}}}
\newcommand{\methylamine}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}NH_2^{\phantom{0}}}}}
\newcommand{\methylamineaq}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}NH_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\methylammonium}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}NH_3^{+}}}}
\newcommand{\methylammoniumaq}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}NH_{3\,(aq)}^{+}}}}
\newcommand{\ammoniacaq}{\ensuremath{\mathrm{NH_{3\,(aq)}^{\phantom{0}}}}}
\newcommand{\methaneg}{\ensuremath{\mathrm{CH_{4\,(g)}^{\phantom{0}}}}}
\newcommand{\ethaneg}{\ensuremath{\mathrm{C_2^{\phantom{0}}H_{6\,(g)}^{\phantom{0}}}}}
\newcommand{\propaneg}{\ensuremath{\mathrm{C_3^{\phantom{0}}H_{8\,(g)}^{\phantom{0}}}}}
\newcommand{\butaneg}{\ensuremath{\mathrm{C_4^{\phantom{0}}H_{10\,(g)}^{\phantom{0}}}}}
\newcommand{\pentaneg}{\ensuremath{\mathrm{C_5^{\phantom{0}}H_{12\,(g)}^{\phantom{0}}}}}
\newcommand{\hexanel}{\ensuremath{\mathrm{C_6^{\phantom{0}}H_{14\,(\ell)}^{\phantom{0}}}}}
\newcommand{\cyclohexanel}{\ensuremath{\mathrm{C_6^{\phantom{0}}H_{12\,(\ell)}^{\phantom{0}}}}}
\newcommand{\ethyleg}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\dioxygeneg}{\ensuremath{\mathrm{O_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\dioxygeneaq}{\ensuremath{\mathrm{O_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\dihydrogeneg}{\ensuremath{\mathrm{H_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\diazoteg}{\ensuremath{\mathrm{N_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\sulfuredhydrogeneg}{\ensuremath{\mathrm{H_2^{\phantom{0}}S_{g}^{\phantom{0}}}}}
\newcommand{\eauoxygeneeaq}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}O_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\methanoll}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}OH_{(\ell)}^{\phantom{0}}}}}
\newcommand{\ethanoll}{\ensuremath{\mathrm{C_2^{\phantom{0}}H_6^{\phantom{0}}O_{(\ell)}^{\phantom{0}}}}}
\newcommand{\varethanolaq}{\ensuremath{\mathrm{C_2^{\phantom{0}}H_5^{\phantom{0}}OH_{(aq)}^{\phantom{0}}}}}
\newcommand{\benzenel}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{6\,(\ell}^{\phantom{0}}}}}
\newcommand{\ethanall}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}CHO_{(\ell)}^{\phantom{0}}}}}
\newcommand{\acetonel}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}\!-\!CO\!-\!CH_{3\,(\ell)}^{\phantom{0}}}}}

%%% Oses
\newcommand{\sucre}{\ensuremath{\mathrm{C_{12}^{\phantom{0}}H_{22}^{\phantom{0}}O_{11}^{\phantom{0}}}}}
\newcommand{\saccharose}{\ensuremath{\mathrm{C_{12}^{\phantom{0}}H_{22}^{\phantom{0}}O_{11}^{\phantom{0}}}}}
\newcommand{\glucose}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{12}^{\phantom{0}}O_{6}^{\phantom{0}}}}}

%%% Familles
\newcommand{\alcools}{\ensuremath{\mathrm{C_{\mathrm{n}}^{\phantom{0}}H_{2\mathrm{n}+1}^{\phantom{0}}OH}}}

%%% Oxydes
\newcommand{\ozone}{\ensuremath{\mathrm{O_3}}}
\newcommand{\alumine}{\ensuremath{\mathrm{A\ell_2O_3}}}
\newcommand{\alumines}{\ensuremath{\mathrm{A\ell_2O_{3\,(s)}}}}
\newcommand{\silice}{\ensuremath{\mathrm{SiO_2}}}
\newcommand{\dioxydedecarbone}{\ensuremath{\mathrm{CO_2}}}
\newcommand{\dioxydedecarboneaq}{\ensuremath{\mathrm{CO_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\dioxydedecarboneg}{\ensuremath{\mathrm{CO_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\dioxydedecarboneeau}{\ensuremath{\mathrm{CO_{2}^{\phantom{0}},H_{2}^{\phantom{0}}O}}}
\newcommand{\dioxydedecarboneeauaq}{\ensuremath{\mathrm{CO_{2}^{\phantom{0}},H_{2}^{\phantom{0}}O^{\phantom{0}}_{(aq)}}}}
\newcommand{\dioxydedazote}{\ensuremath{\mathrm{NO_2}}}
\newcommand{\protoxydedazote}{\ensuremath{\mathrm{N_2O}}}
\newcommand{\dioxydedeplomb}{\ensuremath{\mathrm{PbO_2}}}
\newcommand{\dioxydedesoufre}{\ensuremath{\mathrm{SO_2}}}
\newcommand{\dioxydedesoufreg}{\ensuremath{\mathrm{SO_{2\,(g)}}}}
\newcommand{\dioxydedesoufreaq}{\ensuremath{\mathrm{SO_{2\,(aq)}}}}
\newcommand{\dioxydedemanganese}{\ensuremath{\mathrm{MnO_{2}}}}
\newcommand{\oxydedecuivreun}{\ensuremath{\mathrm{Cu_2O}}}
\newcommand{\trioxydedefer}{\ensuremath{\mathrm{Fe_2O_3}}}
\newcommand{\hematite}{\ensuremath{\mathrm{Fe_2O_3}}}
\newcommand{\oxydedefertrois}{\ensuremath{\mathrm{Fe_2O_3}}}
\newcommand{\trioxydedefertrois}{\ensuremath{\mathrm{Fe_2O_3}}}
\newcommand{\tetraoxydedefer}{\ensuremath{\mathrm{Fe_3O_4}}}
\newcommand{\trioxydedesoufre}{\ensuremath{\mathrm{SO_3}}}
\newcommand{\trioxydedazote}{\ensuremath{\mathrm{NO_3}}}
\newcommand{\oxydedargent}{\ensuremath{\mathrm{Ag_{2}O}}}

%%% Sulfures
\newcommand{\pyrite}{\ensuremath{\mathrm{FeS_{2}}}}

%%% Chlorures
\newcommand{\pentachloruredephosphore}{\ensuremath{\mathrm{PC\ell_{5}}}}
\newcommand{\trichloruredephosphore}{\ensuremath{\mathrm{PC\ell_{3}}}}

%%% Ions polyatomiques
% Hydrogène
\newcommand{\oxonium}{\ensuremath{\mathrm{H_{3}^{\phantom{0}}O_{\phantom{0}}^{+}}}}
\newcommand{\oxoniumaq}{\ensuremath{\mathrm{H_{3}^{\phantom{0}}O^{+}_{(aq)}}}}
\newcommand{\hydronium}{\ensuremath{\mathrm{H_{3}^{\phantom{0}}O_{\phantom{0}}^{+}}}}
\newcommand{\hydroxyde}{\ensuremath{\mathrm{OH^-_{\phantom{0}}}}}
\newcommand{\hydroxydeaq}{\ensuremath{\mathrm{OH^-_{(aq)}}}}
% Azote
\newcommand{\ammonium}{\ensuremath{\mathrm{NH_4^+}}}
\newcommand{\ammoniumaq}{\ensuremath{\mathrm{NH_{4\,(aq)}^+}}}
\newcommand{\nitrate}{\ensuremath{\mathrm{NO_3^-}}}
\newcommand{\nitrateaq}{\ensuremath{\mathrm{NO_{3\,(aq)}^-}}}
\newcommand{\nitrite}{\ensuremath{\mathrm{NO^{-}_{2}}}}
\newcommand{\nitronium}{\ensuremath{\mathrm{NO^{+}_{2}}}}
\newcommand{\hydroxylammonium}{\ensuremath{\mathrm{NH_{3}^{\phantom{0}}OH^{+}_{\phantom{0}}}}}
\newcommand{\hydroxylammoniumaq}{\ensuremath{\mathrm{NH_{3}^{\phantom{0}}OH^{+}_{(aq)}}}}
% Carbonates
\newcommand{\carbonate}{\ensuremath{\mathrm{CO_{3}^{2-}}}}
\newcommand{\carbonateaq}{\ensuremath{\mathrm{CO_{3\,(aq)}^{2-}}}}
\newcommand{\hydrogenocarbonate}{\ensuremath{\mathrm{HCO_3^{-}}}}
\newcommand{\hydrogenocarbonateaq}{\ensuremath{\mathrm{HCO_{3\,(aq)}^{-}}}}
\newcommand{\dihydrogenocarbonate}{\ensuremath{\mathrm{H_{2}CO_3}}}
\newcommand{\tartrate}{\ensuremath{\mathrm{C_{4}^{\phantom{0}}H_{4}^{\phantom{0}}O_{6}^{2-}}}}
\newcommand{\oxalate}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}O_{4}^{2-}}}}
% Chlore
\newcommand{\chlorate}{\ensuremath{\mathrm{C\ell{}O_3^-}}}
\newcommand{\perchlorate}{\ensuremath{\mathrm{C\ell{}O_4^-}}}
\newcommand{\perchlorateaq}{\ensuremath{\mathrm{C\ell{}O_{4\,(aq)}^-}}}
% Chrome
\newcommand{\dichromate}{\ensuremath{\mathrm{Cr^{\phantom{0}}_{2}O_{7}^{2-}}}}
% Cyanure
\newcommand{\cyanate}{\ensuremath{\mathrm{OCN^{-}}}}
\newcommand{\cyanure}{\ensuremath{\mathrm{CN_{\phantom{0}}^{-}}}}
\newcommand{\thiocyanate}{\ensuremath{\mathrm{SCN_{\phantom{0}}^{-}}}}
% Manganèse
\newcommand{\permanganate}{\ensuremath{\mathrm{MnO_4^-}}}
\newcommand{\permanganateaq}{\ensuremath{\mathrm{MnO_{4\,(aq)}^-}}}
% Phosphore
\newcommand{\phosphate}{\ensuremath{\mathrm{PO_4^{3-}}}}
\newcommand{\phosphateaq}{\ensuremath{\mathrm{PO_{4\,(aq)}^{3-}}}}
\newcommand{\hydrogenophosphate}{\ensuremath{\mathrm{HPO_4^{2-}}}}
\newcommand{\dihydrogenophosphate}{\ensuremath{\mathrm{H^{\phantom{0}}_{2}PO_{4}^{-}}}}
% Soufre
\newcommand{\thiosulfate}{\ensuremath{\mathrm{S^{\phantom{0}}_{2}O_{3}^{2-}}}}
\newcommand{\thiosulfateaq}{\ensuremath{\mathrm{S^{\phantom{0}}_{2}O_{3\,(aq)}^{2-}}}}
\newcommand{\peroxodisulfate}{\ensuremath{\mathrm{S^{\phantom{0}}_{2}O_{8}^{2-}}}}
\newcommand{\peroxodisulfateaq}{\ensuremath{\mathrm{S^{\phantom{0}}_{2}O_{8\,(aq)}^{2-}}}}
\newcommand{\sulfite}{\ensuremath{\mathrm{SO_{3}^{2-}}}}
\newcommand{\sulfate}{\ensuremath{\mathrm{SO_{4}^{2-}}}}
\newcommand{\sulfateaq}{\ensuremath{\mathrm{SO_{4\,(aq)}^{2-}}}}
\newcommand{\hydrogenosulfate}{\ensuremath{\mathrm{HSO_{4}^{-}}}}
\newcommand{\hydrogenosulfite}{\ensuremath{\mathrm{HSO_{3}^{-}}}}
\newcommand{\tetrathionate}{\ensuremath{\mathrm{S_{4}^{\phantom{0}}O_{6}^{2-}}}}
\newcommand{\tetrathionateaq}{\ensuremath{\mathrm{S_{4}^{\phantom{0}}O_{6\,(aq)}^{2-}}}}
\newcommand{\tetrahydroxyborate}{\ensuremath{\mathrm{B(OH)_{4}^{-}}}}

%%% Complexes
\newcommand{\dithiosulfatoargentun}{$\mathrm{[Ag(S_{2}^{\phantom{0}}O_{3}^{2-})_{2}^{\phantom{0}}]^{3-}_{\phantom{0}}}$}
\newcommand{\dithiosulfatomercuredeux}{$\mathrm{[Hg(S_{2}^{\phantom{0}}O_{3}^{2-})_{2}^{\phantom{0}}]^{2-}_{\phantom{0}}}$}
\newcommand{\edtaquatre}{\ensuremath{\mathrm{Y}_{\phantom{0}}^{4-}}}
\newcommand{\edta}{\ensuremath{\mathrm{H_{4}^{\phantom{0}}Y}}}
\newcommand{\net}{\ensuremath{\mathrm{NET}}}
\newcommand{\edtatrois}{\ensuremath{\mathrm{HY}_{\phantom{0}}^{3-}}}
\newcommand{\edtabaryumdeux}{\ensuremath{\mathrm{BaY}_{\phantom{0}}^{2-}}}
\newcommand{\edtacalciumdeux}{\ensuremath{\mathrm{CaY}_{\phantom{0}}^{2-}}}
\newcommand{\edtamagnesiumdeux}{\ensuremath{\mathrm{MgY}_{\phantom{0}}^{2-}}}
\newcommand{\edtazincdeux}{\ensuremath{\mathrm{ZnY}_{\phantom{0}}^{2-}}}
\newcommand{\edtaferdeux}{\ensuremath{\mathrm{FeY}_{\phantom{0}}^{2-}}}
\newcommand{\tetracyanocuivredeux}{\ensuremath{\mathrm{[Cu(CN)_4^{\phantom{0}}]}_{\phantom{0}}^{2-}}}
\newcommand{\hexacyanoferdeux}{\ensuremath{\mathrm{[Fe(CN)_6^{\phantom{0}}]}_{\phantom{0}}^{4-}}}
\newcommand{\hexacyanofertrois}{\ensuremath{\mathrm{[Fe(CN)_6^{\phantom{0}}]}_{\phantom{0}}^{3-}}}
\newcommand{\aminoargentun}{\ensuremath{\mathrm{[Ag(NH_3^{\phantom{0}})]}_{\phantom{0}}^+}}
\newcommand{\diaminoargentun}{\ensuremath{\mathrm{[Ag(NH_3^{\phantom{0}})_2^{\phantom{0}}]}_{\phantom{0}}^+}}
\newcommand{\tetraaminoferdeux}{\ensuremath{\mathrm{[Fe(NH_3^{\phantom{0}})_4^{\phantom{0}}]}_{\phantom{0}}^{2+}}}
\newcommand{\tetraioduredeplombdeux}{\ensuremath{\mathrm{[PbI_{4}^{\phantom{0}}]}_{\phantom{0}}^{2-}}}
\newcommand{\tetraamminecuivredeux}{\ensuremath{\mathrm{Cu(NH_{3}^{\phantom{0}})}^{2+}_{4}}}
\newcommand{\triamminecuivredeux}{\ensuremath{\mathrm{Cu(NH_{3}^{\phantom{0}})}^{2+}_{3}}}
\newcommand{\diamminecuivredeux}{\ensuremath{\mathrm{Cu(NH_{3}^{\phantom{0}})}^{2+}_{2}}}
\newcommand{\amminecuivredeux}{\ensuremath{\mathrm{Cu(NH_{3}^{\phantom{0}})}_{\phantom{0}}^{2+}}}
\newcommand{\bromate}{\ensuremath{\mathrm{BrO}_3^{-}}}
\newcommand{\chromate}{\ensuremath{\mathrm{CrO}_4^{2-}}}
\newcommand{\aluminate}{\ensuremath{\mathrm{A\ell(OH)}_{4}^{-}}}

%%% Halogènes
\newcommand{\difluor}{\ensuremath{\mathrm{F_2^{\phantom{0}}}}}
\newcommand{\difluoraq}{\ensuremath{\mathrm{F_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\dichlore}{\ensuremath{\mathrm{C\ell_2^{\phantom{0}}}}}
\newcommand{\dichloreaq}{\ensuremath{\mathrm{C\ell_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\dichloreg}{\ensuremath{\mathrm{C\ell_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\dibrome}{\ensuremath{\mathrm{Br_2^{\phantom{0}}}}}
\newcommand{\dibromeg}{\ensuremath{\mathrm{Br_{2\,(g)}^{\phantom{0}}}}}
\newcommand{\dibromeaq}{\ensuremath{\mathrm{Br_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\diiode}{\ensuremath{\mathrm{I_2^{\phantom{0}}}}}
\newcommand{\diiodeaq}{\ensuremath{\mathrm{I_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\triiodure}{\ensuremath{\mathrm{I_3^{-}}}}
\newcommand{\triiodureaq}{\ensuremath{\mathrm{I_{3\,(aq)}^{-}}}}

%%% Metaux et autres atomes difficiles à écrire
\newcommand{\aluminium}{\ensuremath{\mathrm{A\ell}}}
\newcommand{\chlore}{\ensuremath{\mathrm{C\ell}}}
\newcommand{\fluor}{\ensuremath{\mathrm{F^{-}_{\phantom{0}}}}}

%%% Cristaux et précipités difficiles à écrires
\newcommand{\hydrogenocarbonatedesodium}{\ensuremath{\mathrm{NaHCO_3^{\phantom{0}}}}}
\newcommand{\hydrogenocarbonatedesodiums}{\ensuremath{\mathrm{NaHCO_{3\,(s)}^{\phantom{0}}}}}
\newcommand{\hydrogenocarbonatedecalcium}{\ensuremath{\mathrm{Ca\left(HCO_3^{\phantom{0}}\right)_{2}^{\phantom{0}}}}}
\newcommand{\hydrogenocarbonatedecalciums}{\ensuremath{\mathrm{Ca\left(HCO_{3}^{\phantom{0}}\right)_{2\,(s)}^{\phantom{0}}}}}
\newcommand{\chloruredhydroxylammonium}{\ensuremath{\mathrm{NH_{3}^{\phantom{0}}OHC\ell}}}
\newcommand{\hydroxylamine}{\ensuremath{\mathrm{NH_{2}^{\phantom{0}}OH}}}
\newcommand{\hydroxylamineaq}{\ensuremath{\mathrm{NH_{2}^{\phantom{0}}OH^{\phantom{0}}_{(aq)}}}}
\newcommand{\sel}{\ensuremath{\mathrm{NaC\ell}}}
\newcommand{\carbonatedecalcium}{\ensuremath{\mathrm{CaCO_3^{\phantom{0}}}}}
\newcommand{\carbonatedecalciums}{\ensuremath{\mathrm{CaCO_{3\,(s)}^{\phantom{0}}}}}
\newcommand{\carbonatedemagnesium}{\ensuremath{\mathrm{MgCO_3^{\phantom{0}}}}}
\newcommand{\chloruredargent}{\ensuremath{\mathrm{AgC\ell}}}
\newcommand{\chloruredargents}{\ensuremath{\mathrm{AgC\ell^{\phantom{0}}_{(s)}}}}
\newcommand{\bromuredargent}{\ensuremath{\mathrm{AgBr}}}
\newcommand{\sulfatedargent}{\ensuremath{\mathrm{Ag_{2}^{\phantom{0}}SO_{4}^{\phantom{0}}}}}
\newcommand{\sulfatedecuivre}{\ensuremath{\mathrm{CuSO_{4}^{\phantom{0}}}}}
\newcommand{\sulfatedebaryum}{\ensuremath{\mathrm{BaSO_{4}^{\phantom{0}}}}}
\newcommand{\sulfatedebaryums}{\ensuremath{\mathrm{BaSO_{4\,(s)}^{\phantom{0}}}}}
\newcommand{\phosphatedargent}{\ensuremath{\mathrm{Ag_{3}^{\phantom{0}}PO_{4}^{\phantom{0}}}}}
\newcommand{\chloruredemagnesium}{\ensuremath{\mathrm{MgC\ell_{2}^{\phantom{0}}}}}
\newcommand{\chloruredeferdeux}{\ensuremath{\mathrm{FeC\ell_{2}^{\phantom{0}}}}}
\newcommand{\chloruredecobaltdeux}{\ensuremath{\mathrm{CoC\ell_{2}^{\phantom{0}}}}}
\newcommand{\chloruredecobaltdeuxs}{\ensuremath{\mathrm{CoC\ell_{2\,(s)}^{\phantom{0}}}}}
\newcommand{\chloruredefertrois}{\ensuremath{\mathrm{FeC\ell_{3}^{\phantom{0}}}}}
\newcommand{\hydroxydedezincdeux}{\ensuremath{\mathrm{Zn(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedenickeldeux}{\ensuremath{\mathrm{Ni(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedecadmiumdeux}{\ensuremath{\mathrm{Cd(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedeferdeux}{\ensuremath{\mathrm{Fe(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedefertrois}{\ensuremath{\mathrm{Fe(OH)_3^{\phantom{0}}}}}
\newcommand{\hydroxydedecuivredeux}{\ensuremath{\mathrm{Cu(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedecalcium}{\ensuremath{\mathrm{Ca(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedecalciums}{\ensuremath{\mathrm{Ca(OH)_{2\,(s)}^{\phantom{0}}}}}
\newcommand{\hydroxydedemagnesium}{\ensuremath{\mathrm{Mg(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedemanganesedeux}{\ensuremath{\mathrm{Mn(OH)_2^{\phantom{0}}}}}
\newcommand{\hydroxydedemanganesetrois}{\ensuremath{\mathrm{Mn(OH)_3^{\phantom{0}}}}}
\newcommand{\bromuredecuivre}{\ensuremath{\mathrm{CuBr_{2}^{\phantom{0}}}}}
\newcommand{\nitratedeplomb}{\ensuremath{\mathrm{Pb(NO_{3}^{\phantom{0}})_{2}^{\phantom{0}}}}}
\newcommand{\ioduredeplomb}{\ensuremath{\mathrm{PbI_{2}^{\phantom{0}}}}}
\newcommand{\ioduredeplombdeux}{\ensuremath{\mathrm{PbI_{2}^{\phantom{0}}}}}
\newcommand{\nitratedepotassium}{\ensuremath{\mathrm{KNO_{3}^{\phantom{0}}}}}
\newcommand{\nitratedammonium}{\ensuremath{\mathrm{NH_{4}^{\phantom{0}}NO_{3}^{\phantom{0}}}}}
\newcommand{\chloratedepotassium}{\ensuremath{\mathrm{KC\ell_{3}^{\phantom{0}}}}}
\newcommand{\sulfuredepotassium}{\ensuremath{\mathrm{K_{2}^{\phantom{0}}S}}}
\newcommand{\nitratedeplombdeux}{\ensuremath{\mathrm{Pb\left(NO_{3}^{\phantom{0}}\right)_{2}^{\phantom{0}}}}}
\newcommand{\chromatedeplomb}{\ensuremath{\mathrm{PbCrO_{4}^{\phantom{0}}}}}
\newcommand{\chromatedeplombdeux}{\ensuremath{\mathrm{PbCrO_{4}^{\phantom{0}}}}}
\newcommand{\hydroxydedaluminiumtrois}{\ensuremath{\mathrm{A\ell(OH)_3^{\phantom{0}}}}}
\newcommand{\permanganatedepotassium}{\ensuremath{\mathrm{KMnO_{4}^{\phantom{0}}}}}
\newcommand{\chromatedargent}{\ensuremath{\mathrm{Ag_{2}^{\phantom{0}}CrO_{4}^{\phantom{0}}}}}

%%% Constantes d'acidité
\newcommand{\pka}{\ensuremath{\mathrm{p}K_{\mathrm{A}}^{\phantom{0}}}}
\newcommand{\pkaun}{\ensuremath{\mathrm{p}K_{\mathrm{A}1}^{\phantom{0}}}}
\newcommand{\pkadeux}{\ensuremath{\mathrm{p}K_{\mathrm{A}2}^{\phantom{0}}}}
\newcommand{\pki}{\ensuremath{\mathrm{p}K_{\mathrm{i}}^{\phantom{0}}}}
\newcommand{\kaun}{\ensuremath{K_{\mathrm{A}1}^{\phantom{0}}}}
\newcommand{\kadeux}{\ensuremath{K_{\mathrm{A}2}^{\phantom{0}}}}
\newcommand{\ka}{\ensuremath{K_{\mathrm{A}}^{\phantom{0}}}}
\newcommand{\pke}{\ensuremath{\mathrm{p}K_{\mathrm{e}}^{\phantom{0}}}}
\newcommand{\ke}{\ensuremath{K_{\mathrm{e}}^{\phantom{0}}}}
\newcommand{\ph}{\ensuremath{\mathrm{pH}}}
\newcommand{\ah}{\ensuremath{\mathrm{AH}}}
\newcommand{\ahaq}{\ensuremath{\mathrm{AH_{(aq)}^{\phantom{0}}}}}
\newcommand{\amoins}{\ensuremath{\mathrm{A_{\phantom{0}}^{-}}}}
\newcommand{\amoinsaq}{\ensuremath{\mathrm{A_{(aq)}^{-}}}}
\newcommand{\inmoins}{\ensuremath{\mathrm{In_{\phantom{0}}^{-}}}}

%%% Ions, acides et bases difficiles à écrires
\newcommand{\acidecarbonique}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}CO_{3}^{\phantom{0}}}}}
\newcommand{\acidecarboniqueaq}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}CO_{3\,(aq)}^{\phantom{0}}}}}
\newcommand{\codeuxeau}{\ensuremath{\mathrm{CO_{2}^{\phantom{0}},H_{2}^{\phantom{0}}O}}}
\newcommand{\codeuxeauaq}{\ensuremath{\mathrm{CO_{2}^{\phantom{0}},H_{2}^{\phantom{0}}O_{(aq)}^{\phantom{0}}}}}
\newcommand{\hexacyanoferrate}{\ensuremath{\mathrm{\left[Fe(CN)_{6}^{\phantom{0}}\right]_{\phantom{0}}^{3-}}}}
\newcommand{\hexacyanoferrateaq}{\ensuremath{\mathrm{\left[Fe(CN)_{6}^{\phantom{0}}\right]^{3-}_{(aq)}}}}
\newcommand{\acidehypochloreux}{\ensuremath{\mathrm{C\ell OH}}}
\newcommand{\ionhypochlorite}{\ensuremath{\mathrm{C\ell O_{\phantom{0}}^{-}}}}
\newcommand{\acidehypochloreuxaq}{\ensuremath{\mathrm{C\ell OH_{(aq)}^{\phantom{0}}}}}
\newcommand{\hypochloriteaq}{\ensuremath{\mathrm{C\ell O_{(aq)}^{-}}}}
\newcommand{\hypochlorite}{\ensuremath{\mathrm{C\ell O_{\phantom{0}}^{-}}}}
\newcommand{\hypochloreux}{\ensuremath{\mathrm{HC\ell O}}}
\newcommand{\acidesulfureux}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}SO_{3}^{\phantom{0}}}}}
\newcommand{\acidechlorhydrique}{\ensuremath{\mathrm{(H_{3}^{\phantom{0}}O_{\phantom{0}}^{+};C\ell_{\phantom{0}}^{-})}}}
\newcommand{\chloruredhydrogene}{\ensuremath{\mathrm{HC\ell}}}
\newcommand{\chloruredhydrogeneg}{\ensuremath{\mathrm{HC\ell_{(g)}^{\phantom{0}}}}}
\newcommand{\acidesulfurique}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}SO_4^{\phantom{0}}}}}
\newcommand{\solutiondacidesulfurique}{\ensuremath{\mathrm{2\,H_{\phantom{0}}^{+};SO_4^{2-}}}}
\newcommand{\dihydrogenosulfate}{\ensuremath{\mathrm{H_2^{\phantom{0}}SO_4^{\phantom{0}}}}}
\newcommand{\vitaminec}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{8}^{\phantom{0}}O_{6}^{\phantom{0}}}}}
\newcommand{\acideascorbique}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{8}^{\phantom{0}}O_{6}^{\phantom{0}}}}}
\newcommand{\acideascorbiqueaq}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{8}^{\phantom{0}}O_{6\,(aq)}^{\phantom{0}}}}}
\newcommand{\ascorbate}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{7}^{\phantom{0}}O_{6}^{-}}}}
\newcommand{\ascorbateaq}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{7}^{\phantom{0}}O_{6\,(aq)}^{-}}}}
\newcommand{\acidedeshydroascorbique}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{6}^{\phantom{0}}O_{6}^{\phantom{0}}}}}
\newcommand{\acidenitrique}{\ensuremath{\mathrm{HNO_3^{\phantom{0}}}}}
\newcommand{\acidenitriquel}{\ensuremath{\mathrm{HNO_{3\,(\ell)}^{\phantom{0}}}}}
\newcommand{\acidenitreux}{\ensuremath{\mathrm{HNO_2^{\phantom{0}}}}}
\newcommand{\acidenitriqueaq}{\ensuremath{\mathrm{HNO_{3\,(aq)}^{\phantom{0}}}}}
\newcommand{\acidephosphorique}{\ensuremath{\mathrm{H_3^{\phantom{0}}PO_4^{\phantom{0}}}}}
\newcommand{\chloruredesodium}{\ensuremath{\mathrm{NaC\ell}}}
\newcommand{\chloruredesodiums}{\ensuremath{\mathrm{NaC\ell_{(s)}^{\phantom{0}}}}}
\newcommand{\chloruredepotassium}{\ensuremath{\mathrm{KC\ell}}}
\newcommand{\chloruredepotassiums}{\ensuremath{\mathrm{KC\ell_{(s)}^{\phantom{0}}}}}
\newcommand{\hydroxydedesodium}{\ensuremath{\mathrm{(Na_{\phantom{0}}^{+};HO_{\phantom{0}}^{-})}}}
\newcommand{\soude}{\ensuremath{\mathrm{HO_{\phantom{0}}^{-}}}}
\newcommand{\acideoxalique}{\ensuremath{\mathrm{H_{2}^{\phantom{0}}C_{2}^{\phantom{0}}O_{4}^{\phantom{0}}}}}
\newcommand{\acidemethanoique}{\ensuremath{\mathrm{HCOOH}}}
\newcommand{\acidemethanoiqueaq}{\ensuremath{\mathrm{HCOOH_{(aq)}^{\phantom{0}}}}}
\newcommand{\methanoate}{\ensuremath{\mathrm{HCOO_{\phantom{0}}^{-}}}}
\newcommand{\methanoateaq}{\ensuremath{\mathrm{HCOO_{(aq)}^{-}}}}
\newcommand{\formiate}{\ensuremath{\mathrm{HCOO_{\phantom{0}}^{-}}}}
\newcommand{\formiateaq}{\ensuremath{\mathrm{HCOO_{(aq)}^{-}}}}
\newcommand{\acideformique}{\ensuremath{\mathrm{HCOOH}}}
\newcommand{\acideethanoique}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COOH}}}
\newcommand{\acideethanoiquebrute}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{4}^{\phantom{0}}O_{2}^{\phantom{0}}}}}
\newcommand{\acideethanoiqueaq}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COOH^{\phantom{0}}_{(aq)}}}}
\newcommand{\ethanoatedethyle}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COOCH_{2}^{\phantom{0}}CH_{3}^{\phantom{0}}}}}
\newcommand{\acideacetique}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COOH}}}
\newcommand{\ionethanoate}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\ethanoate}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\ethanoateaq}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COO_{\mathrm{(aq)}}^{-}}}}
\newcommand{\varethanoate}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}CO_{2}^{-}}}}
\newcommand{\varethanoateaq}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}CO_{2\,\mathrm{(aq)}}^{-}}}}
\newcommand{\acetate}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\acetateaq}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COO_{\mathrm{(aq)}}^{-}}}}
\newcommand{\acetatedethyle}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}COOC_{2}^{\phantom{0}}H_{5}^{\phantom{0}}}}}
\newcommand{\acidebenzoique}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}COOH}}}
\newcommand{\alcoolbenzylique}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}CH_{2}^{\phantom{0}}OH}}}
\newcommand{\ionbenzoate}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\benzoate}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\paranitrophenol}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}NO_{3}^{\phantom{0}}}}}
\newcommand{\paranitrophenolate}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{4}^{\phantom{0}}NO_{3}^{-}}}}
\newcommand{\benzoatedesodium}{\ensuremath{\mathrm{C_{6}^{\phantom{0}}H_{5}^{\phantom{0}}COONa}}}
\newcommand{\acidepropanoique}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}COOH}}}
\newcommand{\ionpropanoate}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\propanoate}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}COO_{\phantom{0}}^{-}}}}
\newcommand{\ethylamine}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{2}^{\phantom{0}}}}}
\newcommand{\ethylammonium}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{3}^{+}}}}
\newcommand{\ethylamineaq}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{2\,(aq)}^{\phantom{0}}}}}
\newcommand{\ethylammoniumaq}{\ensuremath{\mathrm{C_{2}^{\phantom{0}}H_{5}^{\phantom{0}}NH_{3\,(aq)}^{+}}}}
\newcommand{\ethalonate}{\ensuremath{\mathrm{CH_{3}^{\phantom{0}}CH_{2}^{\phantom{0}}O_{\phantom{0}}^{-}}}}
\newcommand{\amidure}{\ensuremath{\mathrm{NH_{2}^{-}}}}

%%% Ions monoatomiques
\newcommand{\hydrogene}{\ensuremath{\mathrm{H_{\phantom{0}}^+}}}
\newcommand{\hydrogeneaq}{\ensuremath{\mathrm{H_{(aq)}^+}}}
\newcommand{\hydrure}{\ensuremath{\mathrm{H_{\phantom{0}}^-}}}
\newcommand{\oxyde}{\ensuremath{\mathrm{O_{\phantom{0}}^{2-}}}}
\newcommand{\oxydeaq}{\ensuremath{\mathrm{O_{(aq)}^{2-}}}}
\newcommand{\sulfure}{\ensuremath{\mathrm{S_{\phantom{0}}^{2-}}}}
\newcommand{\aluminiumtrois}{\ensuremath{\mathrm{A\ell_{\phantom{0}}^{3+}}}}
\newcommand{\aluminiumtroisaq}{\ensuremath{\mathrm{A\ell_{(aq)}^{3+}}}}
\newcommand{\fluorure}{\ensuremath{\mathrm{F_{\phantom{0}}^-}}}
\newcommand{\chlorure}{\ensuremath{\mathrm{C\ell_{\phantom{0}}^-}}}
\newcommand{\chlorureaq}{\ensuremath{\mathrm{C\ell_{(aq)}^-}}}
\newcommand{\bromure}{\ensuremath{\mathrm{Br_{\phantom{0}}^-}}}
\newcommand{\bromureaq}{\ensuremath{\mathrm{Br_{(aq)}^-}}}
\newcommand{\iodure}{\ensuremath{\mathrm{I_{\phantom{0}}^-}}}
\newcommand{\iodureaq}{\ensuremath{\mathrm{I^-_{(aq)}}}}
\newcommand{\iodate}{\ensuremath{\mathrm{IO_{3}^-}}}
\newcommand{\lithium}{\ensuremath{\mathrm{Li_{\phantom{0}}^+}}}
\newcommand{\potassium}{\ensuremath{\mathrm{K_{\phantom{0}}^+}}}
\newcommand{\potassiumaq}{\ensuremath{\mathrm{K_{(aq)}^+}}}
\newcommand{\cesium}{\ensuremath{\mathrm{Cs_{\phantom{0}}^+}}}
\newcommand{\beryllium}{\ensuremath{\mathrm{Be_{\phantom{0}}^{2+}}}}
\newcommand{\magnesium}{\ensuremath{\mathrm{Mg_{\phantom{0}}^{2+}}}}
\newcommand{\magnesiumdeux}{\ensuremath{\mathrm{Mg_{\phantom{0}}^{2+}}}}
\newcommand{\magnesiumaq}{\ensuremath{\mathrm{Mg_{(aq)}^{2+}}}}
\newcommand{\magnesiumdeuxaq}{\ensuremath{\mathrm{Mg_{(aq)}^{2+}}}}
\newcommand{\chrome}{\ensuremath{\mathrm{Cr_{\phantom{0}}^{3+}}}}
\newcommand{\cobaltdeux}{\ensuremath{\mathrm{Co_{\phantom{0}}^{2+}}}}
\newcommand{\cobalttrois}{\ensuremath{\mathrm{Co_{\phantom{0}}^{3+}}}}
\newcommand{\cobaltdeuxaq}{\ensuremath{\mathrm{Co_{(aq)}^{2+}}}}
\newcommand{\cobalttroisaq}{\ensuremath{\mathrm{Co_{(aq)}^{3+}}}}
\newcommand{\manganese}{\ensuremath{\mathrm{Mn_{\phantom{0}}^{2+}}}}
\newcommand{\manganesedeuxaq}{\ensuremath{\mathrm{Mn_{(aq)}^{2+}}}}
\newcommand{\manganesedeux}{\ensuremath{\mathrm{Mn_{\phantom{0}}^{2+}}}}
\newcommand{\manganesetroisaq}{\ensuremath{\mathrm{Mn_{(aq)}^{3+}}}}
\newcommand{\manganesetrois}{\ensuremath{\mathrm{Mn_{\phantom{0}}^{3+}}}}
\newcommand{\nickeldeux}{\ensuremath{\mathrm{Ni_{\phantom{0}}^{2+}}}}
\newcommand{\ferdeux}{\ensuremath{\mathrm{Fe_{\phantom{0}}^{2+}}}}
\newcommand{\ferdeuxaq}{\ensuremath{\mathrm{Fe^{2+}_{(aq)}}}}
\newcommand{\fertrois}{\ensuremath{\mathrm{Fe_{\phantom{0}}^{3+}}}}
\newcommand{\fertroisaq}{\ensuremath{\mathrm{Fe^{3+}_{(aq)}}}}
\newcommand{\cuivreun}{\ensuremath{\mathrm{Cu_{\phantom{0}}^+}}}
\newcommand{\cuivredeux}{\ensuremath{\mathrm{Cu_{\phantom{0}}^{2+}}}}
\newcommand{\cuivredeuxaq}{\ensuremath{\mathrm{Cu_{(aq)}^{2+}}}}
\newcommand{\zincdeux}{\ensuremath{\mathrm{Zn_{\phantom{0}}^{2+}}}}
\newcommand{\zincdeuxaq}{\ensuremath{\mathrm{Zn^{2+}_{(aq)}}}}
\newcommand{\mercuredeux}{\ensuremath{\mathrm{Hg_{\phantom{0}}^{2+}}}}
\newcommand{\sodium}{\ensuremath{\mathrm{Na_{\phantom{0}}^+}}}
\newcommand{\sodiumaq}{\ensuremath{\mathrm{Na^+_{(aq)}}}}
\newcommand{\argent}{\ensuremath{\mathrm{Ag_{\phantom{0}}^+}}}
\newcommand{\argentaq}{\ensuremath{\mathrm{Ag_{(aq)}^+}}}
\newcommand{\calcium}{\ensuremath{\mathrm{Ca_{\phantom{0}}^{2+}}}}
\newcommand{\calciumaq}{\ensuremath{\mathrm{Ca_{(aq)}^{2+}}}}
\newcommand{\strontium}{\ensuremath{\mathrm{Sr_{\phantom{0}}^{2+}}}}
\newcommand{\plomb}{\ensuremath{\mathrm{Pb_{\phantom{0}}^{2+}}}}
\newcommand{\plombdeux}{\ensuremath{\mathrm{Pb_{\phantom{0}}^{2+}}}}
\newcommand{\plombdeuxaq}{\ensuremath{\mathrm{Pb_{(aq)}^{2+}}}}
\newcommand{\cadmiumdeux}{\ensuremath{\mathrm{Cd_{\phantom{0}}^{2+}}}}
\newcommand{\chrometrois}{\ensuremath{\mathrm{Cr_{\phantom{0}}^{3+}}}}
\newcommand{\baryum}{\ensuremath{\mathrm{Ba_{\phantom{0}}^{2+}}}}
\newcommand{\baryumaq}{\ensuremath{\mathrm{Ba_{(aq)}^{2+}}}}
\newcommand{\etaindeux}{\ensuremath{\mathrm{Sn_{\phantom{0}}^{2+}}}}

%%% Petit symbole sympa de fin de paragraphe. Utilisation: \voila
\newcommand{\voila}{\begin{center}\difficulte{1} \difficulte{1}\\\demilignemoins\difficulte{1}\end{center}\lignemoins}

%%% Titre d'1 ligne centrée et encadrée, utilisation: \titre{mon titre}
\newcommand{\titre}[1]{\setlength{\sboxsep}{0.5ex}
                       \setcounter{section}{0}
                       \setcounter{masection}{0}
                       \begin{center}
                       \shabox{\Large{}#1}
                       \end{center}}

%%% Meme chose, mais avec une plus petite police, utilisation: \titrepetit{mon titre}
\newcommand{\titrepetit}[1]{\setlength{\sboxsep}{0.32ex}
                            \setcounter{section}{0}
                            \setcounter{masection}{0}
                            \begin{center}
                            \shabox{#1}
                            \end{center}}

%%%% Utilisation: \titreauto{premiere ligne}{seconde ligne}
\newlength{\tailletitreautoun}
\newlength{\tailletitreautodeux}

\newcommand{\titreauto}[2]{
  \settowidth{\tailletitreautoun}{{\Large{}#1}}
  \settowidth{\tailletitreautodeux}{{\Large{}#2}}
  \ifthenelse{\tailletitreautodeux > \tailletitreautoun}
    {\begin{center}
     \setlength{\sboxsep}{0.5ex}
     \shabox{
       \begin{minipage}{\tailletitreautodeux}
       \begin{center}
       {\Large\hspace*{-0.32em}#1 \\ \hspace*{-0.32em}#2}
       \end{center}
       \end{minipage}}
     \end{center}}
    {\begin{center}
     \setlength{\sboxsep}{0.5ex}
     \shabox{
       \begin{minipage}{\tailletitreautoun}
       \begin{center}
       {\Large\hspace*{-0.32em}#1 \\ \hspace*{-0.32em}#2}
       \end{center}
       \end{minipage}}
     \end{center}}}

\newcommand{\titreautopetit}[2]{
  \settowidth{\tailletitreautoun}{{#1}}
  \settowidth{\tailletitreautodeux}{{#2}}
  \ifthenelse{\tailletitreautodeux > \tailletitreautoun}
    {\begin{center}
     \setlength{\sboxsep}{0.32ex}
     \shabox{
       \begin{minipage}{\tailletitreautodeux}
       \begin{center}
       {\hspace*{-0.32em}#1 \\ \hspace*{-0.32em}#2}
       \end{center}
       \end{minipage}}
     \end{center}}
    {\begin{center}
     \setlength{\sboxsep}{0.32ex}
     \shabox{
       \begin{minipage}{\tailletitreautoun}
       \begin{center}
       {\hspace*{-0.32em}#1 \\ \hspace*{-0.32em}#2}
       \end{center}
       \end{minipage}}
     \end{center}}}

%%% Potentiel standard en thermo et autres symboles dérivés
\newcommand{\potentielstandard}{\ensuremath{E^{\mathrm{o}}}}

%%% écriture des vecteurs, en gras avec une flèche (visibilite assurée)
%%% Utilisation: \vect{B}, \vectb{B} pour le gras, \vectm{B} pour le roman
%%% \vect{v}{1} pour le subscript
%%% La commande LaTeX de base est $\vec{B}$ (passage en math nécessaire)
\newcommand{\vecteur}[1]{\ensuremath{\overrightarrow{\mathrm{\mathbf{#1}}}}}
\newcommand{\vectm}[1]{\ensuremath{\overrightarrow{\mathrm{#1}}}}
\newcommand{\vect}[1]{\ensuremath{\,\overrightarrow{\!#1}}}
\newcommand{\vectsub}[2]{\ensuremath{\,\overrightarrow{\!#1}\!\!_{#2}}}
\newcommand{\vectmsub}[2]{\ensuremath{\overrightarrow{\mathrm{#1}}\!\!_{#2}}}

%%% Equations locales (\nabla existe déjà!)
\newcommand{\divergence}[1]{\mathrm{\mbox{div}}\vect{#1}}
\newcommand{\gradient}[1]{\vect{\mathrm{\mbox{grad}}}\ \vect{#1}}
\newcommand{\rotationnel}[1]{\vect{\mathrm{\mbox{rot}}}\ \vect{#1}}
\newcommand{\laplacien}[1]{\Delta{}#1}
\newcommand{\laplacienvect}[1]{\vect{\Delta}\ \vect{#1}}
\newcommand{\nablavect}[1]{\vect{\nabla}}

%%% Charges partielles en chimie (couleurs standards?)
\newcommand{\deltaplus}{\ensuremath{\blue\delta\oplus}}
\newcommand{\deltamoins}{\ensuremath{\red\delta\ominus}}

%%% Petit bonus de presentation des exos, des vrai/faux a barrer. Utilisation: \vraifaux
\newcommand{\vraifaux}{\mbox{} \dotfill \fbox{V}\fbox{F}}
\newcommand{\vrai}{\mbox{} \dotfill \fbox{V}\fcolorbox{black}{darkgray}{F}}
\newcommand{\faux}{\mbox{} \dotfill \fcolorbox{black}{darkgray}{V}\fbox{F}}

%%% Notation de la difficulté d'un exercice. Utilisation: \difficulte{1}
\newcommand*{\difficulte}[1]{%
  \ifcase#1
    $\clubsuit$ \or $\star$ \or $\star\hspace{-0.2ex}\star$ \or $\star\!\!\star\!\!\star$
  \else {}
  \fi\compense{}}

%%% Ligne de séparation des exercices. Utilisation: \ligne
\newcommand{\ligne}{\vspace{3ex}
           \hrule
           \vspace{-0.6ex}
           \setcounter{section}{0}}

%%% Trou dans un texte... à trous! Utilisation: \mot
%%% Pour avoir le bon espacement: \gap{mon trou}
\newcommand{\mot}{\raisebox{-3pt}{\parbox{10ex}{\dotfill}}\ }
\newcommand{\motdouble}{\raisebox{-3pt}{\parbox{20ex}{\dotfill}}\ }
\newcommand{\lignereponse}{\demiligneplus\dotfill \\ \quartlignemoins}
\newcounter{reponsec}
\newcommand{\lignereponsec}{\stepcounter{reponsec}\demiligneplus\ligneplus\fbox{\textbf{\arabic{reponsec}}}\dotfill \\ \demilignemoins}
\dashundergapssetup{gap-widen=true,gap-extend-percent=30,dot,gap-numbers=false}
%\dashundergapssetup{gap-widen=false,gap-extend-percent=0,dot,gap-numbers=true}
%\newcommand{\trou}[1]{\gap{#1}} % inutile

%%% Quelques commandes utiles pour taper les maths plus facilement
\newcommand{\equivalent}{\ensuremath{\quad\Leftrightarrow\quad}}
\newcommand{\equivalentmini}{\ensuremath{\ \Leftrightarrow\ }}
\newcommand{\miniequivalent}{\ensuremath{\ \Leftrightarrow\ }}
\newcommand{\demiequivalent}{\ensuremath{\Leftrightarrow\quad}}
\newcommand{\implique}{\ensuremath{\quad\Rightarrow\quad}}
\newcommand{\demiimplique}{\ensuremath{\Rightarrow\quad}}
\newcommand{\impliquemini}{\ensuremath{\ \Rightarrow\ }}
\newcommand{\miniimplique}{\ensuremath{\ \Rightarrow\ }}
\newcommand{\suivant}{\ensuremath{\quad\longrightarrow\quad}}

%%% Environnement 'essentielducours': résumé a la fin d'un chapitre.
\newenvironment{essentielducours}
  {\vfill \begin{center} \begin{tabular}{|p{331pt}|} \hline \section*{L'essentiel} \begin{itemize}}
  {\end{itemize} \\ \hline \end{tabular} \end{center}}

%%% encadre
%%% Équation mathématique encadrée, sans numéro
\newcommand{\encadre}
  [1]
  {\tcbset{reset,blanker,borderline={0.4pt}{0pt}{black},boxsep=1ex}
   \tcboxmath{#1}}

%%% Raccourci pour encadrer une partie de formule mathématique. Utilisation: \monresultat{resultat}
\newcommand{\monresultat}[1]{\fbox{\ensuremath{#1\!}}}

%%% introduction
%%% 0,8 page non encadrée
\newtcolorbox{introduction}
  {reset,
   blanker,
   boxsep=0pt,
   top=0pt,
   bottom=0pt,
   left skip=0.1\linewidth,
   right skip=0.1\linewidth,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   after skip=0.5\baselineskip plus 2pt,
   before skip=0.5\baselineskip plus 2pt,
   breakable}

%%% econclusion et cconlusion (e environnement et c commande)
%%% Encadré pleine page
\newtcolorbox{econclusion}
  {reset,
   blanker,
   borderline={0.4pt}{0pt}{black},
   boxsep=0pt,
   top=0.3\baselineskip,
   bottom=0.3\baselineskip,
   left=1ex,
   right=1ex,
   boxrule=0.4pt,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   after skip=0.5\baselineskip plus 2pt,
   before skip=0.5\baselineskip plus 2pt,
   breakable}

\newcommand{\cconclusion}
  [1]
  {\begin{econclusion}
    #1
    \end{econclusion}}

%%% essentiel
%%% Encadré à 0.7\linewidth et implique à gauche
\newtcolorbox{eessentiel}
  {reset,
   blanker,
   attach boxed title to top left={yshift=-1.195\baselineskip,
                                   xshift=-36pt},
   %breakable,
   coltitle=black,
   title=$\Longrightarrow$,
   borderline={0.4pt}{0pt}{black},
   top=0.3\baselineskip,
   bottom=0.3\baselineskip,
   left=1ex,
   right=1ex,
   left skip=0.15\linewidth,
   right skip=0.15\linewidth,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   after skip=0.5\baselineskip plus 2pt,
   before skip=0.5\baselineskip plus 2pt}
   
\newcommand{\essentiel}
  [1]
  {\begin{eessentiel}
    #1
    \end{eessentiel}}

%%% important
%%% Encadré à 0.7\linewidth
\newtcolorbox{eimportant}
  {reset,
   blanker,
   %breakable,
   borderline={0.4pt}{0pt}{black},
   top=0.3\baselineskip,
   bottom=0.3\baselineskip,
   left=1ex,
   right=1ex,
   left skip=0.15\linewidth,
   right skip=0.15\linewidth,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   after skip=0.5\baselineskip plus 2pt,
   before skip=0.5\baselineskip plus 2pt}
   
\newcommand{\important}
  [1]
  {\begin{eimportant}
    #1
    \end{eimportant}}

%%% principal
%%% Encadré à 0.8\linewidth
\newtcolorbox{eprincipal}
  {reset,
   blanker,
   %breakable,
   borderline={0.4pt}{0pt}{black},
   top=0.3\baselineskip,
   bottom=0.3\baselineskip,
   left=1ex,
   right=1ex,
   left skip=0.1\linewidth,
   right skip=0.1\linewidth,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   after skip=0.5\baselineskip plus 2pt,
   before skip=0.5\baselineskip plus 2pt}
   
\newcommand{\principal}
  [1]
  {\begin{eprincipal}
    #1
    \end{eprincipal}}

%%% principalbf
%%% Encadré à 0.8\linewidth avec gras
\newtcolorbox{eprincipalebf}
  {reset,
   blanker,
   %breakable,
   borderline={0.4pt}{0pt}{black},
   top=0.6\baselineskip,
   bottom=0.6\baselineskip,
   left=2ex,
   right=2ex,
   left skip=0.1\linewidth,
   right skip=0.1\linewidth,
   before upper={\parskip0.5\baselineskip plus 2pt\noindent},
   after skip=0.5\baselineskip plus 2pt,
   before skip=0.5\baselineskip plus 2pt}
   
\newenvironment{eprincipalbf}
  {\bfseries\begin{eprincipalebf}}
  {\end{eprincipalebf}}
   
\newcommand{\principalbf}
  [1]
  {\begin{eprincipalbf}
    #1
    \end{eprincipalbf}}

%%% Environnement 'cadre' encadre de largeur variable
%%% Utilisation similaire a 'minipage'
\newsavebox{\montexte}
\newenvironment{cadre}[1]{\smallskip
                          \begin{lrbox}{\montexte}
                            \begin{minipage}{#1}}
                         {  \end{minipage}
                          \end{lrbox}
                          \fbox{\usebox{\montexte}}}
                          
%%% Environnement 'minipoints' similaire a 'itemize'
%%% mais sans aucun espace et avec des minipoints au lieu des tirets
\newenvironment{minipoints}%
  {\begin{list}{\tiny $\bullet$}%
               {\setlength{\labelwidth}{1em}%
                \setlength{\leftmargin}{1.2em}%
%                \setlength{\itemsep}{0em}%
%                \setlength{\parsep}{0em}%
%                \setlength{\topsep}{-0.2em}
               }}%
  {\end{list}}

%%% Environnement 'points' similaire a 'itemize'
%%% mais avec des $\bullet$ au lieu des tirets
\newenvironment{points}%
  {\begin{list}{$\bullet$}{\setlength{\leftmargin}{1em}}}
%%%                \setlength{\leftmargin}{1.2em}%
%%%                \setlength{\itemsep}{0em}%
%%%                \setlength{\parsep}{0.2em}%
%%%                \setlength{\parskip}{0em}%
%%%                \setlength{\topsep}{0em}}}
  {\end{list}}

%%% Environnement 'abcitem' pour les questions dans un exercice
%%% Utilisation similaire a 'itemize'
\newcounter{abcnum}
\newenvironment{abcitem}%
  {\begin{list}{\textbf{\alph{abcnum}\hfill{}.}}%
               {\usecounter{abcnum}%
                \setlength{\labelwidth}{1em}%
                \setlength{\leftmargin}{1.49em}%
%                \setlength{\parsep}{0em}%
%                \setlength{\topsep}{-0.2em}
                }}%
  {\end{list}}

%%% Environnement 'sousabcitem' pour les questions dans un exercice
%%% R√Çéutilisation du num√Çéro de '123item' √Çà chaque item
\newcounter{sousabcnum}
\newenvironment{sousabcitem}%
  {\begin{list}{\textbf{\arabic{123num}.\alph{sousabcnum}\hfill{}.}}%
               {\usecounter{sousabcnum}%
                \setlength{\labelwidth}{1.8em}%
                \setlength{\leftmargin}{0.91em}%
%                \setlength{\parsep}{0.1em}%
%                \setlength{\topsep}{0em}
               }}%
  {\end{list}}

%%% Environnement 'ssabcitem' pour les questions dans un exercice
%%% R√Çéutilisation du num√Çéro de '123item' et 'sous123item' √Çà chaque item
\newcounter{soussousabcnum}
\newenvironment{ssabcitem}%
  {\begin{list}{\textbf{\arabic{123num}.\arabic{sous123num}.\alph{soussousabcnum}\hfill{}.}}%
               {\usecounter{soussousabcnum}%
                \setlength{\labelwidth}{2.7em}%
                \setlength{\leftmargin}{0.9em}%
%                \setlength{\parsep}{0.1em}%
%                \setlength{\topsep}{0em}
               }}%
  {\end{list}}

%%% Environnement '123item' similaire a 'enumerate'
%%% mais sans aucun espace
\newcounter{123num}
\newenvironment{123item}%
  {\begin{list}{\textbf{\arabic{123num}.}}%
               {\usecounter{123num}%
%                \setlength{\labelwidth}{0.9em}% rien
                \setlength{\leftmargin}{1.4em}%
%                \setlength{\parsep}{0.1em}%
%                \setlength{\topsep}{0.1em}
               }}%
  {\end{list}}

%%% Environnement 'sous123item' pour les questions dans un exercice
%%% Réutilisation du numéro de '123item' à chaque item
\newcounter{sous123num}
\newenvironment{sous123item}%
  {\begin{list}{\textbf{\arabic{123num}.\arabic{sous123num}.}}% \hfill{}
               {\usecounter{sous123num}%
                \setlength{\labelwidth}{1.8em}%
                \setlength{\leftmargin}{0.9em}%
%                \setlength{\parsep}{0.1em}%
%                \setlength{\topsep}{0em}
               }}%
  {\end{list}}

%%% Environnement 'ss123item' pour les questions dans un exercice
%%% Réutilisation du numéro de '123item' à chaque item
\newcounter{soussous123num}
\newenvironment{ss123item}%
  {\begin{list}{\textbf{\arabic{123num}.\arabic{sous123num}.\arabic{soussous123num}.}}% \hfill{}
               {\usecounter{soussous123num}%
                \setlength{\labelwidth}{2.7em}%
                \setlength{\leftmargin}{0.9em}%
%                \setlength{\parsep}{0.1em}%
%                \setlength{\topsep}{0em}
               }}%
  {\end{list}}

%%% Petit carre ombré pour la liste suivante (avec TikZ)
%%% \ding{113} avec le package pifont
%\newcommand{\monbox}{\begin{tikzpicture}[scale=0.035ex]
%                     \draw[fill=black] (-0.05,-0.05) rectangle (-1.15,1.05);
%                     \draw[fill=white] (-0.2,0.1) rectangle (-1.3,1.2);
%                     \end{tikzpicture}}

%%% Environnement 'boiteacocher' pour les QCM
%%% Utilisation similaire a 'itemize'
\newenvironment{boiteacocher}%
  {\begin{list}{{\small\ding{113}}}%
               {\setlength{\labelwidth}{1em}%
                \setlength{\leftmargin}{1.2em}%
                \setlength{\itemsep}{0em}%
%                \setlength{\parsep}{0em}%
%                \setlength{\topsep}{-0.2em}
               }}%
  {\end{list}}

%%% Environnement 'vboiteacocher' pour les QCM
%%% Avec un petit espace entre items
\newenvironment{vboiteacocher}%
  {\begin{list}{{\small\ding{113}}}%
               {\setlength{\labelwidth}{1em}%
                \setlength{\leftmargin}{1.2em}%
                \setlength{\itemsep}{0em}%
%                \setlength{\parsep}{1ex}%
%                \setlength{\topsep}{1ex}
               }}%
  {\end{list}}

%%% Environnement 'bacitem' pour les QCM
%%% Utilisation similaire a 'boiteacocher'
\newenvironment{bacitem}%
  {\begin{list}{{\small\ding{113}}}%
               {\setlength{\labelwidth}{1em}%
                \setlength{\leftmargin}{2em}%
                \setlength{\itemsep}{0em}%
%                \setlength{\parsep}{0em}%
%                \setlength{\topsep}{-0.2em}
               }}%
  {\end{list}}

%%% Environnement 'bacitemtrois' pour les QCM
%%% Utilisation similaire a 'boiteacocher'
\newenvironment{bacitemtrois}%
  {\begin{list}{{\small\ding{113}\,\ding{113}\,\ding{113}}}%
               {\setlength{\labelwidth}{1em}%
                \setlength{\leftmargin}{2em}%
                \setlength{\itemsep}{0em}%
%                \setlength{\parsep}{0em}%
%                \setlength{\topsep}{-0.2em}
               }}%
  {\end{list}}

%%% Pour les grilles de correction,
%%% une commande ``tout ou rien''
\newcommand{\toutourien}{\textsc{tor}}

%%% Pour adapter le reste du texte aux environnements sans espaces
%%% qui precedent, un remplacant de 'center'
\newenvironment{centre}%
  {\vspace*{-1.5ex}%
   \begin{center}}
  {\end{center}%
   \vspace*{-1.5ex}}

%%% Un remplacant de 'caption'
%%% Adapté a multicols
\newcounter{nummacaption}
\newcounter{nummacaptiontab}
\newcommand{\macaption}[1]%
  {\stepcounter{nummacaption}\begin{center}\parbox{0.8\linewidth}{\textsc{Fig. \arabic{nummacaption} -- }#1}\end{center}}
\newcommand{\mapetitecaption}[1]%
  {\stepcounter{nummacaption}\begin{center}\textsc{Fig. \arabic{nummacaption} -- }#1\end{center}}
\newcommand{\macaptiontab}[1]%
  {\stepcounter{nummacaptiontab}\begin{center}\parbox{0.8\linewidth}{\textsc{Tab. \arabic{nummacaptiontab} -- } #1}\end{center}}
\newcommand{\mapetitecaptiontab}[1]%
  {\stepcounter{nummacaptiontab}\begin{center}\textsc{Tab. \arabic{nummacaptiontab} -- }#1\end{center}}
\newcommand{\macaptionlabel}[2]%
  {\stepcounter{nummacaption}\begin{center}\parbox{0.8\linewidth}{\textsc{Fig. \arabic{nummacaption} -- } #1}\monlabel{#2}\end{center}}
\newcommand{\mapetitecaptionlabel}[2]%
  {\stepcounter{nummacaption}\begin{center}\textsc{Fig. \arabic{nummacaption} -- }#1\monlabel{#2}\end{center}}
\newcommand{\monlabel}[1]%
  {\newcounter{#1}
   \setcounter{#1}{\arabic{nummacaption}}}
\newcommand{\mareference}[1]%
  {\arabic{#1}}

%%% Un remplacant de 'caption'
%%% Adapté a multicols
%%% Sans le \parbox pour un centrage correct d'une seule ligne
%%% Sans le \T3 pour une imitation parfaite de \caption
%%% Avec une incrémentation du compteur de l'environnement 'figure'
\newcommand{\macaptionsimple}[1]%
  {\stepcounter{figure}{\textsc{Fig. \arabic{figure} --} #1}}

%%% Un remplacant de 'figure'
%%% Adapté a multicols
\newenvironment{mafigure}%
  {\begin{minipage}{\linewidth}
   \begin{center}}
  {\end{center}
   \end{minipage}}

%%% Pas d'indentation des paragraphes
%%% Dans quelques cas particuliers
\newcommand{\sansindent}{\AtBeginDocument{\setlength{\parindent}{0pt}}}
\newcommand{\sanspage}{\pagestyle{empty}}

%%% Création d'une ligne de séparation entre les colonnes
%%% (Pas de ligne par défaut avec multicols)
\newcommand*{\filet}[0]{\setlength{\columnseprule}{0.4pt}}

%\newcommand*{\filetetroit}[0]{\setlength{\columnsep}{6.35mm}
%                              \setlength{\columnseprule}{0.4pt}}

%%% Filet avec multicols
%%% Plus fin que le précédent!
\newcommand*{\finfilet}[0]{\setlength{\columnseprule}{.1pt}}

%%% Filet avec multicols
%%% Plus rien
\newcommand*{\sansfilet}[0]{\setlength{\columnseprule}{0pt}}

%%% Filet avec multicols
%%% Plus rien, plus large
%\newcommand*{\sansfiletlarge}[0]{\setlength{\columnsep}{0.75cm}
%                                 \setlength{\columnseprule}{0pt}}

%%% Filet avec multicols
%%% Plus rien, encore plus large
%\newcommand*{\sansfilettreslarge}[0]{\setlength{\columnsep}{1cm}
%                                     \setlength{\columnseprule}{0pt}}

%%% Commande 'chapitre'
%%% Plus adaptée que \chapter pour gagner de la place
\newcounter{chapitre}
\newcounter{seance}
\newcommand{\chapitre}[1]{
{\bfseries{\huge Chapitre \arabic{chapitre}\\ \mbox{}\\ {\Huge #1}\demiligneplus}}
\setcounter{numquestions}{0}
\setcounter{numexos}{0}}

%%% Et son pendant 'correction'
\newcommand{\correction}[1]{
{\bfseries{\huge Corrig\'e \arabic{chapitre}\\ \mbox{}\\ {\Huge #1}\demiligneplus}}
\setcounter{numquestions}{0}
\setcounter{numexos}{0}}

%%% Commande 'minichapitre'
%%% Plus adaptée que \chapter pour gagner de la place
\newcommand{\minichapitre}[1]{
{\bfseries{\Large Chapitre \arabic{chapitre}\\ {\huge #1}\quartligneplus}}
\setcounter{numquestions}{0}
\setcounter{numexos}{0}}

%%% Et son pendant 'minicorrection'
\newcommand{\minicorrection}[1]{
{\bfseries{\Large Corrig\'e \arabic{chapitre}\\ {\huge #1}\quartligneplus}}
\setcounter{numquestions}{0}
\setcounter{numexos}{0}}

%%% Commande 'nanochapitre'
%%% Plus adaptée que \chapter pour gagner de la place
\newcommand{\nanochapitre}[1]{
{\bfseries{\large Chapitre \arabic{chapitre}\\ {\Large #1}}}
\setcounter{numquestions}{0}
\setcounter{numexos}{0}}

%%% Et son pendant 'nanocorrection'
\newcommand{\nanocorrection}[1]{
{\bfseries{\large Corrig\'e \arabic{chapitre}\\ {\Large #1}}}
\setcounter{numquestions}{0}
\setcounter{numexos}{0}}

%%% Environnement 'revision'
%%% Utiliser \item[] pour rentrer un élément
\newenvironment{revision}{%
  \bandeau{Révision et Résumé}
  \begin{multicols}{2}
  \begin{description}\setlength{\leftmargin}{0.5cm}}{%
  \end{description}
  \end{multicols}}

%%% Environnement 'motsclefs'
%%% Separer les mots clefs par des lignes vides
\newenvironment{motsclefs}{%
  \bandeau{Mots clés}
  \begin{multicols}{4}
  \bfseries}{%
  \normalfont
  \end{multicols}}

%%% Environnement 'motsclefstrois'
%%% Séparer les mots clefs par des lignes vides, en 3 colonnes
\newenvironment{motsclefstrois}{%
  \bandeau{Mots clés}
  \begin{multicols}{3}
  \bfseries}{%
  \normalfont
  \end{multicols}}

%%% Environnement 'motsclefscinq'
%%% Séparer les mots clefs par des lignes vides, en 5 colonnes
\newenvironment{motsclefscinq}{%
  \bandeau{Mots clés}
  \begin{multicols}{5}
  \bfseries\small}{%
  \normalfont
  \end{multicols}}

%%% Environnement 'questions'
%%% Utiliser \question{} pour rentrer un élément
\newenvironment{questions}{%
  \bandeau{Questions}
  \begin{multicols}{2}}{%
  \end{multicols}}

%%% Environnement 'applications'
%%% Utiliser \quexo{} pour rentrer un élément
\newenvironment{applications}[1][\demilignemoins]{%
  \bandeau{Applications du cours}
    \begin{center}
    {\itshape #1}
    \end{center}
  \troisquartlignemoins
  \begin{multicols}{2}}{%
  \end{multicols}}

%%% Environnement 'exercices'
%%% Utiliser \quexo{} pour rentrer un élément
%%% Mettre un texte entre crochets apres le \begin{exercices}
%%% Pour rajouter une ligne de commentaires
\newenvironment{exercices}[1][\demilignemoins]{%
  \bandeau{Exercices}
    \begin{center}
    {\itshape #1}
    \end{center}
  \troisquartlignemoins
  \begin{multicols}{2}}{%
  \end{multicols}}

%%% Environnement 'exercicestrois'
%%% Utiliser \quexo{} pour rentrer un élément
%%% Mettre un texte entre crochets apres le \begin{exercices}
%%% Pour rajouter une ligne de commentaires
\newenvironment{exercicestrois}[1][\demilignemoins]{%
  \bandeau{Exercices}
    \begin{center}
    {\itshape #1}
    \end{center}
  \troisquartlignemoins
  \begin{multicols}{3}}{%
  \end{multicols}}

%%% Environnement 'problemes'
%%% Utiliser \quexo{} pour rentrer un élément
%%% Mettre un texte entre crochets apres le \begin{problemes}
%%% Pour rajouter une ligne de commentaires
\newenvironment{problemes}[1][\demilignemoins]{%
  \bandeau{Probl\`emes}
    \begin{center}
    {\itshape #1}
    \end{center}
  \troisquartlignemoins
  \begin{multicols}{2}}{%
  \end{multicols}}

%%% Environnement 'bac'
%%% Utiliser \quexo{} pour rentrer un élément
%%% Mettre un texte entre crochets apres le \begin{bac}
%%% Pour rajouter une ligne de commentaires
\newenvironment{bac}[1][\demilignemoins]{%
  \bandeau{Baccalaur\'eat}
    \begin{center}
    {\itshape #1}
    \end{center}
  \troisquartlignemoins
  \begin{multicols}{2}}{%
  \end{multicols}}

%%% Nouvelles definitions remaniées pour \que et \quq
%%% Pour les exercices et les questions
\newcounter{numexos}
\setcounter{numexos}{0}
\newcounter{numquestions}
\setcounter{numquestions}{0}

%%% Pour les questions, sans référence au numéro d'énoncé
\newcommand{\anciennequestion}[1]{\addtocounter{numquestions}{1}\noindent\fbox{\small\textbf{\raisebox{1pt}{Q\,\arabic{numquestions}}}} \textbf{#1}}

%%% Pour les questions posées, avec un liseré gris
%\newcommand{\questionresolu}[1]{\addtocounter{numquestions}{1}\noindent\fcolorbox{black}{lightgray}{\small\textbf{\raisebox{1pt}{Q\,\arabic{numquestions}}}} \textbf{#1}}

%%% Pour les exercices
\newcommand{\quexo}[1]{\addtocounter{numexos}{1}\noindent\fbox{\small\textbf{\arabic{chapitre}.\arabic{numexos}}} \textbf{#1}}

%%% Pour les exercices
\newcommand{\exercice}[1]{\addtocounter{numexos}{1}\noindent\fbox{\small\textbf{\arabic{chapitre}.\arabic{numexos}}} \textbf{#1}}

%%% Pour les exercices
\newcommand{\exercicec}[1]{\addtocounter{numexos}{1}\noindent\fbox{\small\textbf{\arabic{chapitre}.\arabic{numexos}}} \textbf{#1}\hfill{\itshape{}Corr. p.~\pageref{#1}}}

%%% Pour les exercices posés, avec un liseré gris
\newcommand{\quexoresolu}[1]{\addtocounter{numexos}{1}\noindent\fcolorbox{black}{lightgray}{\small\textbf{\arabic{chapitre}.\arabic{numexos}}} \textbf{#1}}

%%% Pour les exercices posés, avec un liseré gris
\newcommand{\exerciceresolu}[1]{\addtocounter{numexos}{1}\noindent\fcolorbox{black}{lightgray}{\small\textbf{\arabic{chapitre}.\arabic{numexos}}} \textbf{#1}}

%%% Pour les exercices posés, avec un liseré gris
\newcommand{\exercicer}[1]{\addtocounter{numexos}{1}\noindent\fcolorbox{black}{lightgray}{\small\textbf{\arabic{chapitre}.\arabic{numexos}}} \textbf{#1}\label{#1}}

%%% Bandeau grisé
\newcommand{\bandeau}[1]{
\begin{tikzpicture}
\node[left color=gray,right color=lightgray!50] 
	{
	 \begin{minipage}{0.988\linewidth}
     \textcolor{white}{\Large{\textsc{#1}}}
	 \end{minipage}
	};
\end{tikzpicture}
\lignemoins\troisquartlignemoins
}

%%% Nom et prénom dans les devoirs de cours
\newcommand{\nomprenom}{\textbf{Nom: \dotfill Prénom \dotfill}\demiligneplus}
\newcommand{\nomprenomtable}{\textbf{Nom: \dotfill Prénom \dotfill Table \no{}\mot}\demiligneplus}
\newcommand{\nomprenomclasse}{\textbf{Nom: \dotfill Prénom \dotfill Classe \mot}\demiligneplus}
