% Encodage ISO
% Compilé avec la version octobre 2017 de pas-exos

\documentclass[12pt,a4paper,openany]{book}
\usepackage{diagbox}
\usepackage{pas-exos}%[source]
\input{pas-echant.mod}
\author{St\'ephane PASQUET}
\date{\today}
\title{\input{Exercices.exo} exercices\\[1em] de math\'ematiques\\[1em] pour 1\iere{} ES}
\subtitle{}
\def\fstlinecolor{violet!40}
\def\txtfstlinecolor{violet!50!black}
\def\bkcolor{violet!20}
\def\bordercolor{violet!50!black}
%
\newwrite\tempfile

%% Repère

\newcommand{\rep}[4]{% xmin,ymin,xmax,ymax
\draw[gray,dashed] (#1,#2) grid (#3,#4);
\draw[->,>=stealth'] (#1,0) -- (#3,0);
\draw[->,>=stealth'] (0,#2) -- (0,#4);
\draw[thick,red,->,>=stealth'] (0,0) -- (1,0) node[midway,below] {$\vv{\imath}$};
\draw[thick,red,->,>=stealth'] (0,0) -- (0,1) node[midway,left] {$\vv{\jmath}$};
\node[below left] at (0,0) {O};
\clip (#1,#2) rectangle (#3,#4);
}
\frenchbsetup{StandardLists=true}
\begin{document}

\frontmatter
\maketitle

\tableofcontents\label{toc}

\input{regles}

\mainmatter

% ======= Pourcentages ==============

\chapter{Pourcentages}
\def\namefic{01-pourc-}
\foreach\numsrc in {01,02,03,04,05,06,07,08,09,10,11,12}{\input{src/01-pourc-\numsrc}}
\correction
\foreach\numsrc in {01,02,03,04,05,06,07,08,09,10,11,12}{\corrige\input{src/01-pourc-\numsrc-corr}}

% ======= Pourcentages ==============

\chapter{Le second degré}
\def\namefic{02-secdeg-}
\foreach\numsrc in {05,06,01,02,08,11,07,10,03,04,09,13,12}{\input{src/02-secdeg-\numsrc}}
\correction
\foreach\numsrc in {05,06,01,02,08,11,07,10,03,04,09,13,12}{\corrige\input{src/02-secdeg-\numsrc-corr}}

% ======= Dérivation ==============

\chapter{Dérivation}
\def\namefic{03-derivation-}
\foreach\numsrc in {03,04,05,06,01,02,07,08,09,10}{\input{src/03-derivation-\numsrc}}
\correction
\foreach\numsrc in {03,04,05,06,01,02,07,08,09,10}{\corrige\input{src/03-derivation-\numsrc-corr}}

% ======= Dérivation ==============

\chapter{Suites}
\def\namefic{04-suites-}
\foreach\numsrc in {01,02,03,04,05,06,07,11,08,09,10}{\input{src/04-suites-\numsrc}}
\correction
\foreach\numsrc in {01,02,03,04,05,06,07,11,08,09,10}{\corrige\input{src/04-suites-\numsrc-corr}}

% ======= Statistiques descriptives  ==============

\chapter{Statistiques descriptives}
\def\namefic{08-statdescr-}
\foreach\numsrc in {01,02,03,04,05}{\input{src/08-statdescr-\numsrc}}
\correction
\foreach\numsrc in {01,02,03,04,05}{\corrige\input{src/08-statdescr-\numsrc-corr}}

% ======= Probabilités  ==============

\chapter{Variables aléatoires}
\def\namefic{09-proba-}
\foreach\numsrc in {04,05,03,06,11,01,02,07,08,09,10}{\input{src/09-proba-\numsrc}}
\correction
\foreach\numsrc in {04,05,03,06,11,01,02,07,08,09,10}{\corrige\input{src/09-proba-\numsrc-corr}}

% ======= Fluctuation & échantillonnage  ==============

\chapter{Fluctuation, échantillonnage}
\def\namefic{10-fluct-}
\foreach\numsrc in {01,02,03,04,05}{\input{src/10-fluct-\numsrc}}
\correction
\foreach\numsrc in {01,02,03,04,05}{\corrige\input{src/10-fluct-\numsrc-corr}}

\immediate\openout\tempfile=\jobname.exo
\immediate\write\tempfile{\thenbexos}
\immediate\closeout\tempfile

\end{document}
