%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%												Debugage Lualatex												%
%				 																							%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{luatex85}
\def\pgfsysdriver{pgfsys-pdftex.def}
\directlua{math.randomseed(2048)}						% Pour générer les mêmes nombres aléatoires entre deux compilations des nombres
\directlua{dofile("MesFonctions.lua")}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%												Packages LATEX												%
%																											%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{etex}							%Pour ne pas être limité par le nombre de registre
\RequirePackage{tikz}
\usetikzlibrary{scopes} 
\usetikzlibrary{decorations.pathreplacing}				% Pour les accolades avec Tikz
%\RequirePackage{pgf}
\RequirePackage{pgfplots}
\usetikzlibrary{plotmarks}
\RequirePackage[utf8]{inputenc}    
\RequirePackage[french]{babel}
\RequirePackage[T1]{fontenc}
\RequirePackage{setspace}
\RequirePackage{graphicx}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage[scientific-notation=true]{siunitx}		%A priori pas nécessaire pour afficher le résultat d'un calcul sous forme scientifique ...(cf Question calcul simple avec pgfmathsparse)
\RequirePackage{tabularx}
\RequirePackage{array}							% Pour faire des tableaux avec un nouveau type de mise en forme de colonnes					
\RequirePackage{multido}
\sisetup{locale = FR,detect-all}														%Notation française 
\setlength{\parindent}{0cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%													AMC	 													%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{multicol}						% Pour mettre des réponses ou questions sur plusieurs colonnes page 18 de la doc
\RequirePackage[francais,bloc]{automultiplechoice}   
\RequirePackage{csvsimple}						% Package nécessaire pour éditer des copies pré-identifiées à l'aide du fichier csv
\geometry{hmargin=2cm,headheight=2cm,headsep=.3cm,footskip=1cm,top=2.5cm,bottom=2.5cm} % Définition des marges verticales et horizontales

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%										Packages Mise en forme - TextColorBox 										%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{color}
\RequirePackage{xcolor}
\RequirePackage{colortbl}
\RequirePackage{tcolorbox}						%Pour générer les boîtes encadrant les documents
\tcbuselibrary{breakable}
\tcbuselibrary{skins}
\RequirePackage{enumitem}						%Pour gérer la mise en forme des listes
\RequirePackage{pifont}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%									Packages propres à la Physique Chimie											%
%																											%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{mhchem}
\RequirePackage{chemfig}
\RequirePackage{pgf-spectra}

% \RequirePackage[inline]{asymptote} 				Provoque le plantage d'AMC


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%											Gestion des compteurs 												%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcounter{CompteurExercice}					% Compteur servant à indexer les exercices des DS
\setcounter{CompteurExercice}{1}	

\newcounter{CompteurQuestionAMC}					% Compteur servant à indexer les exercices des DS
\setcounter{CompteurQuestionAMC}{1}	

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%											NOUVELLES COMMANDES AMC										%
%				 																							%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%		\NotationAMC		A placer après \begin{Document}															%		
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\NotationAMC}{
\AMCsetScoreZone{width=2em,height=2ex,depth=2ex,position=margins}  % Définition de la zone de notation des questions avec comme options possibles pour position: none, question, margin et margins (cf page 22 doc)

\baremeDefautM{formula=(NBC-NMC),p=0}  % pour +1 pour une bonne réponse et - 1 pour une mauvaise réponse
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																											%
%		\sujet{}		Contenu de la copie d'un seul élève																%		
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ContenuSujet}[1]{

\newcommand{\sujet}{
  \onecopy{1}{    

   \champnom{\fbox{    
        \begin{minipage}{\linewidth}
          \centering\Large\bf \textsc{\nom{}} \prenom{}
       
          \vspace*{1mm}
        \end{minipage}
      }}
      
    \vspace{1ex}

#1

    \AMCassociation{\id}
    \cleardoublepage
  }
}
    

}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QuestionLualatex		Question de synthèse 																%
%																											%		
%		\QuestionLualatex											  											%
%																											%
%																											%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QuestionLualatex}{\directlua{QuestionLua()}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QSHDeux{}{}{}		Question Simple Horizontale AMC avec 2 propositions											%
%																											%		
%		\QSHDeux{}{}{}		Première accolade: Contenu de la question AMC	 											%
%						Deuxième accolade: Contenu de la bonne réponse												%
%						Troisième accolade: Contenu de la 1ere mauvaise réponse										%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\QSHDeux}[3]{
\begin{question}{\theCompteurQuestionAMC}
#1
\begin{reponseshoriz}
	\bonne{#2}
	\mauvaise{#3}
	\end{reponseshoriz} 
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QSHTrois{}{}{}{}		Question Simple Horizontale AMC avec 3 propositions										%
%																											%		
%		\QSHTrois{}{}{}{}		Première accolade: Contenu de la question AMC	 										%
%							Deuxième accolade: Contenu de la bonne réponse											%
%							Troisième accolade: Contenu de la 1ere mauvaise réponse									%
%							Quatrième accolade: Contenu de la 2eme mauvaise réponse									%
%																						 		 			%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QSHTrois}[4]{
\begin{question}{\theCompteurQuestionAMC}
#1
\begin{reponseshoriz}
	\bonne{#2}
	\mauvaise{#3}
	\mauvaise{#4}
	\end{reponseshoriz} 
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QSHQuatre{}{}{}{}{}		Question Simple Horizontale AMC avec 4 propositions										%
%																											%		
%		\QSHQuatre{}{}{}{}{}		Première accolade: Contenu de la question AMC	 										%
%							Deuxième accolade: Contenu de la bonne réponse											%
%							Troisième accolade: Contenu de la 1ere mauvaise réponse									%
%							Quatrième accolade: Contenu de la 2eme mauvaise réponse									%
%							Cinquième accolade: Contenu de la 3eme mauvaise réponse									%
%																						 		 			%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QSHQuatre}[5]{
\begin{question}{\theCompteurQuestionAMC}
#1
\begin{reponseshoriz}
	\bonne{#2}
	\mauvaise{#3}
	\mauvaise{#4}
	\mauvaise{#5}
	\end{reponseshoriz} 
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QSMCSix{}{}{}{}{}{}{}{}		Question Simple Multicolonnes AMC avec 6 propositions									%
%																											%		
%		\QSMCSix{}{}{}{}{}{}{}{}		Première accolade: Contenu de la question AMC	 									%
%								Deuxième accolade: Nombre de colonnes												%
%								Troisième accolade: Contenu de la bonne réponse										%
%								Quatrième accolade: Contenu de la 1eme mauvaise réponse								%
%								Cinquième accolade: Contenu de la 2eme mauvaise réponse								%	
%								Sixième accolade: Contenu de la 3eme mauvaise réponse								%	
%		 			 			Septième accolade: Contenu de la 4eme mauvaise réponse								%
%								Huitième accolade: Contenu de la 5eme mauvaise réponse								%	
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QSMCSix}[8]{	
\begin{question}{\theCompteurQuestionAMC}
#1
\begin{multicols}{#2}
\begin{reponses}
	\bonne{#3}
	\mauvaise{#4}
	\mauvaise{#5}
	\mauvaise{#6}
	\mauvaise{#7}
	\mauvaise{#8}
\end{reponses}
\end{multicols}
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QSMCSept{}{}{}{}{}{}{}{}{}{}{}	Question Simple Multicolonnes AMC avec 9 propositions									%
%																											%		
%		\QSMCSept{}{}{}{}{}{}{}{}{}{}{}	Première accolade: Contenu de la question AMC	 									%
%								Deuxième accolade: Nombre de colonnes												%
%								Troisième accolade: Contenu de la bonne réponse										%
%								Quatrième accolade: Contenu de la 1eme mauvaise réponse								%
%								Cinquième accolade: Contenu de la 2eme mauvaise réponse								%	
%								Sixième accolade: Contenu de la 3eme mauvaise réponse								%	
%		 		 				Septième accolade: Contenu de la 4eme mauvaise réponse								%
%								Huitième accolade: Contenu de la 5eme mauvaise réponse								%
%								Et ainsi de suite ...																%	
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QSMCSept}[9]{
\begin{question}{\theCompteurQuestionAMC}
#1
\begin{multicols}{#2}
\begin{reponses}
	\bonne{#3}
	\mauvaise{#4}
	\mauvaise{#5}
	\mauvaise{#6}
	\mauvaise{#7}
	\mauvaise{#8}
	\mauvaise{#9}
\end{reponses}
\end{multicols}
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QMMCDeuxQuatre{}{}{}{}{}{}	Question multiple Multicolonnes AMC avec 2 propositions	justes sur quatre					%
%																											%		
%		\QMMCDeuxQuatre{}{}{}{}{}{}	Première accolade: Contenu de la question AMC		 								%
%								Deuxième accolade: Nombre de colonnes												%
%								Troisième accolade: Contenu de la 1ere bonne réponse									%
%								Quatrième accolade: Contenu de la 2eme bonne réponse									%		
%								Cinquième accolade: Contenu de la 1ere mauvaise réponse								%
%								Sixième accolade: Contenu de la 1ere bonne réponse									%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QMMCDeuxQuatre}[6]{
\begin{questionmult}{\theCompteurQuestionAMC}
#1
\begin{multicols}{#2}
\begin{reponses}
	\bonne{#3}
	\bonne{#4}
	\mauvaise{#5}
	\mauvaise{#6}
	\end{reponses} 
\end{multicols}
\end{questionmult}
\addtocounter{CompteurQuestionAMC}{1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QMMCTroisSept{}{}{}{}{}{}{}{}{}		Question multiple Multicolonnes AMC avec 3 propositions	justes sur 7					%
%																											%		
%		\QMMCTroisSept{}{}{}{}{}{}{}{}{}		Première accolade: Contenu de la question AMC		 							%
%									Deuxième accolade: Nombre de colonnes											%
%									Troisième accolade: Contenu de la 1ere bonne réponse								%
%									Quatrième accolade: Contenu de la 2eme bonne réponse								%		
%									Et ainsi de suite ...															%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QMMCTroisSept}[9]{
\begin{questionmult}{\theCompteurQuestionAMC}
#1
\begin{multicols}{#2}
\begin{reponses}
	\bonne{#3}
	\bonne{#4}
	\bonne{#5}
	\mauvaise{#6}
	\mauvaise{#7}
	\mauvaise{#8}
	\mauvaise{#9}
\end{reponses} 
\end{multicols}
\end{questionmult}
\addtocounter{CompteurQuestionAMC}{1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QO{}{}		Question à rédiger sur feuille																	%
%																											%		
%		\QO{}{}		Première accolade: Contenu de la question		  												%
%					Deuxième accolade: Nombre Total de Points														%
%																											%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QO}[2]{
\begin{question}{\theCompteurQuestionAMC}\def\AMCotextReserved{\textbf{Rédiger votre réponse sur une feuille à part}}
#1
\AMCOpen{lineup=true,backgroundcol=blue!5!white}{
\directlua{
points=#2
}
\multido{\n=0+0.5}{\directlua{tex.print(points/0.5)}}{\mauvaise[\n]{\n}\bareme{\n}}\bonne[#2]{#2}\bareme{#2}
}
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\QOGB{}{}		Question à rédiger sur feuille avec Gros Barême (utilisée si la notation dépasse 7 avec un pas de 0.5			%
%																											%		
%		\QOGB{}{}		Première accolade: Contenu de la question		  												%
%					Deuxième accolade: Nombre Total de Points														%
%																											%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\QOGB}[2]{
\begin{question}{\theCompteurQuestionAMC}\def\AMCotextReserved{\textbf{Rédiger votre réponse sur une feuille à part}}
#1
\AMCOpen{lineup=true,backgroundcol=blue!5!white}{
\directlua{
points=#2
}
\multido{\n=0+1}{\directlua{tex.print(points/1)}}{\mauvaise[\n]{\n}\bareme{\n}}\bonne[#2]{#2}\bareme{#2}
}
\end{question}
\addtocounter{CompteurQuestionAMC}{1}
}






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\ES{}		Ecriture scientifique																				%
%																											%		
%		\ES{}		Première accolade: Argument		 																%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ES}[1]{
\num[round-precision=3,round-mode=figures,scientific-notation=true]{#1}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\TM{}{}		Table de multiplication version primaire															%
%																											%		
%		\TM{}{}		Première accolade: Nombre de colonnes	de la table		  											%
%					Deuxième accolade: Nombre de lignes de la table													%
%																											%		
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\TM}[2]{\directlua{Multiplication(#1,#2)}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\TitreExercice{}																							%
%																											%		
%		\TitreExercice{}		Première accolade: Titre de l'exercice 														%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\TitreExercice}[1]{
\begin{center}
   \hrule
   \vspace{1ex}
   \large{\textsc{\textbf{Exercice \theCompteurExercice: #1 }}}
   \addtocounter{CompteurExercice}{1}
   \vspace{1ex}
   \hrule
   \end{center}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\Minipage{}{}{}{}																						%
%																											%		
%		\Minipage{}{}{}{}	Première accolade: Proportion de la minipage de gauche 											%
%						Deuxième accolade: Contenu de la minipage de gauche											%
%						Première accolade: Proportion de la  minipage de droite 											%
%						Deuxième accolade: Contenu de la minipage de droite											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Minipage}[4]{
\begin{minipage}[c]{#1\linewidth}
#2
\end{minipage}
\hfill
\begin{minipage}[c]{#3\linewidth}
#4
\end{minipage}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\GraphiqueDeux{}{}{}{}{}{}{}{}{}																				%
%																											%		
%		\GraphiqueDeux{}{}{}{}{}{}{}{}{}	Première accolade: Nbre d'intervalles dans la graduation principale	 						%
%								Deuxième accolade: xmax														%
%								Troisième accolade: ymax						 									%
%								Quatrième accolade: xlabel														%
%								Cinquième accolade: ylabel														%
%								Sixième accolade: Titre															%		
%								Septième accolade: Echelle														%
%								Huitième accolade: Points entre parenthèses ou première courbe 							%
%								Neuvième accolade: Points entre parenthèses ou deuxième courbe 							%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newcommand{\GraphiqueDeux}[7]{
%\begin{tikzpicture}
%\begin{axis}[xmin=0,ymin=0,
%minor tick num=#1,
%xmax=#2, 
%ymax=#3,
%grid=both,
%%xtick={0,1,...,},
%xlabel={\textbf{#4}},
%ylabel={\textbf{#5}},
%title={\textbf{#6}},
%scale=#7]
%
%\addplot[red, line width = 0.05 cm, dotted] coordinates { 
%#8
%};
%
%\addplot[blue, line width = 0.05 cm] coordinates {
%#9};
%
%\end{axis}
%\end{tikzpicture}
%}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%		\Pointilles{}																							%
%																											%		
%		\Pointilles{}		Première accolade: Nbre de lignes à remplir							 						%
%																											%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Pointilles}[1]{
\multido{}{#1}{.\dotfill~ \newline}
}

\newcommand\fact[1]{\numprint{\directlua{tex.sprint(fact(\luatexluaescapestring{#1}))}}}
\newcommand\printfact[1]{#1!=\fact{#1}}


\newcommand{\tableau}{
\begin{tabular}{|c|c|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}
\hline
Equation 			&	Avancement			&	\multicolumn{4}{c|}{\ce{I2 + 2 S2O3^2- -> 2 I^- +S4O64-}}							\\\hline
Etat initial			&	0					&			&						&			&	\rule[-15pt]{0pt}{20pt}	\\\hline
Etat intermédiaire	&	x					&			&						&			&	\rule[-15pt]{0pt}{20pt}	\\\hline
Etat final			&	${\text{x}}_{\text{max}}$	&			&						&			&	\rule[-15pt]{0pt}{20pt}	\\\hline
\end{tabular}
}




