diff options
author | Norbert Preining <norbert@preining.info> | 2023-06-06 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-06-06 03:01:00 +0000 |
commit | 81c6e34f9b4e2191ee45a1e3236d77914a7af519 (patch) | |
tree | 07469e76956f772db5be93f6b0ff0e5ee2516e9f /macros/latex/contrib/profmaquette | |
parent | efea33d6e2fb0152b0caee865514c497e12a0e8c (diff) |
CTAN sync 202306060300
Diffstat (limited to 'macros/latex/contrib/profmaquette')
-rw-r--r-- | macros/latex/contrib/profmaquette/README | 11 | ||||
-rw-r--r-- | macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf | bin | 0 -> 17412 bytes | |||
-rw-r--r-- | macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex | 31 | ||||
-rw-r--r-- | macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf | bin | 0 -> 169331 bytes | |||
-rw-r--r-- | macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex | 967 | ||||
-rw-r--r-- | macros/latex/contrib/profmaquette/latex/ProfMaquette.sty | 1879 |
6 files changed, 2888 insertions, 0 deletions
diff --git a/macros/latex/contrib/profmaquette/README b/macros/latex/contrib/profmaquette/README new file mode 100644 index 0000000000..697df2b631 --- /dev/null +++ b/macros/latex/contrib/profmaquette/README @@ -0,0 +1,11 @@ +profmaquette est un package permettant d'adapter facilement différents documents. + +---------------- + +profmaquette is a package useful for change quickly documents. + +--------------- + +Author : Christophe Poulain +email : chrpoulain@gmail.com +Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\ No newline at end of file diff --git a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf Binary files differnew file mode 100644 index 0000000000..b3880c8135 --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf diff --git a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex new file mode 100644 index 0000000000..9922ddb0ce --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex @@ -0,0 +1,31 @@ +\documentclass[12pt,french]{article} +\usepackage[nonamssymb]{ProfCollegeT} +\usepackage{PfMV7} +\input{Christ7} +\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} +\usepackage{fourier-otf} +\usepackage[a4paper,margin=1.5cm,nohead,includefoot]{geometry} +\setlength{\parindent}{0pt} +\pagestyle{empty} +\usepackage{mflogo} +\usepackage{babel} +\usepackage{lipsum} +\begin{document} +\begin{Maquette}[ParcoursPerso]{Type=Fiche,Fichier=Documentation,Theme=L'alphabet,Niveau=6,Classe=Alpha} + \begin{exercice} + A + \end{exercice} + \begin{exercice} + B + \end{exercice} + \begin{exercice} + C + \end{exercice} + \begin{exercice} + D + \end{exercice} +\end{Maquette} +\end{document} +%%% Local Variables: +%%% TeX-engine: luatex +%%% End:
\ No newline at end of file diff --git a/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf Binary files differnew file mode 100644 index 0000000000..1e1de72f44 --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.pdf diff --git a/macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex new file mode 100644 index 0000000000..2929c9926d --- /dev/null +++ b/macros/latex/contrib/profmaquette/doc/profmaquette-doc.tex @@ -0,0 +1,967 @@ +% with lualatex +\documentclass[12pt,french]{article} +\usepackage[nonamssymb]{ProfCollege} +\usepackage{ProfMaquette} +\input{Christ7} +\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math} +\usepackage{fourier-otf} +\usepackage[a4paper,margin=1.5cm,nohead,includefoot]{geometry} +\setlength{\parindent}{0pt} +\pagestyle{empty} +\usepackage{mflogo} +\usepackage{babel} + +\def\MPclipOne#1#2#3{ + \begin{mplibcode} + vardef paired (expr d) = + if pair d : d else : (d,d) fi + enddef ; + + primarydef p xyscaled q = + begingroup ; save qq ; pair qq ; qq = paired(q) ; + ( p + if xpart qq<>0 : xscaled (xpart qq) fi + if ypart qq<>0 : yscaled (ypart qq) fi ) + endgroup + enddef ; + + path fullsquare; + fullsquare := unitsquare shifted - center unitsquare ; + + color myyellow; + myyellow = (242/255,226/255,149/255); + + path p; p := fullsquare xyscaled (#1,#2);% squeezed #3; + + %fill (point(0) of p)--(point(1) of p)--(point(2) of p)--(point(3) of p)--cycle; + pair pp; + pp=0.5[point(0) of p,point(2) of p]; + height=2pt; + width=2pt; + p:=(point(0) of p)--(point(1) of p)--(point(2) of p); + + p:=(1/3[point(0) of p,point(1) of p])--(point(1) of p)--(2/3[point(1) of p,point(2) of p]);% withpen pencircle scaled 2bp; + z1=point(0) of p; + x2=x12=xpart(point(length p/6) of p); + x3=x11=xpart(point(2*length p/6) of p); + x4=xpart(point(3*length p/6) of p)+width; + x5=x4-(width/3); + x6=x4-(2*width/3); + x7=xpart(point(length p) of p); + x8=x7-(width/3); + x9=x7-(2*width/3); + x10=x7-width; + y2=ypart(point(length p/6) of p)-(height/3); + y3=ypart(point(2*length p/6) of p)-(2*height/3); + y4=ypart(point(3*length p/6) of p)-height; + y12=ypart(point(length p/6) of p)+(height/3); + y11=ypart(point(2*length p/6) of p)+(2*height/3); + y10=ypart(point(3*length p/6) of p)+height; + y5=y9=ypart(point(4*length p/6) of p); + y6=y8=ypart(point(5*length p/6) of p); + y7=ypart(point(length p) of p); + fill z1--z2--cycle--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--cycle;% withcolor 0.85myyellow; + fill (z1--z2--cycle--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--cycle) rotatedabout(pp,180);% withcolor 0.85myyellow; + \end{mplibcode} +} + +\newsavebox{\tacochapterbox} + +\newcommand{\Tacoo}[1]{% + \begin{lrbox}{\tacochapterbox} + #1% + \end{lrbox} + \ooalign{% + \MPclipOne{\mpdim{\wd\tacochapterbox+1pc}}% width + {\mpdim{\ht\tacochapterbox+\dp\tacochapterbox+1pc}}% height + {0pt}% thickness of the curve + \cr\kern0.5pc\raisebox{\ht\tacochapterbox\relax}{\usebox\tacochapterbox}% + } +} + +\NewDocumentEnvironment{CadreMP}{+b}{% + \begin{lrbox}{\tacochapterbox} + \begin{minipage}{0.97\linewidth} + #1% + \end{minipage} + \end{lrbox} + \par + \ooalign{% + \MPclipOne{\mpdim{\wd\tacochapterbox+1pc}}% width + {\mpdim{\ht\tacochapterbox+\dp\tacochapterbox+1pc}}% height + {0pt}% thickness of the curve + \cr\kern0.5pc\raisebox{\ht\tacochapterbox\relax}{\usebox\tacochapterbox}% + }% +}{}% + +\usepackage{pdfpages} + +\title{Factoriser la production de documents} +\author{C.Poulain} +\date{\PfMfiledate} + +\usepackage[colorlinks=true,linkcolor=purple]{hyperref} + +\pagestyle{empty} + +\usepackage{listings} +\lstset{ + language = [LaTeX]TeX, + basicstyle = \ttfamily,% + breaklines = true, + commentstyle = \footnotesize\slshape\color{gray}, + emphstyle=\color{purple}, + columns=fullflexible,% + frame=tb,% + texcsstyle=*\color{black},%pour colorer la contre-oblique + classoffset=5, + texcsstyle=*\color{blue},%pour colorer la contre-oblique + moretexcs={brm,TikzDM,TikzDS,TikzIE,TikzFiche,Competences,TikzParcours,TikzPdT,PfMCompNA,PfMCompECA,PfMCompA,AfficheParcours}, + emph={Maquette,exercice,Solution,Reponse,Indice},% + classoffset=1, + keywords={DM,DS,IE,Fiche,CorrigeFin,CorrigeApres,PdT,Parcours,ParcoursPerso}, + keywordstyle=\color{OliveDrab}, + classoffset=2, + keywords={Theme,Niveau,Classe,Date,Calculatrice,Code,Numero,Sujet,Nom,NumSujet,Fichier,Type}, + keywordstyle=\color{BlueViolet},%DarkMagenta}, + classoffset=3, + keywords={Pouce,Direct,PasCorrige,BaremeDetaille,BaremeTotal,Source,Titre,Oral,Calculatrice,Competence,Trajet}, + keywordstyle=\color{DarkGreen}, +% delim = **[s][\color{purple}]{$}{$}, +% moredelim = **[s][\color{purple}]{\\[}{\\]}, +% moredelim = **[is][\color{black}]{\\Z}{\\Z}, + literate=*{[}{{\textcolor{orange}{[}}}{1} + {]}{{\textcolor{orange}{]}}}{1} + {\{}{\textcolor{amber}{\{}}{1} + {\}}{\textcolor{amber}{\}}}{1} + {\&}{\textcolor{red}{\&}}{1} + {\\[}{{\textcolor{purple}{\textbackslash[}}}{2} + {\\]}{{\textcolor{purple}{\textbackslash]}}}{2} + {$}{{\textcolor{purple}{\$}}}{1}%$ + {_}{{\textcolor{purple}{\_}}}{1}% + {^}{{\textcolor{purple}{\^{}}}}{1}%, +} + +% "Rehook" delimiters char table. +\makeatletter +\lst@AddToHook{SelectCharTable}{\lst@DefDelims} +\makeatother + +\usepackage{textcomp}%pour les < de listings +\usepackage{enumerate} +\usepackage{hhline} +\usepackage{pifont} + +\definecolor{mygray}{RGB}{245,245,245}%pour le background de listing +\definecolor{drab}{rgb}{0.59, 0.44, 0.09} +\definecolor{amber}{rgb}{1.0, 0.75, 0.0} +\definecolor{chocolate}{rgb}{0.82, 0.41, 0.12} +\colorlet{amber}{chocolate} + +\newtcblisting{Codes}[3][]{% + top=0mm,bottom=0mm,left=2mm,right=2mm,middle=0mm,% + colback=white,% + colframe=white!75!black,% + every listing line={#3},% + listing options={% + frame=,% + backgroundcolor=,% + },% + righthand width=#2\linewidth,% + #1% +}% + +\usepackage{menukeys} +\newcommand\metamk[1]{\textlangle#1\textrangle} + +\newcommand\Cle[1]{% + {\sffamily\textlangle #1\textrangle}% +}% + +\newcommand{\Defaut}[1]{% +\hfill valeur par défaut : {\sffamily #1}\par% +}% + +\usepackage{parskip} + +\newenvironment{Description} + {\list{}{\labelwidth0pt \leftmargin0pt \itemindent-\leftmargin + \let\makelabel\Descriptionlabel}} + {\endlist} +\newcommand*\Descriptionlabel[1]{\hspace\labelsep + \normalfont\bfseries #1} + +\parindent0pt + +\newcommand\TIKZ{Ti\textit{k}Z} + +\renewcommand\TikzDM{% + \begin{tcolorbox}[frame hidden,colback=white,enhanced,% + borderline north={3pt}{0pt}{gray!85}, + borderline north={2pt}{0.5pt}{gray!15}, + borderline south={3pt}{0pt}{gray!85}, + borderline south={2pt}{0.5pt}{gray!15}, + ]% + \sffamily Devoir en temps libre \no\useKV[DM]{Numero}\hfill\useKV[DM]{Niveau}\ieme{} \useKV[DM]{Classe}% + \par{\tiny\jobname}\hfill{\scriptsize Pour le \useKV[DM]{Date}}% + \end{tcolorbox}% +} +\renewcommand\TikzDS{% + \begin{tcolorbox}[colback=gray!5,% + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau}\ieme{} \useKV[DS]{Classe} + \par{\tiny\jobname}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% +} +\renewcommand\TikzIE{% + \begin{minipage}{0.6\linewidth} + \begin{tcolorbox}[colback=gray!5, + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[IE]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{NumSujet})}{} + \vspace{1em} + \par{\tiny\jobname}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% + \end{minipage}\hfill\begin{minipage}{0.35\linewidth} + Nom : \dotfill\\[0.5em] + Prénom : \dotfill\\[0.5em] + Classe : \dotfill + \end{minipage} + \par\bigskip +} + +\renewcommand\TikzFiche{% + \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm, + colback=gray!5]% + \Large\sffamily \useKV[Fiche]{Theme}\hfill\useKV[Fiche]{Niveau}\ieme{} \useKV[Fiche]{Classe} + \par{\tiny\jobname}\hfill{\scriptsize\useKV[Fiche]{Date}} + \end{tcolorbox}% +} + +\renewcommand\TikzParcours{% + \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm, + colback=gray!5]% + \Large\sffamily \useKV[Parcours]{Theme}\hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe}% + \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}}% + \end{tcolorbox}% +} + +\renewcommand\TikzPdT{% + \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm, + colback=gray!5]% + \Large\sffamily \useKV[PdT]{Theme}\hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe}% + \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}}% + \end{tcolorbox}% +} +\begin{document} +\maketitle +\thispagestyle{empty} +Après la création du package \lstinline!ProfCollege!, l'idée de poursuivre la factorisation des méthodes de travail a naturellement germé. Produire des fiches, des devoirs, des évaluations\dots{} avec des méthodes différentes, cela peut vite apparaître fastidieux. Créé pour améliorer cela, cet ensemble de macro-commandes est basé, quasi exclusivement, sur les environnements \lstinline!Maquette! et \lstinline!exercice! : +\begin{itemize} +\item l'environnement \lstinline!Maquette! indique le type de document souhaité et ses caractéristiques; +\item l'environnement \lstinline!exercice! adapte la présentation et les fonctions des exercices en accord avec l'environnement \lstinline!Maquette!. +\end{itemize} +\clearpage +\section*{L'environnement \lstinline!Maquette!} +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette} + +\end{Maquette} +\end{Codes} +C'est lui qui va indiquer : +\begin{itemize} +\item le type de document souhaité (Devoir Maison / Devoir Surveillé / Interrogatin écrite / Fiche d'exercices / Parcours d'exercices / Parcours personnalisé / Plan de travail); +\item et si ce travail est corrigé (à la suite d'un exercice ou à la fin du document) ou pas; +\end{itemize} +puis il indiquera les caractéristiques du document souhaité. +\clearpage +\subsection*{Les devoirs maison} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{DM}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Numero}]\Defaut{1} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{\{\}} + \item[La clé \Cle{Niveau}]\Defaut{3} + \item[La clé \Cle{Code}\footnotemark]\Defaut{\{\}} + \end{itemize} +\end{Description} +\end{CadreMP} +\footnotetext{Outil personnel de classement.} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[DM]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les devoirs surveillés} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{DS}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Numero}]\Defaut{1} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{} + \item[La clé \Cle{Niveau}]\Defaut{3} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{Calculatrice}] autorisée ou non\Defaut{false} + \item[La clé \Cle{Sujet}]\Defaut{A} + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[DS]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les évaluations écrites} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{IE}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Numero}]\Defaut{1} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{} + \item[La clé \Cle{Niveau}]\Defaut{3} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{Calculatrice}] autorisée ou nom\Defaut{false} + \item[La clé \Cle{Sujet}] pour de multiples sujets\Defaut{\{\}} + \item[La clé \Cle{Theme}] Thème de l'évaluation \Defaut{\{\}} + \item[La clé \Cle{Nom}] Pour changer le nom \og \'Evaluation\fg\Defaut{\'Evaluation} + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[IE]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2020,Theme=La géométrie}% + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les fiches d'exercices} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{Fiche}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{Nairobi} + \item[La clé \Cle{Niveau}]\Defaut{6} + \item[La clé \Cle{Theme}] Thème de la fiche \Defaut{Les nombres décimaux} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{NomExercice}] pour modifier le nom des exercices\Defaut{Exercice} + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +%\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2020} +% On considère un triangle $ABC$\dots +%\end{Maquette} +\clearpage +\subsection*{Les parcours} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{Parcours}\footnotemark]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{Nairobi} + \item[La clé \Cle{Niveau}]\Defaut{6} + \item[La clé \Cle{Theme}] Thème du parcours \Defaut{Les nombres décimaux} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{NomExercice}] pour modifier le nom des exercices\Defaut{Exercice} + \end{itemize} +\end{Description} +\end{CadreMP} + \footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[Parcours]{Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +\subsection*{Les parcours fléchés} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{PdT}\footnotemark]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Date}]\Defaut{\lstinline!\\today!} + \item[La clé \Cle{Classe}]\Defaut{Nairobi} + \item[La clé \Cle{Niveau}]\Defaut{6} + \item[La clé \Cle{Theme}] Thème du plan de travail \Defaut{Les nombres décimaux} + \item[La clé \Cle{Code}]\Defaut{} + \item[La clé \Cle{NomExercice}] pour modifier le nom des exercices\Defaut{Exercice} + \end{itemize} +\end{Description} +\end{CadreMP} + \footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[PdT]{Niveau=6,Classe=Zola,Date=25 décembre 2020} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +%\begin{Maquette}[PdT]{Niveau=6,Classe=Zola,Date=25 décembre 2020} +% On considère un triangle $ABC$\dots +%\end{Maquette} +\clearpage +\subsection*{Les parcours personnalisés} +\begin{CadreMP} + \begin{Description} +\item[La clé \Cle{ParcoursPerso}]\Defaut{false} + \begin{itemize} + \item[La clé \Cle{Fichier}]\Defaut{}\par est le nom du fichier {\ttfamily csv} à utiliser pour créer les parcours personnalisés. + \end{itemize} +\end{Description} +\end{CadreMP} +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[ParcoursPerso]{Fichier=Eleves} + On considère un triangle $ABC$\dots +\end{Maquette} +\end{Codes} +\clearpage +Comme on peut le voir, chaque type de travail est associé à une présentation. Ces présentations sont créées par les commandes\footnote{Qu'on peut donc redéfinir. Par exemple, c'est ce que j'ai fait dans ce document pour la commande \lstinline!\\TikzFiche! : elle ne commence plus une nouvelle page.} : \lstinline!\TikzDM/\TikzDMCor! pour la clé \Cle{DM}; \lstinline!\TikzDS/\TikzDSCor! pour la clé \Cle{DS}; \lstinline!\TikzIE/\TikzIECor! pour la clé \Cle{IE}; \lstinline!\TikzFiche/\TikzFicheCor! pour la clé \Cle{Fiche}, \lstinline!\TikzParcours/\TikzParcoursCor! pour la clé \Cle{Parcours} et \lstinline!\TikzPdT! pour la clé \Cle{PdT}. + +On dispose également de la commande \lstinline!\Competences! permettant de construire un tableau de\dots{} compétences données par l'utilisateur; les compétences étant séparées par le symbole \lstinline!/!. +\begin{Codes}[]{0.4}{} +\Competences{Utiliser le compas/Utiliser l'équerre} +\end{Codes} +Les notations \lstinline!NA!, \lstinline!ECA! et \lstinline!A! peuvent être redéfinies par les commandes \lstinline!\PfMCompNA!, \lstinline!\PfMCompECA! et \lstinline!\PfMCompA!. +\begin{Codes}[]{0.4}{} +\renewcommand\PfMCompNA{\rule{0pt}{3ex}\RKangry} +\renewcommand\PfMCompECA{\RKsad} +\renewcommand\PfMCompA{\RKbigsmile} +\Competences{Utiliser le compas/Utiliser l'équerre} +\end{Codes} +Si l'on souhaite davantage de niveaux d'évaluations (ou moins), on utilisera les codes suivants : +\begin{Codes}[]{0.4}{} +\Competences[4]{0§1§2§3/Utiliser le compas/Utiliser l'équerre} +\end{Codes} +\begin{Codes}[]{0.4}{} +\Competences[2]{A§NA/Utiliser le compas/Utiliser l'équerre} +\end{Codes} +\clearpage +\section*{L'environnement \lstinline!exercice!} +\begin{Codes}[listing only]{0.4}{} +\begin{exercice} + +\end{exercice} +\end{Codes} +\subsection*{Habillage des exercices} +L'envionnement \lstinline!exercice! doit {\em impérativement} être inclus dans un environnement \lstinline!Maquette! car le choix de document influence la présentation des exercices. +\begin{Codes}[]{0.5}{} +\begin{Maquette}[IE]{Theme=Les fonctions,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Codes}[listing side text]{0.6}{} +\begin{Maquette}[DM]{Numero=50,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Codes}[listing side text]{0.6}{} +\begin{Maquette}[DS]{Numero=50,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Codes}[]{0.4}{} +\begin{Maquette}[Fiche]{Theme=Les fonctions,Niveau=3,Classe=Gide} + \begin{exercice} + La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. + \end{exercice} +\end{Maquette} +\end{Codes} +%\begin{Maquette}[Fiche]{Theme=Les fonctions,Niveau=3,Classe=Gide} +% \begin{exercice} +% La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier. +% \end{exercice} +%\end{Maquette} +\subsection*{Le barème des exercices} +On remarque que certains exercices sont associés à un total de point. C'est une des clés disponibles pour l'environnement \lstinline!exercice!. Voici celles pour les barèmes : +\begin{Description} +\item[La clé \Cle{BaremeTotal}] qui affichera, dans le coin supérieur droit, le total de points de l'exercice. La valeur de cette clé : + \begin{itemize} + \item est {\em fixée} à {\sffamily false} pour la clé \Cle{Fiche}; + \item est positionnée à {\sffamily true} mais {\em modifiable} pour les clés \Cle{DM}, \Cle{DS} et \Cle{IE}. + \end{itemize} +\item[La clé \Cle{BaremeDetaille}]\Defaut{false}\par qui a le même fonctionnement que la clé \Cle{BaremeTotal}. + La commande \lstinline!\brm{}! permet la construction du barème (détaillé et total). +\item[La clé \Cle{MotPoint}]\Defaut{point}\par donnée sous forme de texte puisque le pluriel est géré. + \begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[DS]{Numero=3,Classe=Euler,Niveau=4} + \begin{exercice} % ici le barème est total, pas de détail : comportement par défaut + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} + \begin{exercice}[BaremeDetaille] %ici le barème est total ET détaillé + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Maquette}[DS]{Numero=3,Classe=Euler,Niveau=4} + \begin{exercice} % ici le barème est total, pas de détail : comportement par défaut + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} + \begin{exercice}[BaremeDetaille] %ici le barème est total ET détaillé + On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$. + \begin{enumerate} + \item\brm{1} Développer l'expression $A$. + \item\brm{1.5} Développer l'expression $B$. + \end{enumerate} + \end{exercice} +\end{Maquette} +\end{Description} +\clearpage +\subsection*{Source, compétence et titre} +Si on souhaite citer la source d'un exercice ou lui donner un titre, on dispose des clés : +\begin{Description} +\item[La clé \Cle{Source}] pour citer la source de l'exercice.\Defaut{\{\}} +\item[La clé \Cle{Titre}] pour nommer un exercice.\Defaut{\{\}} +\item[La clé \Cle{Competence}] pour indiquer une compétence associée à l'exercice.\Defaut{\{\}} +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[Fiche]{Theme=Algorithmique} + \colorlet{PfMColCpt}{Crimson} + \colorlet{PfMColSrc}{NavyBlue} + \begin{exercice}[Source=Olympiades 2019,Titre=Modifier des mots,Competence=Raisonner] + Dans ce problème, on appellera {\em mot} toute suite de lettres formée des lettres A, D et G. Par exemple : ADD, A, AAADG sont des {\em mots}. + \\Astrid possède un logiciel qui fonctionne de la manière suivante : un utilisateur entre un {\em mot} et, après un clic sur EXÉCUTER, chaque lettre A du {\em mot} (s'il y en a) est remplacée par le {\em mot} AGADADAGA. Ceci donne un nouveau {\em mot}.\\Par exemple, si l'utilisateur rentre le {\em mot} AGA, on obtient le {\em mot} AGADADAGAGAGADADAGA. Un deuxième clic sur EXÉCUTER réitère la transformation décrite ci-dessus au nouveau {\em mot}, et ainsi de suite. + \begin{enumerate} + \item Quels sont les {\em mots} qui restent inchangés quand on clique sur EXÉCUTER ? + \end{enumerate} +\end{exercice} +\end{Maquette} +\end{Codes} +%\clearpage +\begin{Maquette}[Fiche]{Theme=Algorithmique} + \colorlet{PfMColCpt}{Crimson} + \colorlet{PfMColSrc}{NavyBlue} + \begin{exercice}[Source=Olympiades 2019,Titre=Modifier des mots,Competence=Raisonner] + Dans ce problème, on appellera {\em mot} toute suite de lettres formée des lettres A, D et G. Par exemple : ADD, A, AAADG sont des {\em mots}. + \\Astrid possède un logiciel qui fonctionne de la manière suivante : un utilisateur entre un {\em mot} et, après un clic sur EXÉCUTER, chaque lettre A du {\em mot} (s'il y en a) est remplacée par le {\em mot} AGADADAGA. Ceci donne un nouveau {\em mot}.\\Par exemple, si l'utilisateur rentre le {\em mot} AGA, on obtient le {\em mot} AGADADAGAGAGADADAGA. Un deuxième clic sur EXÉCUTER réitère la transformation décrite ci-dessus au nouveau {\em mot}, et ainsi de suite. + \begin{enumerate} + \item Quels sont les {\em mots} qui restent inchangés quand on clique sur EXÉCUTER ? + \end{enumerate} +\end{exercice} +\end{Maquette} +\end{Description} +\clearpage +\subsection*{Des logos ?} +Les clés décrites dans cette partie ne sont disponibles que pour les maquettes +\lstinline!Fiche! / \lstinline!Parcours!. +\begin{Description} +\item[La clé \Cle{Oral}]\Defaut{false}\par + pour indiquer que l'exercice se résoud oralement. +\item[La clé \Cle{Calculatrice}]\Defaut{true}\par + pour afficher que la calculatrice {\em est interdite}. +\end{Description} + \begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{} +\begin{Maquette}[Fiche]{Theme=Calcul mental} + \begin{exercice}[Oral] + $1+1=?$ + \end{exercice} + \begin{exercice}[!\color{DarkGreen}\ttfamily Calculatrice!=false] + $1+1=?$ + \end{exercice} + % On peut mélanger les deux logos. + \begin{exercice}[!\color{DarkGreen}\ttfamily Calculatrice!=false,Oral] + $1+1=?$ + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Maquette}[Fiche]{Theme=Calcul mental} + \begin{exercice}[Oral] + $1+1=?$ + \end{exercice} + \begin{exercice}[Calculatrice=false] + $1+1=?$ + \end{exercice} + \begin{exercice}[Calculatrice=false,Oral] + $1+1=?$ + \end{exercice} +\end{Maquette} +\clearpage +\subsection*{Focus sur la maquette \lstinline!Parcours!} +Dans le cas de cette maquette, l'environnement \lstinline!exercice! dispose de la clé \Cle{Trajet} permettant de construire automatiquement le ou les parcours. La commande \lstinline!\AfficheParcours{}! représente un schéma associé à un parcours. Ce schéma se construit seul, automatiquement, après que l'enseignant ait utilisé la clé \Cle{Trajet} dans la création de ses exercices. Il faudra néanmoins deux compilations. \`A noter que ce schéma, avec l'utilisation du package \lstinline!hyperref!, dispose de liens cliquables sur les exercices sélectionnés pour le parcours. +\begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{\small} +\begin{Maquette}[Parcours]{Theme=Calcul mental} + \begin{description} + \item[!Parcours! Padawan] \AfficheParcours{Padawan} + \item[!Parcours! Jedï] \AfficheParcours{Jedi} + \item[!Parcours! Grand Maître] \AfficheParcours{GrandMaitre} + \end{description} + \begin{exercice}[Trajet={Padawan,Jedi,GrandMaitre}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan,Jedi}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan}] + + \end{exercice} +\end{Maquette} +\end{Codes} +\begin{Maquette}[Parcours]{Theme=Calcul mental} + \begin{description} + \item[Parcours Padawan] \AfficheParcours{Padawan} + \item[Parcours Jedï] \AfficheParcours{Jedi} + \item[Parcours Grand Maître] \AfficheParcours{GrandMaitre} + \end{description} + \begin{exercice}[Trajet={Padawan,Jedi,GrandMaitre}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan,Jedi}] + + \end{exercice} + \begin{exercice}[Trajet={Padawan}] + + \end{exercice} +\end{Maquette} +\clearpage +\subsection*{Focus sur la maquette \lstinline!ParcoursPerso!} +Dans le cas de cette maquette, l'environnement \lstinline!exercice! n'admet aucune clé. En effet, cette maquette utilise : +\begin{itemize} +\item et un fichier {\ttfamily *.csv} de la forme : + \begin{Codes}[listing only]{0.4}{} +Anne,Bec,{1,2} +Paul,Isse,{1,3} +Jean,Némar,{1,4} + \end{Codes} +\item une liste d'exercices pour produire les trois pages suivantes à l'aide du code : +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[ParcoursPerso]{Type=Fiche,Fichier=Documentation,Theme=L'alphabet,Niveau=6,Classe=Alpha} + \begin{exercice} + A + \end{exercice} + \begin{exercice} + B + \end{exercice} + \begin{exercice} + C + \end{exercice} + \begin{exercice} + D + \end{exercice} +\end{Maquette} +\end{Codes} +\end{itemize} +\clearpage +\includepdf[pages=-]{TestParcoursPerso.pdf} +\clearpage +\subsection*{Focus sur la maquette \lstinline!PdT!} +Dans le cas de cette maquette, la présentation des exercices est modifiée : il n'y a plus de titre afin de gagner de la place. De plus, chaque exercice définit, en fonction de son numéro (non écrit mais présent), huit points d'ancrages :\lstinline!N-5!, \lstinline!S-5!, \lstinline!O-5!, \lstinline!E-5!, \lstinline!NO-5!, \lstinline!NE-5!, \lstinline!SO-5! et \lstinline!SE-5! pour respectivement les points Nord, Sud, Ouest, Est, Nord-Ouest, Nord-Est, Sud-Ouest et Sud-Est du cadre de l'exercice 5. + +On pourra aussi utiliser (avec les même n\oe uds précédés de \lstinline!SOS!) l'environnement \lstinline!SOS! servant d'aide aux élèves en difficulté. + +De plus, deux commandes font leur apparition : +\begin{itemize} +\item \lstinline!\CheminVrai! listant les liaisons entre exercices sous la forme \lstinline!noeud départ/noeud arrivée!; +\item \lstinline!\CheminFaux! listant les liaisons entre exercices sous la forme \lstinline!noeud départ/noeud arrivée!. +\end{itemize} +L'exemple suivant est obtenu par le code présenté à la page suivante. +\begin{Maquette}[PdT]{Theme=Plan de travail : Calcul littéral,Niveau=3,Classe=Alpha,Date={},Code={}} + \setcounter{PfMExo}{0} + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 1 + A + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 2 + B + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 1 + Aide A + \end{SOS} + \end{minipage} + + \vspace*{2cm} + + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 3 + C + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 4 + D + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 2 + Aide B + \end{SOS} + \end{minipage} + \CheminVrai{S-1/NO-3} + \CheminFaux{E-1/O-2,E-2/SOS-O-1} + \end{Maquette} + \clearpage +\begin{Codes}[listing only]{}{} + \begin{Maquette}[PdT]{Theme=Plan de travail : Calcul littéral,Niveau=3,Classe=Alpha,Date={},Code={}} + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 1 + A + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 2 + B + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 1 + Aide A + \end{SOS} + \end{minipage} + + \vspace*{2cm} + + \begin{minipage}{0.35\linewidth} + \begin{exercice}%Exercice 3 + C + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.3\linewidth} + \begin{exercice}%Exercice 4 + D + \end{exercice} + \end{minipage} + \hfill + \begin{minipage}{0.15\linewidth} + \begin{SOS}%SOS 2 + Aide B + \end{SOS} + \end{minipage} + \CheminVrai{S-1/NO-3} + \CheminFaux{E-1/O-2,E-2/SOS-O-1} + \end{Maquette} +\end{Codes} +\clearpage +\subsection*{\og Correction\fg{} des exercices} + Un exercice avec correction aura la forme suivante : + \begin{Codes}[listing only]{0.4}{} +\begin{exercice} + +\end{exercice} +\begin{Solution} + +\end{Solution} +\end{Codes} +On peut gérer la correction des exercices à deux niveaux : +\begin{Description} + \item[Au niveau de l'environnement ]\lstinline!Maquette!, on dispose de deux clés : +\end{Description} + \begin{Description} +\item[la Clé \Cle{CorrigeApres}]\Defaut{false}\par qui affiche le corrigé, s'il existe, après l'énoncé de l'exercice. +\item[la Clé \Cle{CorrigeFin}]\Defaut{false}\par qui affiche les corrigés, s'ils existent, à la fin du document. +\end{Description} + +Pour la maquette \lstinline!ParcoursPerso!, seule la clé \Cle{CorrigeFin} est autorisée. + +\begin{Codes}[listing only]{0.4}{\footnotesize} +\begin{Maquette}[IE,CorrigeApres]{Theme=Calcul littéral} + \begin{exercice}% n'a pas de correction + \begin{enumerate} + \item $1+1=?$. + \end{enumerate} + \end{exercice} + \begin{exercice} + \begin{enumerate} + \item Développer $A=2(x+3)$. + \end{enumerate} + \end{exercice} + \begin{Solution} + \begin{enumerate} + \item $A=2(x+3)=2\times x+2\times3=2x+6$ + \end{enumerate} + \end{Solution} +\end{Maquette} +\end{Codes} +\begin{Maquette}[IE,CorrigeApres]{Theme=Calcul littéral} + \begin{exercice}% n'a pas de correction + \begin{enumerate} + \item $1+1=?$. + \end{enumerate} + \end{exercice} + \begin{exercice} + \begin{enumerate} + \item Développer $A=2(x+3)$. + \end{enumerate} + \end{exercice} + \begin{Solution} + \begin{enumerate} + \item $A=2(x+3)=2\times x+2\times3=2x+6$ + \end{enumerate} + \end{Solution} +\end{Maquette} +\begin{Description} +\item[Au niveau de l'environnement ]\lstinline!exercice!, on peut affiner la correction proposée en écrivant le code de l'exercice sous la forme : +\end{Description} +\begin{Codes}[listing only]{0.4}{} +\begin{exercice} + +\end{exercice} +\begin{Solution} + +\end{Solution} +\begin{Reponse} + +\end{Reponse} +\begin{Indice} + +\end{Indice} +\end{Codes} +L'environnement \lstinline!exercice! dispose alors des clés suivantes : +\begin{Description} +\item[la Clé \Cle{PasCorrige}]\Defaut{false}\par supprime l'affichage de tous types de correction pour l'exercice considéré; +\item[la Clé \Cle{Pouce}]\Defaut{false}\par qui affiche uniquement le contenu de l'environnement \lstinline!Indice!; +\item[la Clé \Cle{Direct}]\Defaut{false}\par qui affiche uniquement le contenu de l'environnement \lstinline!Reponse!. +\end{Description} + +\bigskip + +Cela engendre, si nécessaire, la création de fichier \lstinline!*.sol! pour les solutions, \lstinline!*.rep! pour les réponses et \lstinline!*.cdp! pour les indices. Il conviendra de les effacer à chaque changement de clé (\Cle{PasCorrige}, \Cle{Pouce}, \Cle{Direct}) ou ajout d'exercice(s). En effet, la priorité d'affichage est donnée aux fichiers \lstinline!*.sol! puis \lstinline!*.rep! et enfin \lstinline!*.cdp!. + +\bigskip + +\begin{Codes}[listing only]{0.4}{} +\begin{Maquette}[DS,CorrigeFin]{Numero=3} + \begin{exercice} % La clé CorrigeFin utilise le contenu de l'environnement Solution + $1+\dfrac2{10}=$ + \end{exercice} + \begin{Solution} + $1+\dfrac2{10}=\num{1.2}$ + \end{Solution} + \begin{Reponse} + \num{1.2} + \end{Reponse} + \begin{Indice} + Une unité représente dix dixièmes de l'unité. + \end{Indice} + \begin{exercice}[PasCorrige] % Malgré les environnements Solution, Reponse, Indice + $7(x+5)=$ ? + \end{exercice} + \begin{Solution} + $7(x+5)=7\times x+7\times 5=7x+35$ + \end{Solution} + \begin{Indice} + Utiliser la simple distributivité. + \end{Indice} + \begin{Reponse} + $7x+35$ + \end{Reponse} + \begin{exercice}[Direct] % On affiche uniquement l'environnement Reponse + $\dfrac34-\dfrac25=$? + \end{exercice} + \begin{Solution} + $\dfrac34-\dfrac25=\dfrac{15}{20}-\dfrac8{20}=\dfrac7{20}$ + \end{Solution} + \begin{Reponse} + $\dfrac7{20}$ + \end{Reponse} + \begin{Indice} + C'est une soustraction, il faut réduire au même dénominateur. + \end{Indice} + \begin{exercice}[Pouce] % On affiche uniquement l'environnement Indice + Si $x=3$, que vaut $x^3+4x$ ? + \end{exercice} + \begin{Solution} + $x^3+4x=3^3+4\times3=27+12=39$ + \end{Solution} + \begin{Indice} + Que veut dire $x^3$ ? Que veut dire $4x$ ? + \end{Indice} + \begin{Reponse} + 39 + \end{Reponse} +\end{Maquette} +\end{Codes} +\begin{Maquette}[DS,CorrigeFin]{Numero=3} + \begin{exercice} % La clé CorrigeFin utilise le contenu de l'environnement Solution + $1+\dfrac2{10}=$ + \end{exercice} + \begin{Solution} + $1+\dfrac2{10}=\num{1.2}$ + \end{Solution} + \begin{Reponse} + \num{1.2} + \end{Reponse} + \begin{Indice} + Une unité représente dix dixièmes de l'unité. + \end{Indice} + \begin{exercice}[PasCorrige] + $7(x+5)=$ ? + \end{exercice} + \begin{Solution} + $7(x+5)=7\times x+7\times 5=7x+35$ + \end{Solution} + \begin{Indice} + Utiliser la simple distributivité. + \end{Indice} + \begin{Reponse} + $7x+35$ + \end{Reponse} + \begin{exercice}[Direct] + + $\dfrac34-\dfrac25=$? + \end{exercice} + \begin{Solution} + $\dfrac34-\dfrac25=\dfrac{15}{20}-\dfrac8{20}=\dfrac7{20}$ + \end{Solution} + \begin{Reponse} + $\dfrac7{20}$ + \end{Reponse} + \begin{Indice} + C'est une soustraction, il faut réduire au même dénominateur. + \end{Indice} + \begin{exercice}[Pouce] + Si $x=3$, que vaut $x^3+4x$ ? + \end{exercice} + \begin{Solution} + $x^3+4x=3^3+4\times3=27+12=39$ + \end{Solution} + \begin{Indice} + Que veut dire $x^3$ ? Que veut dire $4x$ ? + \end{Indice} + \begin{Reponse} + 39 + \end{Reponse} +\end{Maquette} +\end{document} +%%% Local Variables: +%%% TeX-engine: luatex +%%% End:
\ No newline at end of file diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty new file mode 100644 index 0000000000..c18029cbe4 --- /dev/null +++ b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty @@ -0,0 +1,1879 @@ +% Author : Christophe Poulain +% licence : Released under the LaTeX Project Public License v1.3c +% or later, see http://www.latex-project.org/lppl.txtf +\NeedsTeXFormat{LaTeX2e}% +\def\filedate{2023/06/04}% +\let\PfMfiledate\filedate% +\def\fileversion{0.15}% +\let\PfMfileversion\fileversion% +\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]% + +% packages nécessaires +\RequirePackage{verbatim} + +\RequirePackage{calc} + +\RequirePackage{xlop} + +\RequirePackage[most]{tcolorbox} +\RequirePackage{varwidth} +\RequirePackage{xinttools} + +\RequirePackage{listofitems} +\RequirePackage{array} +\RequirePackage{datatool} + +%définition des clés +\RequirePackage{simplekv} +\setKVdefault[Boulot]{Base=false,BaseHTML=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,ParcoursPerso=false,CorrigeApres=false,CorrigeFin=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,AllDirect=false,AllPouce=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé +\setKVdefault[DM]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname} +\setKVdefault[DS]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false,Sujet=A} +\setKVdefault[Fiche]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe=Nairobi,Code={},NomExercice=Exercice} +\setKVdefault[PdT]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe=Nairobi,Code={},NomExercice=Exercice} +\setKVdefault[Parcours]{Theme=Les nombres décimaux,Date=\today,Niveau=6,Classe=Nairobi,Code={},NomExercice=Exercice,Vertical=false} +\setKVdefault[ParcoursPerso]{Fichier={}} +\setKVdefault[IE]{Nom=\'Evaluation,Sujets=false,Theme={},Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false} +\defKV[IE]{Sujet=\setKV[IE]{Sujets}} +\setKVdefault[RecapBrevet]{Theme=Les nombres décimaux,Date=\today,Code={},NomExercice=Exercice} +\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lycée + du Hainaut (Valenciennes),NomEleve=Albert Einstein,CR=false} +\setKVdefault[ClesExercices]{PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,TitreExo=Exercice,PasCorrige=false,Direct=false,Pouce=false,Parcours=false}% +\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}% +\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}% +\defKV[ClesExercices]{Competence=\setKV[ClesExercices]{AffichageCompetence}}% +\defKV[ClesExercices]{Trajet=\setKV[ClesExercices]{Parcours}} +\setKVdefault[SchemaParcours]{Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=LightSteelBlue,Csv=false}% +% Definition de longueurs +\newlength\PfMLargeurSchemaParcours +\newlength{\PfMHauteurAppreciation} +\setlength{\PfMHauteurAppreciation}{5cm} +\newlength{\PfMHauteurRemarque} +\setlength{\PfMHauteurRemarque}{5cm} +%définition des compteurs +\newcounter{PfMExo}%Numéro des exercices +\setcounter{PfMExo}{0}% +\newcounter{PfMCorrigeParcoursPerso}%affichage des solutions ou pas dans le cadre d'un parcours perso +\setcounter{PfMCorrigeParcoursPerso}{0}% +\newcounter{PfMSOS}%Numéro des SOS dans les parcours fléchés +\setcounter{PfMSOS}{0}% +\newcounter{PfMAlea}%Pour repérer les valeurs aléatoires construites automatiquement +\setcounter{PfMAlea}{0}% +\newcounter{RetiensSol}%Pour l'affichage des solutions +\newcounter{RetiensRep}%Pour l'affichage des reponses. +\newcounter{RetiensInd}%Pour l'affichage des indices. +\setcounter{RetiensSol}{0}% +\setcounter{RetiensRep}{0}% +\setcounter{RetiensInd}{0}% +\newcounter{PfMNbLogo}%Pour décaler les logos sur la ligne haute de tcolorbox +\setcounter{PfMNbLogo}{0}% +\newcounter{Maquette}%Pour compter le nombres de "travaux" +\setcounter{Maquette}{0}% +\newcount\Orientation%Pour le schéma des parcours +% couleurs +\colorlet{PfMColCpt}{gray!50} +\colorlet{PfMColSrc}{gray!50} +\colorlet{PfMCadreFiche}{gray!50} +\colorlet{PfMCadreDM}{gray!85} +\colorlet{PfMCadreParcours}{gray!50} +% Définitions de commandes +\newcommand\PfMIENom{\dotfill} +\newcommand\PfMIEPrenom{\dotfill} +\newcommand\PfMIEClasse{\dotfill} +\newcommand\PfMCompNA{NA} +\newcommand\PfMCompECA{ECA} +\newcommand\PfMCompA{A} +% Définitions pour les compétences +\NewDocumentCommand\Competences{O{3}m}{% + \setsepchar[*]{/*§}\ignoreemptyitems% + \readlist*\ListeCompetence{#2} + \ifnum#1=3\relax + \buildtabcompetences% + \else + \Buildtabcompetences{#1}{\listlen\ListeCompetence[1]}% + \fi +} + +\def\buildtabcompetences{% + \[\begin{tabular}{|p{0.70\linewidth}|*{3}{>{\centering\arraybackslash}p{0.05\linewidth}|}} + \cline{2-4} + \multicolumn{1}{c|}{}&\PfMCompNA&\PfMCompECA&\PfMCompA\\ + \hline + \xintFor* ##1 in {\xintSeq {1}{\ListeCompetencelen}}\do{\ListeCompetence[##1]&&&\\\hline} + \end{tabular} + \] +}% + +\newlength\PfMLargeurComp + +\def\Buildtabcompetences#1#2{% + \setlength{\PfMLargeurComp}{\fpeval{0.85-0.05*#2}\linewidth}% + \[\begin{tabular}{|p{\PfMLargeurComp}|*{#1}{>{\centering\arraybackslash}p{0.05\linewidth}|}}% + \cline{2-\fpeval{1+#1}}% + \multicolumn{1}{c|}{}\xintFor* ##1 in{\xintSeq{1}{#1}}\do{% + &\ListeCompetence[1,##1]}\\% + \hline% + \xintFor* ##1 in {\xintSeq {2}{\ListeCompetencelen}}\do{\ListeCompetence[##1]% + \xintFor* ##2 in {\xintSeq{1}{#1}}\do{&}% + \\\hline% + }% + \end{tabular}% + \]% +}% + +%%%% +%%% Définitions des environnements pour la correction +\makeatletter +\newwrite\verbatim@out + +\def\SolutionWrite{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.sol" % + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endSolutionWrite{\immediate\closeout\verbatim@out\@esphack} + +\def\SolutionWritePP{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-PPEx\thePfMExo.sol" % + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endSolutionWritePP{\immediate\closeout\verbatim@out\@esphack} + +\def\ReponseWrite{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.rep" % + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endReponseWrite{\immediate\closeout\verbatim@out\@esphack} + +\def\IndiceWrite{% + \@bsphack + \immediate\openout \verbatim@out "\jobname-Ex\thePfMExo.cdp" %coup de pouce + \let\do\@makeother\dospecials + \catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start} +\def\endIndiceWrite{\immediate\closeout\verbatim@out\@esphack} +\makeatother + +\def\SolutionNow{\textbf{Correction de l'exercice --}\par\nopagebreak} +\def\endSolutionNow{\par\goodbreak} + +\def\ReponseNow{\textbf{Réponse(s) de l'exercice --}\par\nopagebreak} +\def\endReponseNow{\par\goodbreak} + +\def\IndiceNow{\textbf{Indice(s) --}\par\nopagebreak} +\def\endIndiceNow{\par\goodbreak} + +\NewDocumentEnvironment{Solution}{}{}{}% +\NewDocumentEnvironment{Reponse}{}{}{}% +\NewDocumentEnvironment{Indice}{}{}{}% + +\NewDocumentCommand\PfMChoixAffichageCorrection{}{% + \ifboolKV[Boulot]{ParcoursPerso}{% + \let\Solution\SolutionWritePP\let\endSolution\endSolutionWritePP + }{% + \ifnum\theRetiensSol=1\relax + \let\Reponse\comment\let\endReponse\endcomment + \let\Indice\comment\let\endIndice\endcomment + \ifboolKV[Boulot]{CorrigeFin}{% + \let\Solution\SolutionWrite\let\endSolution\endSolutionWrite + }{\ifboolKV[Boulot]{CorrigeApres}{% + \let\Solution\SolutionNow\let\endSolution\endSolutionNow + }{}% + }% + \else + \let\Solution\comment\let\endSolution\endcomment + \let\Indice\comment\let\endIndice\endcomment + \ifnum\theRetiensRep=1\relax + \ifboolKV[Boulot]{CorrigeFin}{% + \let\Reponse\ReponseWrite\let\endReponse\endReponseWrite + }{\ifboolKV[Boulot]{CorrigeApres}{% + \let\Reponse\ReponseNow\let\endReponse\endReponseNow + }{}% + }% + \else + \let\Solution\comment\let\endSolution\endcomment + \let\Reponse\comment\let\endReponse\endcomment + \ifnum\theRetiensInd=1\relax + \ifboolKV[Boulot]{CorrigeFin}{% + \let\Indice\IndiceWrite\let\endIndice\endIndiceWrite + }{\ifboolKV[Boulot]{CorrigeApres}{% + \let\Indice\IndiceNow\let\endIndice\endIndiceNow + }{}% + }% + \fi + \fi + \fi + }% +}% + +\NewDocumentCommand\PfMChoixCorrection{}{% + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{0} + \setcounter{RetiensInd}{0} + \ifboolKV[Boulot]{CorrigeFin}{% + \setcounter{RetiensSol}{1}% + \setcounter{RetiensRep}{0}% + \setcounter{RetiensInd}{0}% + }{\ifboolKV[Boulot]{CorrigeApres}{% + \setcounter{RetiensSol}{1}% + \setcounter{RetiensRep}{0}% + \setcounter{RetiensInd}{0}% + }{}% + }% + \ifboolKV[ClesExercices]{PasCorrige}{% + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{0} + \setcounter{RetiensInd}{0}% + }{% + \ifboolKV[ClesExercices]{Direct}{% + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{1} + \setcounter{RetiensInd}{0}% + }{% + \ifboolKV[ClesExercices]{Pouce}{ + \setcounter{RetiensSol}{0} + \setcounter{RetiensRep}{0} + \setcounter{RetiensInd}{1}% + }{}% + }% + }% +}% + +\NewDocumentCommand\PfMAffichageCorrige{}{% + \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{% + \IfFileExists{\jobname-Ex##1.sol}{\textbf{Corrigé de l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ex##1.rep}{\textbf{Réponse(s) seule(s) de l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.rep}\par\goodbreak}{% + \IfFileExists{\jobname-Ex##1.cdp}{\textbf{Indice(s) pour l'exercice ##1}\par\nopagebreak\input{\jobname-Ex##1.cdp}\par\goodbreak}{} + }% + }% + }% +}% +%%%%%%%% BAREME %%%%%%%%%%% +%% Bareme +\newlength{\brouillon} + +\newcommand*\FranPt[1]{% + \ifboolKV[ClesExercices]{BaremeDetaille}{% + \color{gray!75}(\num{#1})% + }{} +} + +\makeatletter +\newcommand\BaremeEspace@Marge{15pt} +\newcommand\BaremeEspace@MargeCorrection{0pt} +%\f@size est la taille par défaut de la fonte. + +\newcommand*{\brm}[1]{% + \ifboolKV[Boulot]{Fiche}{}{% + \immediate\write\@auxout{% + \string\opadd*{#1}% + {total\the\c@section-\the\c@PfMExo}% + {total\the\c@section-\the\c@PfMExo}% + \string\opcopy{\thePfMExo}{TotalExo}% + }% + \ifboolKV[ClesExercices]{BaremeDetaille}{% + \setlength{\brouillon}{\BaremeEspace@Marge-\linewidth+\textwidth}% + \makebox[0pt][r]{\footnotesize\FranPt{#1}\hspace*{\brouillon}}% + \ignorespaces% + }% + }{}% +}% + +\newcommand*{\Brm}[1]{% + \ifboolKV[Boulot]{Fiche}{}{% + \setlength{\brouillon}{\BaremeEspace@MargeCorrection-\linewidth+\textwidth}% + \makebox[0pt][r]{\footnotesize\color{gray!75}(\opprint{#1})\hspace*{\brouillon}}% + \ignorespaces% + }% +}% + +\newcommand\total[1]{% + \@ifundefined{Op@total#1}{recompilez}% + {% + \opunzero{total#1}% on ne sait jamais + \opset{decimalsepsymbol={,}} + \opprint{total#1}~% + \opset{decimalsepsymbol={.}} + \opcmp{total#1}{2}% + \ifopge \useKV[ClesExercices]{MotPoint}s\else \useKV[ClesExercices]{MotPoint}\fi + }% +} + +\newcommand\NoteFinale{% + \@ifundefined{Op@TotalExo}{Recompilez}% + {% + \opexport{TotalExo}{\TotalExo}%Le total d'exercices est \TotalExo. + \xdef\NoteTotale{0}% + \xintFor* ##1 in {\xintSeq{1}{\TotalExo}}\do{% + \opexport{total##1-##1}{\totalUn}% + \xdef\NoteTotale{\fpeval{\NoteTotale+\totalUn}}% + }% + \NoteTotale% + }% +}% + +\newcommand\TableauRecapitulatif{% + \@ifundefined{Op@TotalExo}{Recompilez}% + {% + \opexport{TotalExo}{\TotalExo}% + \begin{tabular}{|c|c|} + \hline + \multicolumn{2}{|c|}{Barème récapitulatif}\\ + \hline + \xintFor* ##1 in {\xintSeq{1}{\TotalExo}}\do{ + Exercice ##1&\total{##1-##1}\\ + } + \hline + \end{tabular} + } +}% +\makeatother +%%%%%%%% FIN BAREME %%%%%%%%%%%%%%%% +%%%Style des différents documents +\tcbset{% + tikzbase/.style={% + before skip=1em, + enhanced, + breakable, + bicolor, + colback=LightSteelBlue, + colbacklower=white, + frame hidden, + } +} + +\tcbset{% + tikzbasehtml/.style={% + before skip=1em, + enhanced, + breakable, + frame hidden, + } +} + +\makeatletter +%%% Base des exercices DM +\tcbset{% + BaseDM/.style={% + lowerbox=ignored, + enhanced, + breakable, + colback=white, + colframe=PfMCadreDM, + fonttitle=\bfseries\sffamily, + title=Exercice \thePfMExo, + attach boxed title to top left={xshift=0.2mm}, + boxed title size=standard, + boxed title style={% + empty, + rounded corners=north, + boxrule=0pt, + bottom=0pt + }, + underlay boxed title={% + \filldraw[rounded corners, gray!85, line width=.5mm] + (title.south east)--++(90:\tcboxedtitleheight)--++(183:\tcboxedtitlewidth)--++(-90:\tcboxedtitleheight)|-cycle; + },% + overlay unbroken and first={% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=gray!50, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + \ifboolKV[ClesExercices]{BaremeTotal}{% + \node[ + fill=white, + anchor=east, + xshift=-10pt, + text=black, + font=\bfseries + ] + at (frame.north east) + {\footnotesize\sffamily \total{\the\c@section-\the\c@PfMExo}}; + }{} + }% + }% +}% + +\newenvironment{exerciceDM}[1][]{% + \setcounter{PfMAlea}{0}% + \useKVdefault[ClesExercices] + \setKV[ClesExercices]{#1} + \refstepcounter{section} + \PfMChoixCorrection% + \refstepcounter{PfMExo} + \immediate\write\@auxout{% + \string\opcopy{\thePfMExo}{TotalExo}% + } + \ifboolKV[ClesExercices]{BaremeTotal}{% + \immediate\write\@auxout{% + \string\opcopy{0}{total\the\c@section-\the\c@PfMExo}% + }}{} + \tcolorbox[% + BaseDM, + label is label, + label=page-\theMaquette-\thePfMExo% + ] +}{% + \endtcolorbox% +} + +%%Parcours + +%\makeatletter +\NewDocumentCommand\AfficheParcours{om}{% + \useKVdefault[SchemaParcours]% + \setKV[SchemaParcours]{#1}% + \setlength{\PfMLargeurSchemaParcours}{\useKV[SchemaParcours]{Largeur}}% + \colorlet{PfMCouleurSP}{\useKV[SchemaParcours]{Couleur}}% + \@ifundefined{Op@ParcoursTotalExo}{Recompilez pour obtenir le parcours.}% + {% + \opexport{ParcoursTotalExo}{\ParcoursTotalExo}% + \setsepchar{,}\ignoreemptyitems% + \readlist*\ListeExercicesPA{\csname Parcours#2\endcsname} + \reademptyitems% + \xdef\PfCFooTestA{\ListeExercicesPA[1]}% + \ifnum\ListeExercicesPAlen>1\relax% + \xintFor* ##1 in{\xintSeq{2}{\ListeExercicesPAlen}}\do{% + \xdef\PfCFooTestA{\PfCFooTestA,\ListeExercicesPA[##1]}% + }% + \fi% + \ifboolKV[Parcours]{Vertical}{% + \BuildParcoursTikzV{\ParcoursTotalExo}{\PfCFooTestA}% + }{% + \BuildParcoursTikz{\ParcoursTotalExo}{\PfCFooTestA}% + }% + }% +}% +%\makeatother + +\NewDocumentCommand\BuildParcoursTikzV{mm}{% + \setsepchar{,}% + \readlist*\ListeRetiens{#2}% + \begin{tikzpicture}[remember picture,overlay] + % On place les points + \coordinate[xshift=-1cm,yshift=-4cm] (A-1) at (current page.north east);% + \xintFor* ##1 in{\xintSeq{2}{#1}}\do{% + \coordinate[yshift=-1cm] (A-##1) at (A-\fpeval{##1-1});% + }% + \foreach\i in{2,...,#1}{% + \draw[dashed] (A-\fpeval{\i-1}) -- (A-\i);% + }% + \xintFor* ##1 in{\xintSeq{1}{#1}}\do{% + \draw[fill=white,dashed](A-##1) circle (2.5mm) node{##1};% + }% + \foreachitem\compteur\in\ListeRetiens{% + \draw[fill=PfMCouleurSP](A-\ListeRetiens[\compteurcnt]) circle (2.5mm) node{\ref{page-\theMaquette-\ListeRetiens[\compteurcnt]}};% + }% + \end{tikzpicture}% +}% + +\NewDocumentCommand\BuildParcoursTikz{mm}{% + \setsepchar{,}% + \readlist*\ListeRetiens{#2}% + \begin{tikzpicture} + % On place les points + \Orientation=1\relax + \coordinate (A-1) at (0,0);% + \xintFor* ##1 in{\xintSeq{2}{#1}}\do{% + \modulo{##1}{\useKV[SchemaParcours]{Colonnes}}% + \ifnum\remainder=0\relax% + \Orientation=\numexpr\Orientation*(-1)\relax% + \coordinate[yshift=-1cm] (A-##1) at (A-\fpeval{##1-1});% + \else% + \coordinate[xshift=\the\Orientation*\PfMLargeurSchemaParcours] (A-##1) at (A-\fpeval{##1-1});% + \fi% + }% + \foreach\i in{2,...,#1}{% + \draw[dashed] (A-\fpeval{\i-1}) -- (A-\i);% + }% + \xintFor* ##1 in{\xintSeq{1}{#1}}\do{% + \draw[fill=white,dashed](A-##1) circle (2.5mm) node{##1};% + }% + \foreachitem\compteur\in\ListeRetiens{% + \draw[fill=PfMCouleurSP](A-\ListeRetiens[\compteurcnt]) circle (2.5mm) node{\ref{page-\theMaquette-\ListeRetiens[\compteurcnt]}};% + }% + \end{tikzpicture}% +}% + +\NewDocumentCommand\RemplisParcours{m}{% + \ifcsname trajet#1\endcsname + \expandafter\xdef\csname trajet#1\endcsname{\csname trajet#1\endcsname,\thePfMExo}% +% Yes ! + \else +% No ! + \expandafter\xdef\csname trajet#1\endcsname{\thePfMExo}% + \fi + \immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname Parcours#1\endcsname{\csname trajet#1\endcsname}}% +}% + +\def\exerciceParcoursPerso{% + \stepcounter{PfMExo}% + \PfMChoixCorrection% + \@bsphack% + \immediate\openout \verbatim@out "\jobname-PPEx\thePfMExo.tex" % + \let\do\@makeother\dospecials% + \catcode`\^^M\active% + \def\verbatim@processline{% + \immediate\write\verbatim@out{\the\verbatim@line}}% + \verbatim@start}% + +\def\endexerciceParcoursPerso{\immediate\closeout\verbatim@out\@esphack}% + +\newenvironment{exerciceParcours}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \immediate\write\@auxout{\string\opcopy{\thePfMExo}{ParcoursTotalExo}}% + % Creation des parcours + \ifboolKV[ClesExercices]{Parcours}{% + \setsepchar{,}% + \xdef\PfMFooListeParcours{\useKV[ClesExercices]{Trajet}} + \readlist*\ListeParcours{\PfMFooListeParcours}% + \foreachitem\compteur\in\ListeParcours{% + \RemplisParcours{\ListeParcours[\compteurcnt]}% + }% + }{}% + % + \tcolorbox[% + tikzparcours, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceFiche}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \tcolorbox[% + tikzfiche, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceDS}[1][]{% + \setcounter{PfMAlea}{0}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \immediate\write\@auxout{% + \string\opcopy{\thePfMExo}{TotalExo}% + } + \ifboolKV[ClesExercices]{BaremeTotal}{% + \immediate\write\@auxout{% + \string\opcopy{0}{total\the\c@section-\the\c@PfMExo}% + }}{} + \tcolorbox[% + tikzds, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} +\makeatother +%%% Recap Brevet +% Fiche Exercice Brevet +\newcommand\TikzRecapBrevet{% +\begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[RecapBrevet]{Theme} + \par{\tiny\useKV[RecapBrevet]{Code}}\hfill{\scriptsize\useKV[RecapBrevet]{Date}} + \end{tcolorbox}% +} + +\newcommand\TikzRecapBrevetCor[1]{% + \clearpage + \setKV[RecapBrevet]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[RecapBrevet]{Theme} (Correction) + \par{\tiny\useKV[RecapBrevet]{Code}}\hfill{\scriptsize\useKV[RecapBrevet]{Date}} + \end{tcolorbox}% +} + +\makeatletter +\newenvironment{ExerciceRecapBrevet}[1][]{% + \setcounter{PfMAlea}{0}% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \ifboolKV[ClesExercices]{BaremeTotal}{% + \immediate\write\@auxout{% + \string\opcopy{0}{total\the\c@section-\the\c@PfMExo}% + }% + }{}% + \tcolorbox[% + tikzrecapbrevet, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\tcbset{% + tikzrecapbrevet/.style={% + before skip=1em,% + enhanced,% + breakable,% + colback=white,% + colframe=PfMCadreFiche,% + overlay unbroken and first={% + \node[% + name=A,% + fill=white,% + anchor=west,% + xshift=10pt,% + ] at (frame.north west){\bfseries\sffamily \useKV[Fiche]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};% + %% + \node[% + fill=white,% + anchor=east,% + xshift=-10pt,% + text=black,% + font=\bfseries% + ] + at (frame.north east)% + {\footnotesize\sffamily \total{\the\c@section-\the\c@PfMExo}};% + }% + }% +}% +\makeatother +%% PDT +\tcbset{% + tikzpdt/.style={% + top=\ifboolKV[ClesExercices]{PasTitre}{0mm}{2mm},bottom=0mm,left=0mm,right=0mm,% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=blue!50, + remember, + overlay unbroken and first={% + \coordinate[xshift=2pt,yshift=-2pt] (NO-\thePfMExo) at (frame.north west);% + \coordinate[xshift=-2pt,yshift=-2pt] (NE-\thePfMExo) at (frame.north east);% + \coordinate[xshift=-2pt,yshift=2pt] (SE-\thePfMExo) at (frame.south east);% + \coordinate[xshift=2pt,yshift=2pt] (SO-\thePfMExo) at (frame.south west);% + \coordinate (N-\thePfMExo) at (frame.north); + \coordinate (S-\thePfMExo) at (frame.south); + \coordinate (E-\thePfMExo) at (frame.east); + \coordinate (O-\thePfMExo) at (frame.west); + \ifboolKV[ClesExercices]{PasTitre}{% + \coordinate[xshift=10pt] (A) at (frame.north west); + }{% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\bfseries\sffamily \useKV[PdT]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}}; + } + %% + \ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}} + \ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}% + %% + \ifboolKV[ClesExercices]{AffichageCompetence}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColCpt,% + ] + at (frame.north east) + {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}}; + }{}% + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColSrc, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + }% + }% +}% + +\NewDocumentCommand\TikzPdT{}{% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[PdT]{Theme}\hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe}% + \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}}% + \end{tcolorbox}% +} + +\NewDocumentCommand\TikzPdTCor{m}{% + \clearpage + \setKV[PdT]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[PdT]{Theme} (Correction) \hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe} + \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}} + \end{tcolorbox}% +} + +\newenvironment{exercicePdT}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1} + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \refstepcounter{section}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \tcolorbox[% + tikzpdt + ]% +}{\endtcolorbox% +} + +\newenvironment{SOS}[1][]{% + \stepcounter{PfMSOS}% + \tcolorbox[% + enhanced, + remember,% + tikzsos, + overlay unbroken and first={% + \coordinate[xshift=2pt,yshift=-2pt] (SOS-NO-\thePfMSOS) at (frame.north west);% + \coordinate[xshift=-2pt,yshift=-2pt] (SOS-NE-\thePfMSOS) at (frame.north east);% + \coordinate[xshift=-2pt,yshift=2pt] (SOS-SE-\thePfMSOS) at (frame.south east);% + \coordinate[xshift=2pt,yshift=2pt] (SOS-SO-\thePfMSOS) at (frame.south west);% + \coordinate (SOS-N-\thePfMSOS) at (frame.north); + \coordinate (SOS-S-\thePfMSOS) at (frame.south); + \coordinate (SOS-E-\thePfMSOS) at (frame.east); + \coordinate (SOS-O-\thePfMSOS) at (frame.west); + }% + ]% +}{\endtcolorbox% +} + +\tikzstyle{cheminPdT}=[-stealth] + +\NewDocumentCommand\CheminVrai{m}{% + \setsepchar[*]{,*/}% + \readlist*\ListeCheminVrai{#1}% + \setsepchar{,}% + \begin{tikzpicture}[remember picture,overlay]% + \foreachitem\compteur\in\ListeCheminVrai{% + \draw[cheminPdT] (\ListeCheminVrai[\compteurcnt,1]) to node[midway]{\Large \RKbigsmile}(\ListeCheminVrai[\compteurcnt,2]);% + }% + \end{tikzpicture}% +}% + +\NewDocumentCommand\CheminFaux{m}{% + \setsepchar[*]{,*/}% + \readlist*\ListeCheminVrai{#1}% + \setsepchar{,}% + \begin{tikzpicture}[remember picture,overlay]% + \foreachitem\compteur\in\ListeCheminVrai{% + \draw[cheminPdT] (\ListeCheminVrai[\compteurcnt,1]) to node[midway]{\Large \RKdevilish}(\ListeCheminVrai[\compteurcnt,2]);% + }% + \end{tikzpicture}% +}% + +\tcbset{% + tikzsos/.style={% + left=0pt,right=0pt,top=0pt,bottom=0pt,% + colback=Crimson!15,% + colframe=Crimson!50,% + }% +}% + +%% Kholle +\tcbset{% + tikzkholle/.style={% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=gray!50, + overlay unbroken and first={% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\ifboolKV[ClesExercices]{AffichageTitre}{% + {\bfseries\sffamily\useKV[ClesExercices]{Titre}}% + }{\bfseries\sffamily Exercice \thePfMExo}% + \xintifboolexpr{\useKV[ClesExercices]{Difficulte}<1}{}{% + ~(\foreach \s in {1,...,\useKV[ClesExercices]{Difficulte}}{% + $\star$% + })% + } + } + ; + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[ + fill=white, + anchor=east, + xshift=-10pt, + text=gray!50, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{} + } + } +} + +\newenvironment{CRNote}{% + \tcolorbox[colback=white,height=2cm,title=NOTE,fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white,enhanced,% + overlay unbroken and first={% + \node[% + anchor=east, + yshift=-8pt, + xshift=-10pt, + text=black, + ] + at (frame.north east) + {\sffamily\bfseries \useKV[Kholle]{NomEleve}}; + \node[% + anchor=center, + yshift=-8pt, + text=black, + ] + at (frame.north) + {\sffamily\bfseries \useKV[Kholle]{Date}}; + } + ]% + }{% + \endtcolorbox% +} + +\newlength{\CRRHauteur} +\setlength{\CRRHauteur}{10cm} + +\newenvironment{CRRemarque}{% + \tcolorbox[colback=white,height=\CRRHauteur,title=REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]} +{% + \endtcolorbox% +}% + +\NewDocumentEnvironment{exerciceKholle}{o}{% + \useKVdefault[ClesExercices]% + \setKV[ClesExercices]{#1}% + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}% + \PfMChoixCorrection% + \refstepcounter{PfMExo}% + \tcolorbox[% + tikzkholle, + label is label, + label=page-\theMaquette-\thePfMExo + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceBase}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1} + \useKVdefault[ClesExercices] + \setKV[ClesExercices]{#1} + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false} + \refstepcounter{PfMExo} + \tcolorbox[% + tikzbase + ] +}{\endtcolorbox% +} + +\newenvironment{exerciceBaseHTML}[1][]{% + \setcounter{PfMAlea}{0}% + \setcounter{PfMNbLogo}{1} + \useKVdefault[ClesExercices] + \setKV[ClesExercices]{#1} + \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false} + \refstepcounter{PfMExo} + \tcolorbox[% + standard jigsaw, opacityback=0, + lowerbox=ignored, + tikzbasehtml + ] +}{\endtcolorbox% +} + +%Alias pour tous les exercices. +\NewDocumentEnvironment{exercice}{}{}{}% + +%%%%%%%%% STyle Kholle%%%%%%%%%% +% Kholle +\newcommand\TikzKholle{% + \clearpage + \begin{tcolorbox}[frame hidden,colback=white,enhanced,% + borderline north={3pt}{0pt}{gray!85}, + borderline north={2pt}{0.5pt}{gray!15}, + borderline south={3pt}{0pt}{gray!85}, + borderline south={2pt}{0.5pt}{gray!15}, + ]% + \sffamily Interrogation Orale \no\useKV[Kholle]{Numero}\hfill + \ifboolKV[Kholle]{CR}{}{Sujet \useKV[Kholle]{Sujet}\hfill}\useKV[Kholle]{Niveau}% + \par\useKV[Kholle]{Lieu}\hfill Le \useKV[Kholle]{Date}% + \end{tcolorbox}% +} + +\newcommand\TikzKholleCor[1]{% + \clearpage + \setKV[Kholle]{#1} + \begin{tcolorbox}[colback=white,height=2cm,title=NOTE,fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white,enhanced,% + overlay unbroken and first={% + \node[% + anchor=east, + yshift=-8pt, + xshift=-10pt, + text=black, + ] + at (frame.north east) + {\sffamily\bfseries Nom : \hbox to5cm{}}; + \node[% + anchor=center, + yshift=-8pt, + text=black, + ] + at (frame.north) + {\sffamily\bfseries \useKV[Kholle]{Date}}; + } + ]% + \end{tcolorbox}% + \begin{tcolorbox}[colback=white,height=2cm,title=EXERCICE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]% + \end{tcolorbox}% + \begin{tcolorbox}[colback=white,height=\textheight-5cm,title=REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]% + \end{tcolorbox}% +} + +%%%%%%%%%% Style DM%%%%%%%%%%%%% +\NewDocumentCommand\TikzDM{}{% + \clearpage% + \begin{tcolorbox}[frame hidden,colback=white,enhanced,% + borderline north={3pt}{0pt}{gray!85},% + borderline north={2pt}{0.5pt}{gray!15},% + borderline south={3pt}{0pt}{gray!85},% + borderline south={2pt}{0.5pt}{gray!15},% + ]% + \sffamily Devoir en temps libre \useKV[DM]{Numero}\hfill\useKV[DM]{Niveau} \useKV[DM]{Classe}%\no + \par{\tiny\useKV[DM]{Code}}\hfill{\scriptsize Pour le \useKV[DM]{Date}}% + \end{tcolorbox}% +}% + +\NewDocumentCommand\TikzDMCor{m}{% + \clearpage + \setKV[DM]{#1} + \begin{tcolorbox}[colback=white,height=\PfMHauteurAppreciation,title=APPR\'ECIATION,fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white,enhanced,% + overlay unbroken and first={% + \node[% + inner sep=0pt, + fill=white, + anchor=east, + yshift=-9pt, + xshift=-10pt, + text=black, + ] + at (frame.north east) + {\scriptsize\sffamily\bfseries \useKV[DM]{Code}}; + } + ]% + \end{tcolorbox}% + \begin{tcolorbox}[colback=white,height=\PfMHauteurRemarque,title=CONSEIL(S) / REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white% + ]% + \end{tcolorbox}% +} +%%%%%%Style Fiche +\NewDocumentCommand\TikzFiche{}{% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Fiche]{Theme}\hfill\useKV[Fiche]{Niveau} \useKV[Fiche]{Classe}% + \par{\tiny\useKV[Fiche]{Code}}\hfill{\scriptsize\useKV[Fiche]{Date}}% + \end{tcolorbox}% +} + +\NewDocumentCommand\TikzFicheCor{m}{% + \clearpage + \setKV[Fiche]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Fiche]{Theme} (Correction) \hfill\useKV[Fiche]{Niveau} \useKV[Fiche]{Classe} + \par{\tiny\useKV[Fiche]{Code}}\hfill{\scriptsize\useKV[Fiche]{Date}} + \end{tcolorbox}% +} + +\tcbset{% + tikzfiche/.style={% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=PfMCadreFiche, + overlay unbroken and first={% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\bfseries\sffamily \useKV[Fiche]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}}; + %% + \ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}} + \ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{} + %% + \ifboolKV[ClesExercices]{AffichageCompetence}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColCpt,% + ] + at (frame.north east) + {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}}; + }{}% + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColSrc, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + }% + }% +}% +%%% Parcours %%% +\NewDocumentCommand\TikzParcours{}{% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Parcours]{Theme}\hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe}% + \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}}% + \end{tcolorbox}% +} + +\NewDocumentCommand\TikzParcoursCor{m}{% + \clearpage + \setKV[Parcours]{#1}% + \begin{tcolorbox}[spread upwards=-1cm,colback=gray!5]% + \Large\sffamily \useKV[Parcours]{Theme} (Correction) \hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe} + \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}} + \end{tcolorbox}% +} + +\tcbset{% + tikzparcours/.style={% + before skip=1em, + enhanced, + breakable, + colback=white, + colframe=PfMCadreParcours, + overlay unbroken and first={% + \node[% + name=A, + fill=white, + anchor=west, + xshift=10pt, + ] at (frame.north west){\bfseries\sffamily \useKV[Parcours]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}}; + %% + \ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}} + \ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{} + %% + \ifboolKV[ClesExercices]{AffichageCompetence}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColCpt,% + ] + at (frame.north east) + {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}}; + }{}% + %% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[% + fill=white, + anchor=east, + xshift=-10pt, + text=PfMColSrc, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{}% + }% + }% +}% +%% Fin Parcours %%% +%%% DS %%% +\newcommand\TikzDS{% + \clearpage + \begin{tcolorbox}[colback=gray!5,% + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe} + \par{\tiny\useKV[DS]{Code}}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% +}% + +\newcommand\TikzDSCor[1]{% + \clearpage + \setKV[DS]{#1} + \begin{tcolorbox}[colback=gray!5]% + \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe}% + \par Correction% + \end{tcolorbox}% +} + +\makeatletter +\tcbset{% + tikzds/.style={% + enhanced, + breakable, + before skip=2mm,after skip=2mm, + colback=white, + attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, + varwidth boxed title*=-3cm, + boxed title style={frame code={ + \path[fill=tcbcolback!30!black] + ([yshift=-1mm,xshift=-1mm]frame.north west) + arc[start angle=0,end angle=180,radius=1mm] + ([yshift=-1mm,xshift=1mm]frame.north east) + arc[start angle=180,end angle=0,radius=1mm]; + \path[left color=tcbcolback!60!black,right color=tcbcolback!60!black, + middle color=tcbcolback!80!black] + ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) + [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) + -- (frame.south east) -- (frame.south west) + -- ([xshift=-1mm,yshift=-1mm]frame.north west) + [sharp corners]-- cycle; + },interior engine=empty, + }, + fonttitle=\bfseries\sffamily, + title=Exercice \thePfMExo \ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}, + overlay unbroken and first={% + \ifboolKV[ClesExercices]{AffichageSource}{% + \node[ + fill=white, + anchor=east, + yshift=0.5pt, + xshift=-10pt, + text=gray!85, + ] + at (frame.south east) + {\scriptsize\sffamily \useKV[ClesExercices]{Source}}; + }{} + \ifboolKV[ClesExercices]{BaremeTotal}{% + \node[ + fill=white, + anchor=east, + xshift=-10pt, + text=black, + font=\bfseries + ] + at (frame.north east) + {\footnotesize\sffamily \total{\the\c@section-\the\c@PfMExo}}; + }{} + }% + }% +}% +\makeatother +%Interrogations écrites +\newcommand\TikzIE{% + \clearpage + \begin{minipage}{0.6\linewidth} + \begin{tcolorbox}[colback=gray!5, + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[IE]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{Sujet})}{} + \vspace{1em} + \par{\tiny\useKV[IE]{Code}}\hfill{\scriptsize\useKV[IE]{Date}} + \end{tcolorbox}% + \end{minipage}\hfill\begin{minipage}{0.35\linewidth} + Nom : \PfMIENom\\[0.5em] + Prénom : \PfMIEPrenom\\[0.5em] + Classe : \PfMIEClasse + \end{minipage} + \par\bigskip +} + +\newcommand\TikzIECor[1]{% + \clearpage + \setKV[IE]{#1} + \begin{tcolorbox}[colback=gray!5, + enhanced,% + overlay unbroken and first={% + \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --}; + } + ]% + \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{Sujet})}{}\hfill Correction% + \par{\tiny\useKV[IE]{Code}}\hfill{\scriptsize\useKV[DS]{Date}} + \end{tcolorbox}% +} + +\NewDocumentCommand\Recapitulatif{m}{% + \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{% + \begin{Maquette}[Fiche]{#1,Code=\normalsize\Prenom~\Nom}% + \readlist*\ListeExercices{\RecapListeExo}% + \foreach\i in{1,...,\ListeExerciceslen}{% + \begin{exercice}% + \input{\jobname-PPEx\ListeExercices[\i].tex}% + \end{exercice}% + }% + \end{Maquette}% + }% +}% + +\NewDocumentCommand\RecapitulatifCorrection{m}{% + \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{% + \clearpage + \TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}% + \readlist*\ListeExercices{\RecapListeExo}% + \foreach\i in{1,...,\ListeExerciceslen}{% + \IfFileExists{\jobname-PPEx\ListeExercices[\i].sol}{\textbf{Corrigé de l'exercice \i} : \input{\jobname-PPEx\ListeExercices[\i].sol}\par\goodbreak}{}% + }% + }% +}% + +%%%%%%%%%%%%%%% Debut Maquette %%%%%%% +% Environnement englobant le tout. +%\makeatletter +\NewDocumentEnvironment{Maquette}{om}{% + % on remet à zéro le compteur des exercices + \setcounter{PfMExo}{0}% + \setcounter{PfMSOS}{0}% + % nouvelles valeurs. + \stepcounter{Maquette}% + % options de boulot + \IfHookExistsTF{env/Maquette/after}{\RemoveFromHook{env/Maquette/after}[*]}{}% + \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]}{}% + %\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}% + \useKVdefault[Boulot]% + \setKV[Boulot]{#1}% + \IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}% + \ifboolKV[Boulot]{RecapBrevet}{% + \setKV[RecapBrevet]{#2}% + \TikzRecapBrevet% + \let\exercice\ExerciceRecapBrevet\let\endexercice\endExerciceRecapBrevet% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzRecapBrevetCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{ParcoursPerso}{% + \setKV[ParcoursPerso]{#2}% + \DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}% + \let\exercice\exerciceParcoursPerso% + \let\endexercice\endexerciceParcoursPerso% + \ifboolKV[Boulot]{CorrigeFin}{\setcounter{PfMCorrigeParcoursPerso}{1}}{}% + \setcounter{PfMExo}{0}% + \AtEndDocument{% + \Recapitulatif{#2}% + \ifnum\thePfMCorrigeParcoursPerso=1\relax% + \RecapitulatifCorrection{#2}% + \fi + }% + }{% + \ifboolKV[Boulot]{Parcours}{% + \setKV[Parcours]{#2}\TikzParcours% + \let\exercice\exerciceParcours% + \let\endexercice\endexerciceParcours% + \ifboolKV[Boulot]{CorrigeFin}{% + \PfMAffichageCorrige% + }{}% + }{% + \ifboolKV[Boulot]{PdT}{% + \setKV[PdT]{#2}\TikzPdT% + \let\exercice\exercicePdT + \let\endexercice\endexercicePdT% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzPdTCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{ + \ifboolKV[Boulot]{DM}{% + \setKV[DM]{#2}\TikzDM% + \let\exercice\exerciceDM + \let\endexercice\endexerciceDM% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzDMCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{Fiche}{% + \setKV[Fiche]{#2}\TikzFiche% + \let\exercice\exerciceFiche + \let\endexercice\endexerciceFiche% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzFicheCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{DS}{% + \setKV[DS]{#2}\TikzDS% + \let\exercice\exerciceDS + \let\endexercice\endexerciceDS% + \ifboolKV[Boulot]{BaremeComplet}{% + \begin{center} + \TableauRecapitulatif + \end{center} + }{}% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzDSCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{IE}{% + \setKV[IE]{#2}\TikzIE% + \let\exercice\exerciceDS\let\endexercice\endexerciceDS%On garde exerciceDS + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzIECor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }{% + \ifboolKV[Boulot]{Kholle}{% + \setKV[Kholle]{#2}% + \TikzKholle% + \let\exercice\exerciceKholle\let\endexercice\endexerciceKholle% + \ifboolKV[Kholle]{CR}{}{% + \ifboolKV[Boulot]{CorrigeFin}{% + \AddToHook{env/Maquette/after}[Correction]{% + \TikzKholleCor{#2}% + \TikzKholleCor{#2}% + \TikzKholleCor{#2}% + \PfMAffichageCorrige% + }% + }{}% + }% + }{}% + }% + }% + }% + }% + }% + }% + }% + }% +}{}% +%\makeatother + +%D'après JCC +% pour gérer les nombres pseudo-aléatoires +\makeatletter +\input{random} + +% Pour toutes les macros de liste, le premier paramètre est le nom de +% la macro représentant la liste. + +% macro pour tester si une liste est vide +\def\empty@list{} + +% Macro pour définir une nouvelle liste +\newcommand\definelist[2]{\def#1{#2}} + +% Macro pour ajouter un élément en fin de liste +\newcommand\push[2]{% + \ifx\\#2\\% + \PackageError{randomlist} + {You can't push an empty value.} + {Arg 2 of \string\pushlist is empty.}% + \else + \ifx#1\empty@list + \def#1{#2}% + \else + \edef#1{#1,#2}% + \fi + \fi +} + +% Macro pour retirer le premier élément d'une liste +\newcommand\pop[2]{% + \getwidth{#1}{\RL@temp}% + \ifnum\RL@temp = 0 + % cas de la liste vide + \PackageError{randomlist} + {You can't pop an empty list.} + {There is no value to pull in list #1.}% + \else\ifnum\RL@temp = 1 + % cas de la liste avec un seul élément + \edef#2{#1}% + \def#1{}% + \else + % cas de la liste avec au moins deux éléments + \expandafter\@@poplist#1,\@nil#1#2% + \fi\fi +} +\def\@@poplist#1,#2,\@nil#3#4{% + \def#4{#1}% + \def#3{#2}% +} + +% Macro comptant le nombre d'élément d'une liste. +\newcount\RL@cnta +\newcommand\getwidth[2]{% + \RL@cnta \z@ + \unless\ifx#1\empty@list + \expandafter\@countlist#1,\@nil,% + \fi + \edef#2{\the\RL@cnta}% +} +\def\@countlist#1,{% + \def\RL@arg{#1}% + \unless\ifx\RL@arg\@nnil + \advance\RL@cnta \@ne + \expandafter\@countlist + \fi +} + +% Macro d'extraction de la nieme valeur +\newcommand\extract[3]{% + % #1 = liste + % #2 = indice + % #3 = macro de retour de la nieme valeur + % On vérifie si la longueur de la liste est suffisante + \getwidth{#1}{\RL@temp}% + \ifnum#2>\RL@temp + \PackageError{randomlist} + {Value number #2 doesn't exist in list #1} + {List #1 has only \RL@temp\ values}% + \else + \RL@cnta #2 + % On initialise une liste temporaire qui se remplira avec les + % éléments non extraits + \def\RL@temp{}% + % Lancement de la lecture récursive de la liste + \expandafter\RL@extract#1,\@nil,% + % On met la valeur extraite dans la macro prévue + \xdef#3{\RL@return}%cp a remplacé edef par xdef + % La liste est celle sans l'élément extrait + \let#1\RL@temp + \fi +} +\def\RL@extract#1,{% + % Dans cette étape, on ne peut pas atteindre la fin de la liste, il + % faut juste repérer l'élément à extraire + \advance\RL@cnta \m@ne + \ifnum\RL@cnta = 0 + % L'élément est atteint, on le sauvegarde + \def\RL@return{#1}% + % et on appelle la macro récursive de fin de lecture. + \expandafter\RL@@extract + \else + % L'élément n'est pas atteint, on augmente la liste temporaire + % on protège d'éventuelles virgule avec des accolades + \edef\RL@temp{\RL@temp,{#1}}% + % et on réalise l'appel récursif + \expandafter\RL@extract + \fi +} +\def\RL@@extract#1,{% + % L'élément a été extrait, on lit le reste de la liste pour mettre à + % jour la liste temporaire + \def\RL@arg{#1}% + \ifx\RL@arg\@nnil + % Si la liste est vide, on place une virgule + \ifx\RL@temp\empty + \def\RL@temp{,}% + \fi + % La fin de la liste est atteinte, il faut supprimer la virgule + % initiale de la liste temporaire + \expandafter\RL@@@extract\RL@temp\@nil + \else + % On n'a pas atteint la fin de liste, on augmente la liste + % temporaire avec l'élément lu et on réalise l'appel récursif + % l'élément ajouté est protégé avec des accolades au cas où il + % contiendrait des virgules. + \edef\RL@temp{\RL@temp,{#1}}% + \expandafter\RL@@extract + \fi +} +\def\RL@@@extract,#1\@nil{\def\RL@temp{#1}} + +% Extraction de l'élément <n> de la liste. Le choix de <n> étant +% aléatoire +\newcount\RL@cntb +\newcommand\randomextract[2]{% + % Le choix aléatoire se fait dans l'intervalle [1,max de la liste] + % donc on commence par récupérer l'indice maximum de la liste. + \getwidth{#1}{\RL@temp}% + % Nombre aléatoire dans le compteur \RL@cntb + \setrannum{\RL@cntb}{1}{\RL@temp}% + % Appel de la macro d'extraction + \extract{#1}{\the\RL@cntb}{#2}% +} +% +% Initialisation du germe en gardant la même valeur toutes les #2 +% compilations. Lors de la première compilation, c'est #1 qui sera le +% germe (si valeur vide, on laisse faire random) +\newcommand\initrandomlist[2][]{% + \ifdefined\randomlistseed + % Si le germe existe, c'est qu'il a été déclaré dans le + % fichier .aux avec le compteur de compilation. Le germe et le + % compteur de compilation existent et sont à jour. + \else + % Si le fichier aux n'a pas déclaré de compteur \randomlistseed + % on considère qu'on est à la première compilation donc qu'on + % compile avec un nouveau germe et un compteur de compilation à + % un. Dans ce cas particulier, on laisse random.tex choisir le + % germe. + \newcount\randomlistseed + \ifx\\#1\\ + % si l'argument optionnel est vide, on laisse faire random + \nextrandom + \randomlistseed \randomi + \else + % sinon, on prend cet argument comme germe initial + \randomlistseed #1 + \fi + \newcount\randomlistcompile + \randomlistcompile \@ne + \fi + % Utilisation du germe adéquat pour la compilation en cours. + \randomi\randomlistseed + % Préparation de la compilation suivante (dans le fichier .aux) + % On regarde si le nombre de compilations est égale à zéro modulo #2 + \ifnum\numexpr(\randomlistcompile/#2)*#2-\randomlistcompile=0 + % Si le nombre de compilations avec le même germe est atteint + % on changera le germe à la prochaine compilation. + \immediate\write\@mainaux{% + \string\newcount\string\randomlistseed + }% + % modification du germe (sans laisser faire random sinon cela ne + % change pas au cours de chaque minute) + \ifnum\randomlistseed>2147483646 + \randomlistseed \z@ + \else + \advance\randomlistseed \@ne + \fi + \immediate\write\@mainaux{% + \string\global\string\randomlistseed=\the\randomlistseed + }% + \else + % Il faut faire encore des compilations avec le même germe, on + % sauvegarde le germe et le compteur de compilation dans le + % fichier .aux. + \immediate\write\@mainaux{% + \string\newcount\string\randomlistseed + }% + \immediate\write\@mainaux{% + \string\global\string\randomlistseed=\the\randomlistseed + }% + \fi + % Dans tous les cas, on augmente le compteur de compilation + \immediate\write\@mainaux{% + \string\newcount\string\randomlistcompile + }% + \advance\randomlistcompile \@ne + \immediate\write\@mainaux{% + \string\global\string\randomlistcompile=\the\randomlistcompile + }% +} +\makeatother +\newcommand\initEnsemblede{% + \definelist{\EnsembleDe}{% + {2,4,6,8,10,12},% + {1,3,5,7,9,11},% + {2,3,5,7,11,13},% + } +} + +\newcommand\GetValeurDe[1]{% + \extract{\EnsembleDe}{#1}{\DeChoisi}% + \randomextract{\DeChoisi}{\NbDeChoisi}% +} + +\newcommand\initpremiers{% + \definelist{\listpremiers}{13,17,19,23,29,31,37,41,43,47}% +} + +\newcommand\initPremiers{% + \definelist{\listPremiers}{71,73,79,83,89,97,101,103,107,109,113,127,131,137,139}% +} + +\newcommand\getpremier{% + \randomextract{\listpremiers}{\NbPremier} +}% + +\newcommand\getPremier{% + \randomextract{\listPremiers}{\NBPremier} +}% + +\newcommand\getpytha{% + \randomextract{\tripletspythaentier}{\triplet}% + \extract{\triplet}{3}{\grand}% le troisième et le plus grand + \randomextract{\triplet}{\cote}% + \randomextract{\triplet}{\autre}% +} + +\newcommand\initalpha{% + \definelist{\alphas}{b,c,d,e,f} +} +\newcommand\getalpha{% + \randomextract{\alphas}{\alphaA}% +}% + +\newcommand\initsommet{% + \definelist{\sommets}{A,B,C,D,E,F,G,H,I,J,K,L,M,% pas d'espace ? + N,O,P,Q,R,S,T,U,V,W,X,Y,Z}% +} + +\newcommand\initsommetrep{% + \definelist{\sommets}{A,B,C,D,E,F,G,H,I,J,K,L,M,% pas d'espace ? + N,P,Q,R,S,T,U,V,W,X,Y,Z}% +} + +\newcommand\gettri{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% +} + +\newcommand\getquad{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% +} + +\newcommand\getpenta{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% +} + +\newcommand\gethexa{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% +} + +\newcommand\gethepta{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% +} + +\newcommand\getocto{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% + \randomextract{\sommets}{\pH}% +} + +\newcommand\getnonna{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% + \randomextract{\sommets}{\pH}% + \randomextract{\sommets}{\pI}% +} + +\newcommand\gettreize{% + \randomextract{\sommets}{\pA}% + \randomextract{\sommets}{\pB}% + \randomextract{\sommets}{\pC}% + \randomextract{\sommets}{\pD}% + \randomextract{\sommets}{\pE}% + \randomextract{\sommets}{\pF}% + \randomextract{\sommets}{\pG}% + \randomextract{\sommets}{\pH}% + \randomextract{\sommets}{\pI}% + \randomextract{\sommets}{\pJ}% + \randomextract{\sommets}{\pK}% + \randomextract{\sommets}{\pL}% + \randomextract{\sommets}{\pM}% +} + +\definelist{\quadruplets}{% +{2{,}8,9{,}6,6,8},%10 +{3{,}2,12{,}6,5,12},%13 +{6{,}6,11{,}2,5,12},%13 +{7{,}8,10{,}4,5,12},%13 +{3{,}2,12{,}6,6{,}6,11{,}2},%13 +{3{,}2,12{,}6,7{,}8,10{,}4},%13 +{6{,}6,11{,}2,7{,}8,10{,}4},%13 +{7{,}8,10{,}4,6{,}6,11{,}2},%13 +{4{,}2,14{,}4,9,12},%15 +{2{,}6,16{,}8,7{,}2,15{,}4},%17 +{8,15,10{,}2,13{,}6},%17 +{2{,}6,16{,}8,8,15},%17 +{2{,}6,16{,}8,10{,}2,13{,}6},%17 +{5{,}6,19{,}2,12,16},%20 +{12,16,5{,}6,19{,}2},%20 +{7,24,8{,}8,23{,}4},%25 +{7,24,15,20},%25 +{8{,}8,23{,}4,15,20},%25 +{6{,}4,25{,}2,10,24},%26 +{6{,}4,25{,}2,13{,}2,22{,}4},%26 +{10,24,13{,}2,22{,}4},%26 +{10,24,15{,}6,20{,}8},%26 +{13{,}2,22{,}4,15{,}6,20{,}8},%26 +{9,40,16{,}8,37{,}4},%41 +{24{,}6,32{,}8,26{,}6,31{,}2},%41 +{9,40,26{,}6,31{,}2},%41 +{24{,}6,32{,}8,16{,}8,37{,}4}%41 +}% + +\definelist{\Quadruplets}{%pour un fonctionnement avec \fpeval +{2.8,9.6,6,8},%10 +{3.2,12.6,5,12},%13 +{6.6,11.2,5,12},%13 +{7.8,10.4,5,12},%13 +{3.2,12.6,6.6,11.2},%13 +{3.2,12.6,7.8,10.4},%13 +{6.6,11.2,7.8,10.4},%13 +{7.8,10.4,6.6,11.2},%13 +{4.2,14.4,9,12},%15 +{2.6,16.8,7.2,15.4},%17 +{8,15,10.2,13.6},%17 +{2.6,16.8,8,15},%17 +{2.6,16.8,10.2,13.6},%17 +{5.6,19.2,12,16},%20 +{12,16,5.6,19.2},%20 +{7,24,8.8,23.4},%25 +{7,24,15,20},%25 +{8.8,23.4,15,20},%25 +{6.4,25.2,10,24},%26 +{6.4,25.2,13.2,22.4},%26 +{10,24,13.2,22.4},%26 +{10,24,15.6,20.8},%26 +{13.2,22.4,15.6,20.8},%26 +{9,40,16.8,37.4},%41 +{24.6,32.8,26.6,31.2},%41 +{9,40,26.6,31.2},%41 +{24.6,32.8,16.8,37.4}%41 +}% + +\definelist{\tripletspytha}{{2{,}8,9{,}6,10},{6,8,10},%10 +{3{,}2,12{,}6,13},{5,12,13},%13 +{6{,}6,11{,}2,13},{7{,}8,10{,}4,13},%13 +{4{,}2,14{,}4,15},{9,12,15},%15 +{2{,}6,16{,}8,17},{7{,}2,15{,}4,17},%17 +{8,15,17},{10{,}2,13{,}6,17},%17 +{5{,}6,19{,}2,20},{12,16,20},%20 +{7,24,25},{8{,}8,23{,}4,25},%25 +{15,20,25},%25 +{8{,}8,23{,}4,25},%25 +{6{,}4,25{,}2,26},{10,24,26},%26 +{13{,}2,22{,}4,26},%26 +{15{,}6,20{,}8,26},%26 +{9,40,41},{16{,}8,37{,}4,41},%41 +{24{,}6,32{,}8,41},{26{,}6,31{,}2,41}%41 +}% + +\definelist{\tripletspythaentier}{% +{3,4,5},{5,12,13},{6,8,10},{7,24,25},{8,15,17},{9,12,15},{9,40,41},{10,24,26},{11,60,61},{12,16,20},{12,35,37},{13,84,85},{14,48,50},{15,20,25},{15,36,39},{16,30,34},{16,63,65},{18,24,30},{18,80,82},{20,21,29},{20,48,52},{21,28,35},{21,72,75},{24,32,40},{24,45,51},{24,70,74},{25,60,65},{27,36,45},{28,45,53},{28,96,100},{30,40,50},{30,72,78},{32,60,68},{33,44,55},{33,56,65},{35,84,91},{36,48,60},{36,77,85},{39,52,65},{39,80,89},{40,42,58},{40,75,85},{42,56,70},{45,60,75},{48,55,73},{48,64,80},{51,68,85},{54,72,90},{57,76,95},{60,63,87},{60,80,100},{65,72,97}}%%d'après villement.gerard.free.fr + + +\newcommand\initcarre{% + \definelist{\carres}{4,9,16,25,36,49,64,81,100}% +} +\newcommand\getcarre{% + \randomextract{\carres}{\carreA} +} + +%2009-2018 + % Source https://ec.europa.eu/eurostat/databrowser/view/ENV_AIR_GGE__custom_743354/default/table?lang=en +\definelist{\GazSerreEu}{% + {{la },Belgique,131038.46,123642.9},% + {{la },Bulgarie,58617.88,58595.07},% + {{le },Danemark,65734.85,51299.75},% + {{l'},Allemagne,934202.04,888718.56},% + {{l'},Irlande,63985.03,64241.55},% + {{la },Grèce,127381.2,96113.19},% + {{l'},Espagne,385211.04,352208.55},% + {{la },France,521519.73,462798.66},% + {{l'},Italie,510950.49,439263.95},% + {{les },{Pays Bas},212360.67,200458.52},% + {{la },Pologne,395464.33,415858.2},% + {{la },Norvège,54280.59,53769.04},% + {{la },Suisse,57276.22,52099.15}% +} + +\newcommand\getGazSerre{% + \randomextract{\GazSerreEu}{\GazSerrePays}% + \extract{\GazSerrePays}{1}{\ArticlePaysGS}% + \extract{\GazSerrePays}{1}{\NomPaysGS}% + \extract{\GazSerrePays}{1}{\ConsoAPaysGS}% + \extract{\GazSerrePays}{1}{\ConsoBPaysGS}% +} + + \definelist{\VehiculesINSEE}{% + {2012,13132,22264,8111,15242},% + {2013,12853,22712,8028,15020},% + {2014,12778,23134,8049,14905},% + {2015,12874,23460,8144,14813},% + {2016,13144,23634,8308,14813},% + {2017,13580,23645,8437,14629},% + {2018,14140,23293,8652,14453},% + {2019,14756,22636,8920,14392}% + }% + \newcommand\getVehiculesINSEE{% + \randomextract{\VehiculesINSEE}{\NbVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\AnneeVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\EssenceVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\DieselVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\KmEssenceVehiculesINSEE}% + \extract{\NbVehiculesINSEE}{1}{\KmDieselVehiculesINSEE}% + }
\ No newline at end of file |