texlive[73663] Master/texmf-dist: profmaquette (31jan25)
commits+karl at tug.org
commits+karl at tug.org
Fri Jan 31 23:11:18 CET 2025
Revision: 73663
https://tug.org/svn/texlive?view=revision&revision=73663
Author: karl
Date: 2025-01-31 23:11:18 +0100 (Fri, 31 Jan 2025)
Log Message:
-----------
profmaquette (31jan25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/profmaquette/profmaquette-doc.pdf
trunk/Master/texmf-dist/doc/latex/profmaquette/profmaquette-doc.zip
trunk/Master/texmf-dist/tex/latex/profmaquette/ProfMaquette.sty
Modified: trunk/Master/texmf-dist/doc/latex/profmaquette/profmaquette-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/profmaquette/profmaquette-doc.zip
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/tex/latex/profmaquette/ProfMaquette.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profmaquette/ProfMaquette.sty 2025-01-31 22:11:07 UTC (rev 73662)
+++ trunk/Master/texmf-dist/tex/latex/profmaquette/ProfMaquette.sty 2025-01-31 22:11:18 UTC (rev 73663)
@@ -2,13 +2,16 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2024/11/03}%
+\def\filedate{2025/01/30}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.99-k}%
+\def\fileversion{0.99-n}%
\let\PfMfileversion\fileversion%
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
+\def\PfMbla{}%JCC :) Pour les tests sur arguments vides
+
+\newif\if at Daltonisme \@Daltonismefalse
\newif\if at Dyslexie \@Dyslexiefalse
\newif\if at CAN \@CANfalse
\newif\if at Revision \@Revisionfalse
@@ -15,6 +18,7 @@
\newif\if at AssembleCorrections \@AssembleCorrectionsfalse
\newif\if at Personnel \@Personnelfalse
+\DeclareOption{Daltonisme}{\@Daltonismetrue}
\DeclareOption{Dyslexie}{\@Dyslexietrue}
\DeclareOption{CAN}{\@CANtrue}
\DeclareOption{Revision}{\@Revisiontrue}
@@ -26,7 +30,32 @@
\AddToHook{env/document/end}[AC]{\PfMAffichageTousCorriges}%
\fi
+\definecolor{PfMdblue}{HTML}{4477AA}
+\definecolor{PfMdcyan}{HTML}{66CCEE}
+\definecolor{PfMdgreen}{HTML}{228833}
+\definecolor{PfMdyellow}{HTML}{CCBB44}
+\definecolor{PfMdred}{HTML}{EE6677}
+\definecolor{PfMdpurple}{HTML}{AA3377}
+\definecolor{PfMdgray}{HTML}{BBBBBB}
+\colorlet{PfMbluesaved}{blue}
+\colorlet{PfMcyansaved}{cyan}
+\colorlet{PfMgreensaved}{green}
+\colorlet{PfMyellowsaved}{yellow}
+\colorlet{PfMredsaved}{red}
+\colorlet{PfMpurplesaved}{purple}
+\colorlet{PfMgraysaved}{gray}
+
% packages nécessaires
+\if at Daltonisme
+ % D'après https://personal.sron.nl/~pault/data/colourschemes.pdf
+ \colorlet{blue}{PfMdblue}
+ \colorlet{cyan}{PfMdcyan}
+ \colorlet{green}{PfMdgreen}
+ \colorlet{yellow}{PfMdyellow}
+ \colorlet{red}{PfMdred}
+ \colorlet{purple}{PfMdpurple}
+ \colorlet{gray}{PfMdgray}
+\fi
\RequirePackage{verbatim}%
\RequirePackage{xintexpr}
\RequirePackage{calc}%
@@ -50,24 +79,18 @@
\RequirePackage{fontawesome5}
\makeatletter
\gdef\PfMFontSize{\@ptsize}
-%\gdef\PfMFontSize{\f at size}
\makeatother
%définition des clés
\RequirePackage{simplekv}%
-\setKVdefault[Boulot]{BigTen=false,JeuPuzzle=false,QCM=false,PixelArt=false,AMC=false,IntroductionAMC=false,Graine=1,Dys=false,Taille=14,Cours=false,Base=false,BaseHTML=false,CAN=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,Contrat=false,FdR=false,ParcoursPerso=false,OlympiadesAPMEP=false,LivreHeros=false,CorrigeInverse=false,CorrigeSeul=false,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,EntrainementColonnes=false,Epaisseur=0pt,EEpaisseur=0pt,ESansSaut=false,VersSolution=false,AvecEntrainement=false,Small=false,Footnotesize=false,Scriptsize=false,AllDirect=false,AllPouce=false,Input=false}%
+\setKVdefault[Boulot]{AMC=false,PixelArt=false,QCM=false,JeuPuzzle=false,BigTen=false,Cartes=false,Graine=1,Dys=false,Taille=14,Daltonisme=false,Cours=false,Base=false,BaseHTML=false,CAN=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,Contrat=false,FdR=false,ParcoursPerso=false,OlympiadesAPMEP=false,LivreHeros=false,CorrigeInverse=false,CorrigeSeul=false,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,BaremeACompleter=false,CorrectionColonnes=false,EntrainementColonnes=false,Epaisseur=0pt,EEpaisseur=0pt,ESansSaut=false,VersSolution=false,AvecEntrainement=false,Small=false,Footnotesize=false,Scriptsize=false,AllDirect=false,AllPouce=false,Input=false,SolColore=false,Alone=false,Licence=false}%
+\defKV[Boulot]{CouleurSol=\setKV[Boulot]{SolColore}\colorlet{PfMColSol}{#1}}%
\defKV[Boulot]{Colonnes=\setKV[Boulot]{CorrectionColonnes}}%
\defKV[Boulot]{EColonnes=\setKV[Boulot]{EntrainementColonnes}}%
-\setKVdefault[QCM]{Colonnes,NomExercice=Question,Introduction=false,Theme={},Niveau={},Classe={},Date={}}%
-\setKVdefault[BigTen]{CoupureTableau=false,LargeurTab=40pt}%
-\defKV[BigTen]{CoupeTableau=\setKV[BigTen]{CoupureTableau}}%
-\setKVdefault[PixelArt]{Aleatoire=false,Landscape=false,CoupureTableau=false,Fichier={},Lettres={},Largeur={},Hauteur={},ListeCouleurs={},Solution=false,Theme=Essai,Arcenciel=false,LargeurTab=40pt,Diversion=false}%
-\defKV[PixelArt]{CoupeTableau=\setKV[PixelArt]{CoupureTableau}}%
-\defKV[PixelArt]{Intrus=\setKV[PixelArt]{Diversion}\setsepchar{,}\ignoreemptyitems\readlist*\PfMListePourLesIntrus{#1}\reademptyitems}
-\setKVdefault[AMC]{Date=\today,Classe={},Niveau={},Code=\jobname,NomExercice=Exercice,Theme=Numération,Calculatrice=false}%
\setKVdefault[Cours]{Couleur=Crimson,Theme=Trace \'ecrite,NomExercice=Exercice}%
\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[Beamer]{Theme=Les nombres d\'ecimaux,SousTheme={},Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice,}%
+\setKVdefault[DS]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname,Calculatrice=false,Sujets=false}%
+\defKV[DS]{Sujet=\setKV[DS]{Sujets}}%
+\setKVdefault[Beamer]{Separe=false,Theme=Les nombres d\'ecimaux,SousTheme={},Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
\setKVdefault[Fiche]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
\setKVdefault[PdT]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
\setKVdefault[FdR]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
@@ -78,12 +101,12 @@
\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\'ecimaux,Date=\today,Code={},NomExercice=Exercice}%
-\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lyc\'ee
- du Hainaut (Valenciennes),NomEleve=Albert Einstein,CR=false}%
-\setKVdefault[CAN]{Date=\today,Niveau=6,Duree=9,CoefQ=0.4,CoefR=0.35,CoefJ=0.1,Logos=false}%
+\setKVdefault[CAN]{Date=\today,Niveau=6,Duree=9,CoefQ=0.4,CoefR=0.35,CoefJ=0.1,Logos=false,Graines=false}%
\defKV[CAN]{Logo=\setKV[CAN]{Logos}}%
-\setKVdefault[ClesExercices]{Open,NbQuestions=1,PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,PasCorrige=false,Direct=false,Pouce=false,Parcours=false,Contrat=false,FdR=false,Routes=false,Stops=false,Background=white,Cadre=gray!50,Numerote,Ligne=false,Doublespacing=false,Onehalfspacing=false,Cadres=false,Grilles=false,Cinq=false,Huit=false,TitreSol=false,NonUtilise=false,Profile=false,AEntretenir=false,Fragile=false,AvecIndications=false,ACompleter=false,Aide=0,Score=0,EchelleSeyes=8,Ajout={},TitreCorrige=Corrigé de l'exercice,Interieur=false,NombreEleves=0,Categorie=0}%
-%\defKV[ClesExercices]{AMCReponses=\ifboolKV[Boulot]{AMC}{\setKV[ClesExercices]{Open=false}}{}}%
+\defKV[CAN]{Graine=\setKV[CAN]{Graines}}%
+\setKVdefault[ClesExercices]{Open,NbQuestions=1,PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,PasCorrige=false,Direct=false,Pouce=false,Parcours=false,Contrat=false,FdR=false,Routes=false,Stops=false,Background=white,Cadre=gray!50,Numerote,Ligne=false,Doublespacing=false,Onehalfspacing=false,Cadres=false,Grilles=false,Cinq=false,Huit=false,Certificat=false,TitreSol=false,NonUtilise=false,Profile=false,AEntretenir=false,Fragile=false,AvecIndications=false,ACompleter=false,Aide=0,Score=0,EchelleSeyes=8,Ajout={},TitreCorrige=Corrigé de l'exercice,Interieur=false,NombreEleves=0,Categorie=0,Tag=false,TagIci=false}%
+\defKV[ClesExercices]{Tags=\setKV[ClesExercices]{Tag}}%
+\defKV[ClesExercices]{StyleTag=\setKV[ClesExercices]{TagIci}\def\PfMTagStyle{#1}}%
\defKV[ClesExercices]{TitreSolution=\setKV[ClesExercices]{TitreSol}}%
\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}%
\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}%
@@ -97,9 +120,9 @@
\defKV[ClesExercices]{CinqCinq=\setKV[ClesExercices]{Grilles}\setKV[ClesExercices]{Cinq}}%
\defKV[ClesExercices]{Seyes=\setKV[ClesExercices]{Grilles}\setKV[ClesExercices]{Huit}}%
\def\PfMTexteEncart{Indique ton travail ci-dessous.}%
-\setKVdefault[SchemaParcours]{Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=gray!70}%,Csv=false}%
+\setKVdefault[SchemaParcours]{Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Couleur=gray!70}%
\setKVdefault[SchemaContrat]{Ecart=7mm,Rayon=2.5mm}%
-\setKVdefault[SchemaFdR]{Ecart=7mm,Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Hauteur=1cm,Couleur=gray!70}%,Csv=false}%
+\setKVdefault[SchemaFdR]{Ecart=7mm,Colonnes=100,Rayon=2.5mm,Largeur=7.5mm,Hauteur=1cm,Couleur=gray!70}%
% Commande pour retenir le nombre d'exercices par maquette.Utile seulement pour la clé AssembleCorrection
\xdef\PfMRetiensLienExoMa{}%
\xdef\PfMRetiensLienDefMa{}%
@@ -173,6 +196,8 @@
\newlength\CRRHauteur%
\newlength\PfMEcartSupInterMots%
\newlength\PfMCoefcompetences%
+\newlength\PfMLargeurCards%
+\newlength\PfMHauteurCards%
\def\PfMCoefCompetences{0.85}%
\setlength{\CRRHauteur}{10cm}%
\setlength{\PfMHauteurAppreciation}{5cm}%
@@ -397,9 +422,6 @@
% On rectifie sur la dernière valeur :)
\xdef\PfCSLEffectifs{\PfCSLEffectifs \fpeval{#1+\PfCRetiensRETSomme}}%
\xdef\PfCRetiensRETSommeTotale{\PfCRetiensRETSommeTotale+\fpeval{#1+\PfCRetiensRETSomme}}%
-% On voulait un effectif fixe à #1 en #2 valeurs avec un écart de #3 par rapport à la moyenne.\\
- %Les choix : \PfCSLEffectifs.\\
- % Somme totale : \fpeval{\PfCRetiensRETSommeTotale}\\
}
\NewDocumentCommand\RepartirEffectifTotalB{mmm}{%
@@ -425,8 +447,6 @@
}%
% % On rectifie sur la dernière valeur :)
\xdef\PfCCPEffectifs{\PfCCPEffectifs \fpeval{#1-\fpeval{\PfCRetiensRETSommeTotale}}}%
- %Les choix : \PfCCPEffectifs.\\
- %% Somme totale : \fpeval{\PfCRetiensRETSommeTotale}\\
}
% Pour la gestion de l'aléatoire
@@ -450,7 +470,7 @@
% avant chgt
% \expandafter\xdef\csname #2\Roman{PfMExo}\alph{PfMSommetcount}\endcsname{\PfMSommet[##1]}%
% après chgt
- \expandafter\xdef\csname #2\Roman{PfMExo}\roman{PfMAlea}\alph{PfMSommetcount}\endcsname{\PfMSommet[##1]}%
+ \expandafter\xdef\csname #2\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\alph{PfMSommetcount}\endcsname{\PfMSommet[##1]}%
}%
}%
%%%
@@ -461,7 +481,7 @@
\stepcounter{PfMAlea}%
\xintFor* ##1 in{\xintSeq{1}{#1}}\do{%
\setcounter{PfMSommetcount}{##1}%
- \expandafter\xdef\csname p\Alph{PfMSommetcount}\endcsname{\csname #2\Roman{PfMExoSol}\roman{PfMAlea}\alph{PfMSommetcount}\endcsname}%
+ \expandafter\xdef\csname p\Alph{PfMSommetcount}\endcsname{\csname #2\Roman{PfMMaquette}\roman{PfMExoSol}\Roman{PfMAlea}\alph{PfMSommetcount}\endcsname}%
}%
}%
@@ -469,8 +489,8 @@
\RenewDocumentCommand\VariableAlea{s m m}{%
\IfBooleanTF{#1}{%
\stepcounter{PfMAlea}%
- \expandafter\xdef\csname valeur\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{#3}}%
- \expandafter\xdef\csname #2\endcsname{\csname valeur\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{\fpeval{#3}}%
+ \expandafter\xdef\csname #2\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}{%
\xdef#2{\fpeval{#3}}%
}%
@@ -479,8 +499,8 @@
\NewDocumentCommand\VariableAlea{s m m}{%
\IfBooleanTF{#1}{%
\stepcounter{PfMAlea}%
- \expandafter\xdef\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{#3}}%
- \expandafter\xdef\csname #2\endcsname{\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{\fpeval{#3}}%
+ \expandafter\xdef\csname #2\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}{%
\xdef#2{\fpeval{#3}}%
}%
@@ -492,11 +512,11 @@
\IfBooleanTF{#1}{%
\stepcounter{PfMAlea}%
\IfNoValueTF{#2}{%
- \expandafter\xdef\csname valeur\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{randint(#3,#4)}}%
- \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{\fpeval{randint(#3,#4)}}%
+ \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}{%
- \expandafter\xdef\csname valeur\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{round(randint(#3,#4)+rand(),#2)}}%
- \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{\fpeval{round(randint(#3,#4)+rand(),#2)}}%
+ \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}%
}{%
\IfNoValueTF{#2}{%
@@ -511,11 +531,11 @@
\IfBooleanTF{#1}{%
\stepcounter{PfMAlea}%
\IfNoValueTF{#2}{%
- \expandafter\xdef\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{randint(#3,#4)}}%
- \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{\fpeval{randint(#3,#4)}}%
+ \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}{%
- \expandafter\xdef\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname{\fpeval{round(randint(#3,#4)+rand(),#2)}}%
- \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{\fpeval{round(randint(#3,#4)+rand(),#2)}}%
+ \expandafter\xdef\csname #5\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}%
}{%
\IfNoValueTF{#2}{%
@@ -533,7 +553,7 @@
% #3 valeur maximale
% #4 valeur(s) exclue(s)
% #5 Nom de la liste qui récupère les données.
- \ifx\bla#4\bla%
+ \ifx\PfMbla#4\PfMbla%
\PackageWarning{ProfMaquette}{Il faut définir au moins une valeur à exclure.}%
\else%
\xdef\PfMMixFoo{#2}%
@@ -555,7 +575,7 @@
\readlist*\ListeValeursRetenues{\PfMMixFoo}%
}%
\ifnum\ListeValeursRetenueslen=1\relax%
- \xdef#5{\PfMMixFoo}%
+ \xdef#5{\ListeValeursRetenues[1]}%
\else%
\ifnum#1=1\relax
\MelangeListe*{\PfMMixFoo}{#1}%
@@ -572,7 +592,7 @@
% #2 Liste à parcourir
% #3 valeur(s) exclue(s)
% #4 Nom de la liste qui récupère les données.
- \ifx\bla#3\bla%
+ \ifx\PfMbla#3\PfMbla%
\PackageWarning{ProfMaquette}{Il faut définir au moins une valeur à exclure.}%
\else%
\setsepchar{,}\ignoreemptyitems%
@@ -703,7 +723,7 @@
\fi%
}%
\xdef#5{\ListeNombresAlea}%
-}
+}%
\NewDocumentCommand\ChoixAleaMulti{mmmm}{%
% #1 nombre de valeurs à choisir qui peut être supérieur au nombre de valeurs entières disponibles
@@ -865,7 +885,7 @@
\NewDocumentCommand\RestoreChoixAlea{m}{%
\stepcounter{PfMAlea}%
%Je restaure la valeur \thePfMExoSol-\thePfMAlea
- \expandafter\xdef\csname #1\endcsname{\csname valeur\Roman{PfMMaquette}\Roman{PfMExoSol}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname #1\endcsname{\csname valeur\Roman{PfMMaquette}\roman{PfMExoSol}\Roman{PfMAlea}\endcsname}%
}%
\NewDocumentCommand\ExporteListe{mm}{%
@@ -872,14 +892,14 @@
%#1 le nom de la liste
%#2 le contenu de la liste.
\stepcounter{PfMAlea}%
- \expandafter\xdef\csname Liste\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname{#2}%
- \expandafter\xdef\csname #1\endcsname{\csname Liste\Roman{PfMMaquette}\Roman{PfMExo}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname Liste\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname{#2}%
+ \expandafter\xdef\csname #1\endcsname{\csname Liste\Roman{PfMMaquette}\roman{PfMExo}\Roman{PfMAlea}\endcsname}%
}%
\NewDocumentCommand\RestoreListe{m}{%
%#1 le nom de la liste à restaurer
\stepcounter{PfMAlea}%
- \expandafter\xdef\csname #1\endcsname{\csname Liste\Roman{PfMMaquette}\Roman{PfMExoSol}\roman{PfMAlea}\endcsname}%
+ \expandafter\xdef\csname #1\endcsname{\csname Liste\Roman{PfMMaquette}\roman{PfMExoSol}\Roman{PfMAlea}\endcsname}%
}%
%%
@@ -979,7 +999,8 @@
% Définitions pour les compétences
\NewDocumentCommand\Competences{O{3}m}{%
\setsepchar[*]{/}\ignoreemptyitems%
- \readlist*\ListeCompetence{#2}
+ \readlist*\ListeCompetence{#2}%
+ \reademptyitems
\ifnum#1=3\relax
\buildtabcompetences%
\else
@@ -1031,12 +1052,13 @@
\def\SolutionWritePP{%
\@bsphack
\immediate\openout \verbatim at out "\jobname-Ma\thePfMMaquette-PPEx\thePfMExo.sol" %
+ \immediate\write\verbatim at out{\string\begin{Solution}}
\let\do\@makeother\dospecials
\catcode`\^^M\active
\def\verbatim at processline{%
\immediate\write\verbatim at out{\the\verbatim at line}}%
\verbatim at start}
-\def\endSolutionWritePP{\immediate\closeout\verbatim at out\@esphack}
+\def\endSolutionWritePP{\immediate\write\verbatim at out{\string\end{Solution}}\immediate\closeout\verbatim at out\@esphack}
\def\ReponseWrite{%
\@bsphack
@@ -1059,8 +1081,19 @@
\def\endIndiceWrite{\immediate\closeout\verbatim at out\@esphack}
\makeatother
-\def\SolutionNow{\textbf{\csname PfMTNomSol\Roman{PfMExo}\endcsname~--}\par\nopagebreak\setcounter{PfMExoSol}{\thePfMExo}\setcounter{PfMAlea}{0}\PfMAffichageHideItemSolution}%\setcounter{PfMExoSolAlea}{\thePfMExo}
-\def\endSolutionNow{\par\goodbreak\PfMshowitems}
+\def\SolutionNow{%
+ \ifboolKV[Boulot]{SolColore}{%
+ \colorlet{PfMsaved}{.}%
+ \color{PfMColSol}%
+ }{}
+ \textbf{\csname PfMTNomSol\Roman{PfMExo}\endcsname~--}\par\nopagebreak\setcounter{PfMExoSol}{\thePfMExo}\setcounter{PfMAlea}{0}\PfMAffichageHideItemSolution%
+}%
+\def\endSolutionNow{%
+ \par\goodbreak\PfMshowitems%
+ \ifboolKV[Boulot]{SolColore}{%
+ \color{PfMsaved}%
+ }{}%
+}%
\def\ReponseNow{\textbf{Réponse(s) de l'exercice --}\par\nopagebreak\PfMAffichageHideItemSolution}
\def\endReponseNow{\par\goodbreak\PfMshowitems}
@@ -1217,7 +1250,9 @@
}%
\def\PfMTexteDuCorrige{Corrigé de l'exercice}%
+\def\PfMTexteDuCorrigeCAN{Question}%
\def\PfMTexteDeLEntrainement{Automatisme(s) lié(s) à l'exercice}%
+\def\PfMEncartDeLEntrainement{}%
\def\PfMTexteDesIndications{Indications}%
\NewDocumentCommand\PfMAffichageCorrige{}{%
@@ -1225,7 +1260,7 @@
\xintFor* ##1 in{\xintSeq{1}{\PfMCANTotalExo}}\do{%
\setcounter{PfMExoSol}{##1}%
\setcounter{PfMAlea}{0}%
- \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{TestCAN-\thePfMMaquette-##1}}:\fi}~\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}\par\goodbreak}{}%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.sol}{\textbf{\PfMTexteDuCorrigeCAN\ifnum\PfMCANTotalExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{TestCAN-\thePfMMaquette-##1}}:\fi}~\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}\par\goodbreak}{}%
}%
}{%
\setcounter{PfMExoSol}{0}%
@@ -1307,6 +1342,7 @@
\TikzAutomatismes
\setlength{\columnseprule}{\useKV[Boulot]{EEpaisseur}}%
\ifboolKV[Boulot]{EntrainementColonnes}{\begin{multicols}{\useKV[Boulot]{EColonnes}}}{}%
+ \PfMEncartDeLEntrainement
\setcounter{PfMExoEntrai}{0}%
\xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
\refstepcounter{PfMExoEntrai}%
@@ -1332,17 +1368,56 @@
\newlength{\brouillon}
\newcommand*\FranPt[1]{%
-% \ifboolKV[ClesExercices]{BaremeDetaille}{%
- \color{gray!75}(\num{#1})%
-% }{}
-}
+ \color{gray!75}\ifboolKV[Boulot]{BaremeACompleter}{%
+ \PfMpointilles[10pt]{}/\num{#1}%
+ }{%
+ (\num{#1})%
+ }%
+}%
\makeatletter
\newcommand\BaremeEspace at Marge{18pt}
+\newcommand\BaremeEspace at Margeg{32pt}
+\newcommand\BaremeEspace at Marged{18pt}
\newcommand\BaremeEspace at MargeCorrection{0pt}
%\f at size est la taille par défaut de la fonte.
-\newcommand*\brm[1]{%
+\NewDocumentCommand\brm{sm}{%
+ \ifboolKV[Boulot]{Cartes}{}{%
+ \ifboolKV[Boulot]{Fiche}{}{%
+ \ifboolKV[Boulot]{FdR}{}{%
+ \ifboolKV[Boulot]{Contrat}{}{%
+ \ifboolKV[Boulot]{Parcours}{}{%
+ \immediate\write\@auxout{%
+ \string\opadd*{#2}%
+ {total\the\c at PfMSection-\the\c at PfMExo}%
+ {total\the\c at PfMSection-\the\c at PfMExo}%
+ \string\opcopy{\thePfMExo}{TotalExo}%
+ }%
+ \ifboolKV[ClesExercices]{BaremeDetaille}{%
+ \IfBooleanTF{#1}{%
+ \setlength{\brouillon}{\BaremeEspace at Marged+\linewidth}%
+ \makebox[\brouillon][l]{\hspace*{\brouillon}\footnotesize\FranPt{#2}}%
+ \hspace*{-\brouillon}%
+ }{%
+ \ifnum\col at number>1\relax
+ \setlength{\brouillon}{\BaremeEspace at Margeg}%
+ \makebox[0pt][r]{\footnotesize\FranPt{#2}\hspace*{\brouillon}}%
+ \else%
+ \setlength{\brouillon}{\BaremeEspace at Marge-\linewidth+\textwidth}%
+ \makebox[0pt][r]{\footnotesize\FranPt{#2}\hspace*{\brouillon}}%
+ \fi%
+ }%
+ \ignorespaces%
+ }{}%
+ }%
+ }%
+ }%
+ }%
+ }%
+}%
+
+\newcommand*\brmold[1]{%
\ifboolKV[Boulot]{Fiche}{}{%
\ifboolKV[Boulot]{FdR}{}{%
\ifboolKV[Boulot]{Contrat}{}{%
@@ -1354,8 +1429,11 @@
\string\opcopy{\thePfMExo}{TotalExo}%
}%
\ifboolKV[ClesExercices]{BaremeDetaille}{%
- \setlength{\brouillon}{\BaremeEspace at Marge-\linewidth+\textwidth}%
- \makebox[0pt][r]{\footnotesize\FranPt{#1}\hspace*{\brouillon}}%
+ %\setlength{\brouillon}{\BaremeEspace at Marge-\linewidth+\textwidth}%
+ %\makebox[0pt][r]{\footnotesize\FranPt{#1}\hspace*{\brouillon}}%
+ \setlength{\brouillon}{6pt+\textwidth}%
+ \makebox[\brouillon][l]{\hspace*{\brouillon}\footnotesize\FranPt{#1}}%
+ \hspace*{-\brouillon}%
\ignorespaces%
}{}%
}%
@@ -1401,6 +1479,7 @@
{%
\opunzero{total#1}% on ne sait jamais
\opset{decimalsepsymbol={,}}%
+ \ifboolKV[Boulot]{BaremeACompleter}{\PfMpointilles[20pt] / }{}%
\opprint{total#1}~%
\opset{decimalsepsymbol={.}}%
\useKV[ClesExercices]{MotPoint}%
@@ -1470,6 +1549,8 @@
}
%
\NewDocumentCommand{\PfMAffichageCompetencesTravaillees}{}{%
+ \xdef\PfMContenuCompetences{\useKV[ClesExercices]{Competence}}%
+ \ifx\PfMbla\PfMContenuCompetences\PfMbla\else
\ifboolKV[ClesExercices]{AffichageCompetence}{%
\node[%
fill=white,%
@@ -1480,6 +1561,7 @@
at (frame.north east)
{\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
}{}%
+ \fi
}%
%
\NewDocumentCommand{\PfMLienVersSolution}{}{%
@@ -1507,6 +1589,8 @@
\makeatletter
\NewDocumentCommand{\PfMAffichageSource}{}{%
\ifboolKV[ClesExercices]{AffichageSource}{%
+ \xdef\PfMContenuSource{\useKV[ClesExercices]{Source}}%
+ \ifx\PfMbla\PfMContenuSource\PfMbla\else
\node[%
fill=tcbcolback,
anchor=east,
@@ -1516,6 +1600,7 @@
]
at (frame.south east)
{\scriptsize\sffamily \useKV[ClesExercices]{Source}};
+ \fi
}{}%
}%
\NewDocumentCommand{\PfMAffichageSourceQCM}{}{%
@@ -1559,9 +1644,26 @@
coltitle=black,
frame hidden,
overlay=\useKV[ClesExercices]{Ajout}%
- }
-}
+ }%
+}%
+\newbox\PfMTotoBox%
+
+\NewDocumentEnvironment{exerciceSauvegarde}{so}{%
+ \setcounter{PfMAlea}{0}%
+ \setcounter{PfMNbLogo}{1}%
+ % Mettre les indications hors-jeu
+ \setcounter{RetiensIndic}{0}%
+ \useKVdefault[ClesExercices]%
+ \setKV[ClesExercices]{#2}%
+ \PfMAvantLesExercices%
+ \begin{lrbox}{\PfMTotoBox}%
+ \begin{minipage}{\linewidth}%
+ }{%
+ \end{minipage}%
+ \end{lrbox}%
+}%%
+
\makeatletter
%%% Base des exercices DM
\tcbset{%
@@ -1862,12 +1964,13 @@
colback=white,
colframe=PfMCadreContrat,
overlay unbroken and first={%
- \node[%
- name=A,
- fill=white,
- anchor=west,
- xshift=10pt,
- ] at (frame.north west){\bfseries\sffamily \useKV[Contrat]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
+% \node[%
+% name=A,
+% fill=white,
+% anchor=west,
+% xshift=10pt,
+% ] at (frame.north west){\bfseries\sffamily \useKV[Contrat]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
+ \PfMAffichageTitreExercice{white}%
%%
\useKV[ClesExercices]{Ajout}%
%%
@@ -1880,6 +1983,8 @@
\PfMLienVersSolution%
%
\PfMLienVersEntrainement%
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -1929,7 +2034,7 @@
}%
%%%%%%%%%%
%PfMFooExoIncrustes : \PfMFooExoIncrustes\\%
- \ifx\bla\PfMFooExoIncrustes\bla%
+ \ifx\PfMbla\PfMFooExoIncrustes\PfMbla%
\xdef\LongueurC{0}%
\else%
\setsepchar{,}\ignoreemptyitems%
@@ -2199,8 +2304,10 @@
\setsepchar[*]{,*/}%
\readlist*\ListeNoms{Aude/Elle/d'Aude/qu'Aude/elle,Bernard/Il/de Bernard/que Bernard/il,Céline/Elle/de Céline/que Céline/elle,Daniel/Il/de Daniel/que Daniel/il,\'Elise/Elle/d'\'Elise/qu'\'Elise/elle,Fabien/Il/de Fabien/que Fabien/il,Gérard/Il/de Gérard/que Gérard/il,Hélène/Elle/d'Hélène/qu'Hélène/elle,Ilies/Il/d'Ilies/qu'Ilies/il,Jasmine/Elle/de Jasmine/que Jasmine/elle,Kylian/Il/de Kylian/que Kylian/il,Laurent/Il/de Laurent/que Laurent/il,Mathilde/Elle/de Mathilde/que Mathilde/elle,Nina/Elle/de Nina/que Nina/elle,Octave/Il/d'Octave/qu'Octave/il,Philippe/Il/de Philippe/que Philippe/il,Joachim/Il/de Joachim/que Joachim/il,Thérèse/Elle/de Thérèse/que Thérèse/elle,Nawel/Elle/de Nawel/que Nawel/elle,Alexandre/Il/d'Alexandre/qu'Alexandre/il,Maxence/Il/de Maxence/que Maxence/il,Sophie/Elle/de Sophie/que Sophie/elle,Christophe/Il/de Christophe/que Christophe/il,Myriam/Elle/de Myriam/que Myriam/elle,Nathalie/Elle/de Nathalie/que Nathalie/elle,Sébastien/Il/de Sébastion/que Sébastien/il}%
\readlist*\ListeChersObjets{montre/une,collier/un,bague/une,pendentif/un}%
-\readlist*\ListeSport{Football/du football/le football,Tennis/du tennis/le tennis,Basket/du basket/le basket,Athlétisme/de l'athlétisme/l'athlétisme,Natation/de la natation/la natation,Hand-ball/du hand-ball/le hand-ball,Volley-ball/du volley-ball/le volley-ball}
+\readlist*\ListeSport{Football/du football/le football,Tennis/du tennis/le tennis,Basketball/du basketball/le basketball,Athlétisme/de l'athlétisme/l'athlétisme,Natation/de la natation/la natation,Hand-ball/du hand-ball/le hand-ball,Volley-ball/du volley-ball/le volley-ball}%
+\readlist*\ListeCouleursB{bleu/bleue,rouge/rouge,vert/verte,violet/violette,blanc/blanche,noir/noire,orange/orange,jaune/jaune,rose/rose}%
\setsepchar{,}%
+\readlist*\ListeCouleurs{bleu,rouge,vert,violet,blanc,noir,orange,jaune,rose}%
\readlist*\ListePetitsObjets{bonbons,billes,biscuits,gommes,clous,vis,cahiers,trousses}%
\readlist*\ListeFruits{pommes,poires,abricots,cerises,fraises,framboises,noix,pêches,nectarines,myrtilles,oranges,mandarines,kiwis}%
\readlist*\ListeVariables{a,b,c,\ell,m,n,p,r,s,t,x,y,z}%
@@ -2220,22 +2327,20 @@
\def\verbatim at processline{\immediate\write\verbatim at out{\the\verbatim at line}}%
\verbatim at start}%
\def\endExoCANWrite{\immediate\closeout\verbatim at out\@esphack}%
+%
+\def\ExoCANCptWrite{%
+ \@bsphack%
+ \immediate\openout \verbatim at out "\jobname-Ma\thePfMMaquette-Ex\thePfMExo.cancpt"%
+ \let\do\@makeother\dospecials%
+ \catcode`\^^M\active%
+ \def\verbatim at processline{\immediate\write\verbatim at out{\the\verbatim at line}}%
+ \verbatim at start}%
+\def\endExoCANCptWrite{\immediate\closeout\verbatim at out\@esphack}%
+%
\makeatother
-\NewDocumentCommand\Complement{+m}{%
- \ifboolKV[Boulot]{CAN}{%
- \expandafter\xdef\csname CNReponse\endcsname{\noexpand #1}%
- }{%
- \begin{center}
- #1%
- \end{center}
- }%
-}%
-
-\NewDocumentCommand\EcartComplement{m}{%
- \rule{0mm}{#1}%
-}%
-
+\NewDocumentEnvironment{Complement}{}{}{}%
+
\tcbset{%
usercan/.style={%
enhanced,
@@ -2242,7 +2347,7 @@
frame hidden,
colback=white,
middle=24pt,
- overlay={% unbroken and first={%
+ overlay={%
\draw[line width=2pt] (frame.north west)--(frame.north east);
\draw[line width=2pt] (frame.south west)--(frame.south east);
}
@@ -2347,13 +2452,8 @@
colback=PfMColbackFdR,
colframe=PfMCadreFdR,
overlay unbroken and first={%
- \node[%
- name=A,
- fill=white,
- anchor=west,
- xshift=10pt,
- ] at (frame.north west){\bfseries\sffamily \useKV[FdR]{NomExercice} \thePfMExo\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{}};
- %%
+ \PfMAffichageTitreExercice{PfMColbackFdR}%
+% %%
\useKV[ClesExercices]{Ajout}%
%%
\PfMAffichageLogos
@@ -2365,6 +2465,8 @@
\PfMLienVersSolution%
%
\PfMLienVersEntrainement%
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -2598,7 +2700,7 @@
\fi
}{%
\ifboolKV[ClesExercices]{Onehalfspacing}{%
- \setstretch{1.25}% default
+ \setstretch {1.25}% default
\ifx\@ptsize\@undefined\else
\ifcase \@ptsize \relax % 10pt
\setstretch {1.25}%
@@ -2797,7 +2899,7 @@
\NewDocumentCommand\PfMAffichageTitreSolution{}{%
%Affichage du titre de la solution :) Le compteur PfMExoSol vaut \thePfMExoSol
\expandafter\xdef\csname PfMEcrireTitreSol\endcsname{\csname PfMTSol\Roman{PfMExoSol}\endcsname}%
- \ifx\bla\PfMEcrireTitreSol\bla%
+ \ifx\PfMbla\PfMEcrireTitreSol\PfMbla%
\else
~:~\PfMEcrireTitreSol%
\fi%
@@ -2827,7 +2929,7 @@
\NewDocumentCommand\PfMAffichageHideItemSolution{}{%
\expandafter\xdef\csname PfMEcrireHideItemSol\endcsname{\csname PfMHideSol\Roman{PfMExoSol}\endcsname}%
- \ifx\bla\PfMEcrireHideItemSol\bla%
+ \ifx\PfMbla\PfMEcrireHideItemSol\PfMbla%
% \textcolor{blue}{Normalement, pas de hide car clé profile pas active.}
\else
% \textcolor{red}{Hide Item dans les solutions}
@@ -2842,6 +2944,7 @@
\PfMChoixCorrection%
\PfMChoixEntrainement%
\refstepcounter{PfMExo}%
+ \ifboolKV[ClesExercices]{Tag}{\PfMStockerTag{\useKV[ClesExercices]{Tags}}}{}%
\PfMChoixNomCorrection%
\ifboolKV[ClesExercices]{ACompleter}{%
\let\oldenumerate\enumerate%
@@ -2887,6 +2990,7 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
+ \ifboolKV[ClesExercices]{TagIci}{\PfMAfficherTagInside}{}%
}%
}%
}{%
@@ -2899,6 +3003,54 @@
}%
}%
+\NewDocumentCommand\PfMAfficherTag{m}{%
+ \xdef\PfMRetiensLesTags{#1}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeDesTags{\PfMRetiensLesTags}%
+ \reademptyitems%
+ \xintFor* ##1 in{\xintSeq{1}{\ListeDesTagslen}}\do{%
+ \ListeDesTags[##1]\xintifForLast{.}{, }%
+ }%
+}%
+
+\def\PfMTitreTagInside{\hfill\textbf{Notions abordées : }}%
+
+\NewDocumentCommand\PfMAfficherTagInside{}{%
+ \ifcsname \Roman{PfMMaquette}\roman{PfMExo}Tags\endcsname
+ \PfMTitreTagInside{\PfMTagStyle\PfMAfficherTag{\csname \Roman{PfMMaquette}\roman{PfMExo}Tags\endcsname}}\par\medskip\par%
+ \else
+ {\em Recompilez pour obtenir les notions abordées dans cet exercice}.\par
+ \fi
+}%
+
+%\makeatletter
+\NewDocumentCommand\PfMStockerTag{m}{%
+ \expandafter\xdef\csname \Roman{PfMMaquette}\roman{PfMExo}tags\endcsname{#1}%
+ \immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname \Roman{PfMMaquette}\roman{PfMExo}Tags\endcsname{\csname \Roman{PfMMaquette}\roman{PfMExo}tags\endcsname}}%
+ \immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname \Roman{PfMMaquette}TotalExoTags\endcsname{\thePfMExo}}%
+}%
+%\makeatother
+\newcounter{PfMTag}
+\NewDocumentCommand\PfMRecapitulerTag{}{%
+ \ifcsname \Roman{PfMMaquette}TotalExoTags\endcsname
+ \setcounter{PfMTag}{0}%
+ \begin{description}
+ \item[Récapitulatif des notions par exercices --]
+ \begin{description}
+ \item[]
+ \xintFor* ##1 in{\xintSeq{1}{\csname\Roman{PfMMaquette}TotalExoTags\endcsname}}\do{%
+ \stepcounter{PfMTag}%
+ \ifcsname \Roman{PfMMaquette}\roman{PfMTag}Tags\endcsname\relax
+ \item[Exercice ##1 :] \PfMAfficherTag{\csname \Roman{PfMMaquette}\roman{PfMTag}Tags\endcsname}
+ \fi
+ }
+ \end{description}
+ \end{description}
+ \else
+ Recompilez pour obtenir le récapitulatif des notions.
+ \fi
+}%
+
% \makeatletter
\NewDocumentCommand\TikzOlympiadesAPMEP{m}{%
\ifPfMRectoVerso%
@@ -3030,9 +3182,10 @@
}{}%
\colorlet{ColExoFiche}{\useKV[ClesExercices]{Background}}%
\colorlet{PfMCadreFiche}{\useKV[ClesExercices]{Cadre}}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+% \refstepcounter{PfMSection}%
+% \PfMChoixCorrection%
+% \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\PfMChoixTitreSolution%
\ifboolKV[ClesExercices]{BaremeTotal}{%
\immediate\write\@auxout{%
@@ -3045,6 +3198,7 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
+ \ifboolKV[ClesExercices]{TagIci}{\PfMAfficherTagInside}{}%
}{%
\PfMJusteAvantLaFinDesExercices%
\end{tcolorbox}
@@ -3111,6 +3265,8 @@
{\footnotesize\sffamily \total{\the\c at PfMSection-\the\c at PfMExo}};%
}{}%
\useKV[ClesExercices]{Ajout}%
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -3154,6 +3310,8 @@
\PfMAffichageSource%
%
\PfMLienVersSolution%
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -3343,8 +3501,7 @@
\setKV[ClesExercices]{#1}%
\ifboolKV[Boulot]{Input}{\Relecture}{}%
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
+ \PfMAvantLesExercices%
\PfMChoixTitreSolution%
\tcolorbox[%
tikzkholle,
@@ -3603,6 +3760,15 @@
}
\makeatletter
+\NewDocumentCommand\PfMAffichageTitreExercice{m}{%
+ \node[%
+ name=A,
+ fill=#1,
+ anchor=west,
+ xshift=\kvtcb at leftlower,
+ ] at (frame.north west){\bfseries\sffamily\useKV[Fiche]{NomExercice}\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\xdef\PfMContenuTitre{\useKV[ClesExercices]{Titre}}\ifx\PfMbla\PfMContenuTitre\PfMbla\else\ifboolKV[ClesExercices]{AffichageTitre}{\ifboolKV[ClesExercices]{Numerote}{~:~}{\xdef\PfMTitiLgNE{\useKV[Fiche]{NomExercice}}\IfStrEq{\PfMTitiLgNE}{}{}{~:~}}\useKV[ClesExercices]{Titre}}{}\fi};
+}%
+
\tcbset{%
tikzfiche/.style={%
before skip=1em,
@@ -3611,12 +3777,7 @@
colback=ColExoFiche,
colframe=PfMCadreFiche,
overlay unbroken and first={%
- \node[%
- name=A,
- fill=ColExoFiche,
- anchor=west,
- xshift=\kvtcb at leftlower,
- ] at (frame.north west){\bfseries\sffamily\useKV[Fiche]{NomExercice}\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{\ifboolKV[ClesExercices]{Numerote}{~:~}{\xdef\PfMTitiLgNE{\useKV[Fiche]{NomExercice}}\IfStrEq{\PfMTitiLgNE}{}{}{~:~}}\useKV[ClesExercices]{Titre}}{}};
+ \PfMAffichageTitreExercice{ColExoFiche}%
%%
\useKV[ClesExercices]{Ajout}%
%%
@@ -3629,6 +3790,8 @@
\PfMLienVersSolution
% Lien vers les entrainements
\PfMLienVersEntrainement
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -3674,6 +3837,8 @@
\PfMAffichageSource%
% Lien vers la solution
\PfMLienVersSolution
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -3737,6 +3902,8 @@
\PfMLienVersSolution%
%
\PfMLienVersEntrainement%
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -3762,7 +3929,7 @@
\newcommand\TikzDS{%
\clearpage
\begin{tcolorbox}[userds]%
- \sffamily Devoir surveillé \useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe}
+ \sffamily Devoir surveillé \useKV[DS]{Numero} \ifboolKV[DS]{Sujets}{(Sujet \useKV[DS]{Sujet})}{}\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe}
\par{\tiny\useKV[DS]{Code}}\hfill{\scriptsize\useKV[DS]{Date}}
\end{tcolorbox}%
}%
@@ -3775,7 +3942,7 @@
\fi%
\setKV[DS]{#1}%
\begin{tcolorbox}[userdscor]%
- \sffamily Devoir surveillé \useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe}%
+ \sffamily Devoir surveillé \useKV[DS]{Numero} \ifboolKV[DS]{Sujets}{(Sujet \useKV[DS]{Sujet})}{}\hfill\useKV[DS]{Niveau} \useKV[DS]{Classe}%
\par Correction%
\end{tcolorbox}%
}
@@ -3824,6 +3991,8 @@
{\footnotesize\sffamily \total{\the\c at PfMSection-\the\c at PfMExo}};
}{}
\PfMLienVersSolution%
+ %
+ %\PfMAffichageLicence
}%
}%
}%
@@ -3850,7 +4019,7 @@
}%
}%
}%
-\newcommand\TikzIE{%
+\NewDocumentCommand\TikzIE{}{%
\clearpage
\begin{minipage}{0.6\linewidth}
\begin{tcolorbox}[userie]%
@@ -3866,7 +4035,7 @@
\par\bigskip%
}%
-\newcommand\TikzIECor[1]{%
+\NewDocumentCommand\TikzIECor{m}{%
\ifPfMRectoVerso%
\cleardoublepage%
\else%
@@ -3879,47 +4048,43 @@
\end{tcolorbox}%
}%
+\makeatletter
\NewDocumentCommand\PfMRecapitulatif{mm}{%
\setKV[Boulot]{#1}%
\setKV[ParcoursPerso]{#2}%
\setcounter{PfMRetiensMapourPP}{\thePfMMaquette}%
+ \setcounter{PfMMaquette}{0}%
\DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo,\PfMMaquettePerso=TypeMaq}{%
- \begin{Maquette}[Fiche]{#2,Code=\normalsize\Prenom~\Nom}%
- \xdef\PfMNumeroPageDepartPP{\thepage}%
- \ifx\bla\PfMMaquettePerso\bla%
- \else%
- \setsepchar{,}\ignoreemptyitems%
- \readlist*\ListeChoixPerso{\PfMMaquettePerso}%
- \reademptyitems%
- \foreachitem\compteur\in\ListeChoixPerso{%
- \IfStrEqCase{\compteur}{%
- {Dys}{\setKV[Boulot]{Dys}}%
- }%
+ \ifnum\thePfMCorrigeParcoursPerso=1\relax
+ \begin{Maquette}[Fiche,CorrigeFin]{#2,Code=\normalsize\Prenom~\Nom}%
+ \else
+ \begin{Maquette}[Fiche]{#2,Code=\normalsize\Prenom~\Nom}%
+ \fi
+ \xdef\PfMNumeroPageDepartPP{\thepage}%
+ \ifx\PfMbla\PfMMaquettePerso\PfMbla%
+ \else%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeChoixPerso{\PfMMaquettePerso}%
+ \reademptyitems%
+ \foreachitem\compteur\in\ListeChoixPerso{%
+ \IfStrEqCase{\compteur}{%
+ {Dys}{\setKV[Boulot]{Dys}}%
}%
- \fi%
+ }%
+ \fi%
\PfMBasculeDys%
\readlist*\ListeExercices{\RecapListeExo}%
\ifnum\fpeval{\ListeExerciceslen}=1\relax{}%
\setKVdefault[ClesExercices]{Numerote=false}%
\input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[1].tex}%
+ \IfFileExists{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[1].sol}{\input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[1].sol}}{}%
\setKVdefault[ClesExercices]{Numerote}%
\else%
\foreach\i in{1,...,\ListeExerciceslen}{%
\input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].tex}%
+ \IfFileExists{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].sol}{\input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].sol}}{}%
}%
\fi%
- \ifnum\thePfMCorrigeParcoursPerso=1\relax%
- \clearpage
- \TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}%
- \readlist*\ListeExercices{\RecapListeExo}%
- \ifnum\fpeval{\ListeExerciceslen}=1\relax{}%
- \textbf{Corrigé de l'exercice} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[1].sol}\par\goodbreak%
- \else%
- \foreach\i in{1,...,\ListeExerciceslen}{%
- \textbf{Corrigé de l'exercice \i} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[\i].sol}\par\goodbreak%
- }%
- \fi%
- \fi%
\xdef\PfMNumeroPageArriveePP{\thepage}%
\end{Maquette}%
\ifboolKV[ParcoursPerso]{RectoVerso}{%
@@ -3928,15 +4093,28 @@
\fi%
}{}%
}%
+ \if at AssembleCorrections
+ \setcounter{PfMMaquette}{0}%
+ \RenewDocumentEnvironment{Solution}{}{\begin{PfMSeek}}{\end{PfMSeek}}%
+ \RecapitulatifCorrection{#2}%
+ \fi
}%
+\makeatother
\NewDocumentCommand\RecapitulatifCorrection{m}{%
- \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{%
+ \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo,\PfMMaquettePerso=TypeMaq}{%
\clearpage
+ \stepcounter{PfMMaquette}%
+ \setcounter{PfMExoSol}{0}%
+ \setcounter{PfMAlea}{0}%
\TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}%
+ \setsepchar{,}\ignoreemptyitems%
\readlist*\ListeExercices{\RecapListeExo}%
+ \reademptyitems%
\foreach\i in{1,...,\ListeExerciceslen}{%
- \IfFileExists{\jobname-PPEx\ListeExercices[\i].sol}{\textbf{Corrigé de l'exercice \i} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[\i].sol}\par\goodbreak}{}%
+ \stepcounter{PfMExoSol}%
+ \setcounter{PfMAlea}{0}%
+ \IfFileExists{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].sol}{\textbf{Corrigé de l'exercice \i} : \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].sol}\goodbreak}{}%
}%
}%
}%
@@ -3978,6 +4156,26 @@
}%
}%
+%Daltonisme
+\NewDocumentCommand\PfMBasculeDalton{}{%
+ \ifboolKV[Boulot]{Daltonisme}{%
+ \colorlet{blue}{PfMdblue}
+ \colorlet{cyan}{PfMdcyan}
+ \colorlet{green}{PfMdgreen}
+ \colorlet{yellow}{PfMdyellow}
+ \colorlet{red}{PfMdred}
+ \colorlet{purple}{PfMdpurple}
+ \colorlet{gray}{PfMdgray}
+ }{%
+ \colorlet{blue}{PfMbluesaved}
+ \colorlet{cyan}{PfMcyansaved}
+ \colorlet{green}{PfMgreensaved}
+ \colorlet{yellow}{PfMyellowsaved}
+ \colorlet{red}{PfMredsaved}
+ \colorlet{purple}{PfMpurplesaved}
+ \colorlet{gray}{PfMgraysaved}
+ }
+}
%% Pour factoriser l'appel aux corrections dans l'environnement Maquette
\makeatletter
\NewDocumentCommand\PfMPrepareCorrection{m}{%
@@ -3984,8 +4182,8 @@
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
\if at CAN
- \ifnum\thepage<5\relax
- \xintFor* ##1 in{\xintSeq{1}{\fpeval{5-\thepage}}}\do{%
+ \ifnum\thepage<\fpeval{\thePfMMaquette*4+1}\relax
+ \xintFor* ##1 in{\xintSeq{1}{\fpeval{\thePfMMaquette*4-\thepage}}}\do{%
~\clearpage%
}%
\fi%
@@ -4020,7 +4218,7 @@
\setKVdefault[LivreHeros]{Theme=Les nombres d\'ecimaux}
-\NewDocumentCommand\vaen{m}{\ref{#1}}%
+\NewDocumentCommand\vaen{m}{~Rendez vous au \ref{#1}.}%
\NewDocumentCommand\TikzLivreHeros{}{%
\begin{tcolorbox}[userlivreheros]%
@@ -4101,7 +4299,6 @@
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMJusteAvantLaFinDesExercices%
\end{tcolorbox}%
- % \ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
\PfMApresLesExercices%
}%
}%
@@ -4132,575 +4329,6 @@
}%
\makeatother
-%%%%%%%%%%%%%%%%% AMC
-
-\def\PfMTexteAMC{\scriptsize Pour chaque question, remplir avec un stylo {\em noir} la case associée à {\em l'unique} réponse correcte.\par En cas d'erreur, {\em ne redessiner pas} la case cochée par erreur, mettez simplement un coup de « blanc » dessus.}
-
-\newcommand\TikzAMC{%
- \begin{tcolorbox}[%
- colback=LightGray!10,
- colframe=LightGray,
- enhanced,%
- overlay unbroken and first={%
- \ifboolKV[AMC]{Calculatrice}{\node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice autorisée --};}{}%
- }%
- ]%
- \sffamily \useKV[AMC]{Theme}
- \vspace{1em}
- \par\hfill{\scriptsize\useKV[AMC]{Date}}
- \end{tcolorbox}%
- \ifboolKV[Boulot]{IntroductionAMC}{\PfMTexteAMC}{}%
- \par\bigskip%
-}%
-
-\newlength\PfMAMCBarreFraction
-\makeatletter
-\setKVdefault[ListeReponses]{Lettre=x,Unites=false}
-\defKV[ListeReponses]{Unite=\setKV[ListeReponses]{Unites}\DeclareSIUnit{\TempoAMC}{#1}}
-
-\NewDocumentCommand\ListeReponses{som}{%
- \ifboolKV[Boulot]{AMC}{%
- \useKVdefault[ListeReponses]%
- \setKV[ListeReponses]{#2}%
- \setsepchar{,}\ignoreemptyitems%
- \readlist*\ListeAMCRep{#3}%
- \reademptyitems%
-% \showitems\ListeAMCRep[]
- \setcounter{PfMAMCOpen}{1}%
- \stepcounter{PfMNbListeReponsesAMC}%
- \par
- \ifnum\fpeval{\ListeAMCReplen}=1\relax%
- % On teste la présence de ! pour les fractions, de : pour l'écriture ax+b, de ! pour une écriture du style $a^p$ et de | pour les écritures scientifiques.
- \StrCount{\ListeAMCRep[1]}{/}[\PfMAMCPresenceFraction]%
- \StrCount{\ListeAMCRep[1]}{:}[\PfMAMCPresenceLitteral]%
- \StrCount{\ListeAMCRep[1]}{!}[\PfMAMCPresencePuissances]%
- \StrCount{\ListeAMCRep[1]}{|}[\PfMAMCPresencePuissancesDix]%
- \ifnum\fpeval{\PfMAMCPresenceFraction+\PfMAMCPresenceLitteral+\PfMAMCPresencePuissances+\PfMAMCPresencePuissancesDix}=0\relax
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}
- \IfInteger{\ListeAMCRep[1]}{%
- \itemtomacro\ListeAMCRep[1]\Toto%
- \StrLen{\fpeval{abs(\Toto)}}[\PfMLongueurCaseAMC]%
- \IfBooleanTF{#1}{%
- \AMCnumericChoices{\fpeval{\ListeAMCRep[1]}}{digits=\PfMLongueurCaseAMC,sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- }{%
- \begin{minipage}{\PfMAMCBarreFraction}
- \AMCnumericChoices{\fpeval{\ListeAMCRep[1]}}{digits=\PfMLongueurCaseAMC,sign=false,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}
- \end{minipage}\ifboolKV[ListeReponses]{Unites}{~~~\si[per-mode=symbol]{\TempoAMC}}{}%
- }%
- }{%
- \itemtomacro\ListeAMCRep[1]\Toto%
- \StrCut{\Toto}{.}{\TotoAv}{\TotoAp}%
- \StrLen{\fpeval{abs(\TotoAv)}}[\PfMLongueurCaseAMCAv]%
- \StrLen{\TotoAp}[\PfMLongueurCaseAMCAp]%
- \IfBooleanTF{#1}{%
- \AMCnumericChoices{\fpeval{\ListeAMCRep[1]}}{digits=\fpeval{\PfMLongueurCaseAMCAv+\PfMLongueurCaseAMCAp},decimals=\PfMLongueurCaseAMCAp,sign,Tpoint={,},borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- }{%
- \begin{minipage}{\PfMAMCBarreFraction}
- \AMCnumericChoices{\fpeval{\ListeAMCRep[1]}}{digits=\fpeval{\PfMLongueurCaseAMCAv+\PfMLongueurCaseAMCAp},decimals=\PfMLongueurCaseAMCAp,sign=false,Tpoint={,},borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- \end{minipage}\ifboolKV[ListeReponses]{Unites}{~~~\si[per-mode=symbol]{\TempoAMC}}{}%
- }%
- }%
- \end{questionmultx}
- \else
- %Fraction
- \ifnum\PfMAMCPresenceFraction=1\relax%
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}
- \itemtomacro\ListeAMCRep[1]\Toto%
- \StrCut{\Toto}{/}{\TotoAv}{\TotoAp}%
- \StrLen{\fpeval{abs(\TotoAv)}}[\PfMLongueurCaseAMCNum]%
- \StrLen{\TotoAp}[\PfMLongueurCaseAMCDeno]%
- \IfBooleanTF{#1}{%
- \AMCnumericChoices{\TotoAv.\TotoAp}{digits=\fpeval{\PfMLongueurCaseAMCNum+\PfMLongueurCaseAMCDeno},decimals=\PfMLongueurCaseAMCDeno,sign,Tpoint={\raisebox{0.25\AMC at boxedheight}{\rule{\PfMAMCBarreFraction}{1pt}}},borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- }{%
- \AMCnumericChoices{\TotoAv.\TotoAp}{digits=\fpeval{\PfMLongueurCaseAMCNum+\PfMLongueurCaseAMCDeno},decimals=\PfMLongueurCaseAMCDeno,sign=false,Tpoint={\raisebox{0.25\AMC at boxedheight}{\rule{\PfMAMCBarreFraction}{1pt}}},borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- }%
- \end{questionmultx}
- \fi
- % Puissances
- \ifnum\PfMAMCPresencePuissances=1\relax%
- \itemtomacro\ListeAMCRep[1]\Toto%
- \StrCut{\Toto}{!}{\TotoAv}{\TotoAp}%
- \StrLen{\fpeval{abs(\TotoAv)}}[\PfMLongueurCaseAMCMant]%
- \StrLen{\TotoAp}[\PfMLongueurCaseAMCPuis]%
- \IfBooleanTF{#1}{%
- $\begin{minipage}{\PfMAMCBarreFraction}
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAv}{digits=\fpeval{\PfMLongueurCaseAMCMant},sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}\end{questionmultx}
- \end{minipage}^{~\begin{minipage}{\PfMAMCBarreFraction}
- \scriptsize\stepcounter{PfMNbListeReponsesAMC}\begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAp}{digits=\fpeval{\PfMLongueurCaseAMCPuis},sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}\end{questionmultx}
- \end{minipage}}$
- }{%
- $\begin{minipage}{\PfMAMCBarreFraction}
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAv}{digits=\fpeval{\PfMLongueurCaseAMCMant},sign=false,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}\end{questionmultx}
- \end{minipage}^{~\begin{minipage}{\PfMAMCBarreFraction}
- \scriptsize\stepcounter{PfMNbListeReponsesAMC}\begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAp}{digits=\fpeval{\PfMLongueurCaseAMCPuis},sign=false,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}\end{questionmultx}
- \end{minipage}}$
- }%
- \fi
- % PuissancesDix
- \ifnum\PfMAMCPresencePuissancesDix=1\relax%
- \itemtomacro\ListeAMCRep[1]\Toto%
- \StrCut{\Toto}{|}{\TotoAv}{\TotoAp}%
- \StrLen{\fpeval{abs(\TotoAv)}}[\PfMLongueurCaseAMCMant]%
- \StrLen{\TotoAp}[\PfMLongueurCaseAMCPuis]%
- \StrCut{\TotoAv}{.}{\TotoAva}{\TotoApa}%
- \StrLen{\fpeval{abs(\TotoAva)}}[\PfMLongueurCaseAMCManta]%
- \StrLen{\fpeval{abs(\TotoApa)}}[\PfMLongueurCaseAMCMantb]%
- \IfBooleanTF{#1}{%
- $\begin{minipage}{\PfMAMCBarreFraction}
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAv}{digits=\fpeval{\PfMLongueurCaseAMCManta+\PfMLongueurCaseAMCMantb},Tpoint={,},decimals=\PfMLongueurCaseAMCMantb,sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}
- \end{questionmultx}
- \end{minipage}\quad\times10^{~\begin{minipage}{\PfMAMCBarreFraction}
- \scriptsize\stepcounter{PfMNbListeReponsesAMC}\begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAp}{digits=\PfMLongueurCaseAMCPuis,sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}\end{questionmultx}
- \end{minipage}}
- $
- }{%
- $\begin{minipage}{\PfMAMCBarreFraction}
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAv}{digits=\fpeval{\PfMLongueurCaseAMCManta+\PfMLongueurCaseAMCMantb},Tpoint={,},decimals=\PfMLongueurCaseAMCMantb,sign=false,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}
- \end{questionmultx}
- \end{minipage}\quad\times10^{~\begin{minipage}{\PfMAMCBarreFraction}
- \scriptsize\stepcounter{PfMNbListeReponsesAMC}\begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}\AMCnumericChoices{\TotoAp}{digits=\PfMLongueurCaseAMCPuis,sign=false,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}\end{questionmultx}
- \end{minipage}}
- $
- }%
- \fi
- % Litteral
- \ifnum\PfMAMCPresenceLitteral=1
- \itemtomacro\ListeAMCRep[1]\Toto%
- \StrCut{\Toto}{:}{\TotoAv}{\TotoAp}%
- \StrLen{\fpeval{abs(\TotoAv)}}[\PfMLongueurCaseAMCMono]%
- \StrLen{\fpeval{abs(\TotoAp)}}[\PfMLongueurCaseAMCConst]%
- $
- \begin{minipage}{\PfMAMCBarreFraction}
- \footnotesize%
- \begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}%
- \AMCnumericChoices{\TotoAv}{digits=\fpeval{\PfMLongueurCaseAMCMono},sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- \end{questionmultx}%
- \end{minipage}
- \qquad\useKV[ListeReponses]{Lettre}\quad
- \begin{minipage}{\PfMAMCBarreFraction}%
- \stepcounter{PfMNbListeReponsesAMC}\footnotesize\begin{questionmultx}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}%
- \AMCnumericChoices{\TotoAp}{digits=\fpeval{\PfMLongueurCaseAMCConst},sign,borderwidth=0pt,backgroundcol=gray!20,scoreexact=1,hspace=0.25em,vspace=0ex}%
- \end{questionmultx}%
- \end{minipage}
- $
- \fi
- \fi
- \else%
- \begin{question}{\Roman{PfMExo}\roman{PfMNbListeReponsesAMC}}
- \ifPfMDeuxColonnes
- \begin{reponses}%
- \bonne{\ListeAMCRep[1]}%
- \xintFor* ##1 in{\xintSeq{2}{\ListeAMCReplen}}\do{%
- \mauvaise{\ListeAMCRep[##1]}%
- }%
- \end{reponses}%
- \else
- \begin{reponseshoriz}%
- \bonne{\ListeAMCRep[1]}%
- \xintFor* ##1 in{\xintSeq{2}{\ListeAMCReplen}}\do{%
- \mauvaise{\ListeAMCRep[##1]}%
- }%
- \end{reponseshoriz}%
- \fi
- \end{question}
- \fi
- }{}%
-}%
-\makeatother
-
-\makeatletter
-\tcbset{%
- tikzamc/.style={%
- before skip=0em,
- bottom=0pt,
- enhanced,
- breakable,
- colback=white,
- frame hidden,
- overlay unbroken and first={%
- \node[%
- name=A,
- fill=white,
- anchor=west,
- %xshift=\kvtcb at leftlower,
- ] at (frame.north west){\bfseries\sffamily\useKV[AMC]{NomExercice}\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{\ifboolKV[ClesExercices]{Numerote}{~:~}{\xdef\PfMTitiLgNE{\useKV[Fiche]{NomExercice}}\IfStrEq{\PfMTitiLgNE}{}{}{~:~}}\useKV[ClesExercices]{Titre}}{}};
- %%
- \useKV[ClesExercices]{Ajout}%
-% %%
- }%
- }%
-}%
-\makeatother
-
-\def\PfMScoreA{5}%
-\def\PfMScoreB{3}%
-\def\PfMScoreC{1}%
-\def\PfMScoreD{0.1}%
-
-\NewDocumentEnvironment{exerciceAmc}{o}{%
- \setcounter{PfMNbLogo}{1}%
- \setcounter{PfMAMCOpen}{0}%
- \useKVdefault[ClesExercices]%
- \setKV[ClesExercices]{#1}%
- \ifboolKV[Boulot]{Input}{\Relecture}{}%
- \PfMAvantLesExercices%
- \begin{tcolorbox}[tikzamc]%
- }{%
- \ifnum\thePfMAMCOpen=0\relax
- \PfMApresLesExercices
- \par
- \begin{question}{\Roman{PfMExo}}
- \AMCOpen{lineup=true,lineuptext=~,dots=false,backgroundcol=gray!20}{\mauvaise[RR]{RR}\scoring{\PfMScoreD}\mauvaise[R]{R}\scoring{\PfMScoreC}\mauvaise[V]{V}\scoring{\PfMScoreB}\bonne[VV]{VV}\scoring{\PfMScoreA}}%gray!15
- \end{question}%
- \fi
- \end{tcolorbox}%
-}%
-
-%%%%%%%%%%%%%%%%% Fin AMC
-
-%%%%%%%%%%%%%%%%%%% QCM
-\NewDocumentEnvironment{exerciceQCM}{o}{%
- \setcounter{PfMNbLogo}{1}%
- \setcounter{PfMAlea}{0}%
- \useKVdefault[ClesExercices]%
- \setKV[ClesExercices]{#1}%
- \ifboolKV[Boulot]{Input}{\Relecture}{}%
- \PfMAvantLesExercices%
- \begin{tcolorbox}[tikzqcm]%
- }{\end{tcolorbox}%
-}%
-
-%\makeatletter
-\tcbset{%
- tikzqcm/.style={%
- before skip=0em,
- top=2em,
- bottom=2em,
- enhanced,
-% breakable,
- colback=\ifodd\thePfMExo white\else gray!15\fi,
- sharp corners,
- frame hidden,
- overlay unbroken and first={%
- \node[%
- name=A,
- %fill=white,
- anchor=west,
- % xshift=\kvtcb at leftlower,
- yshift=-1em,
- ] at (frame.north west){\bfseries\sffamily\useKV[QCM]{NomExercice}\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{\ifboolKV[ClesExercices]{Numerote}{~:~}{\xdef\PfMTitiLgNE{\useKV[Fiche]{NomExercice}}\IfStrEq{\PfMTitiLgNE}{}{}{~:~}}\useKV[ClesExercices]{Titre}}{}};
- %
- \PfMAffichageSourceQCM%
- %%
- \useKV[ClesExercices]{Ajout}%
-% %%
- }%
- }%
-}%
-%\makeatother
-
-\def\PfMIntroductionQCM{%
- Cet exercice est un questionnaire à choix multiples (QCM). {\em Aucune justification n'est ici demandée.}\\Pour chaque question, plusieurs réponses sont proposées, une seule est exacte. Écrire sur cotre copie le numéro de la question et la réponse correspondante.%
-}%
-
-\tcbset{%
- userqcm/.style={%
- spread upwards=-1cm,colback=gray!5%
- }%
-}%
-
-\tcbset{%
- userqcmcor/.style={%
- spread upwards=-1cm,colback=gray!5%
- }%
-}%
-
-\NewDocumentCommand\TikzQCM{}{%
- \begin{tcolorbox}[userqcm]%
- \begin{center}
- \Large\sffamily \useKV[QCM]{Theme}
- \end{center}
- \end{tcolorbox}%
-}%
-
-\NewDocumentCommand\TikzQCMCor{m}{%
- \ifPfMRectoVerso%
- \cleardoublepage%
- \else%
- \clearpage%
- \fi%
- \setKV[QCM]{#1}%
- \begin{tcolorbox}[userqcmcor]%
- \Large\sffamily \useKV[QCM]{Theme} (Correction)
- \end{tcolorbox}%
-}
-
-\NewDocumentCommand\ListeReponsesQCM{om}{%
- \ifboolKV[Boulot]{QCM}{%
- \setsepchar{,}\ignoreemptyitems%
- \readlist*\ListeQCMRep{#2}%
- \reademptyitems%
- % on mélange les réponses :)
- \xdef\ListeNumMelangeAv{1}%
- \xintFor* ##1 in{\xintSeq{2}{\ListeQCMReplen}}\do{%
- \xdef\ListeNumMelangeAv{\ListeNumMelangeAv,##1}%
- }%
- \MelangeListe{\ListeNumMelangeAv}{\ListeQCMReplen}%
- \setsepchar{,}\ignoreemptyitems%
- \readlist*\ListeNumMelangeQCM{\faa}%
- \reademptyitems%
- \ExporteListe{ListeW}{\faa}%
- %
- \ifboolKV[QCM]{Colonnes}{%
- \begin{multicols}{\ListeQCMReplen}%
- }{}%
- \begin{enumerate}[leftmargin=*,label=\bfseries\Alph{*}/]
- \xintFor* ##1 in{\xintSeq{1}{\ListeQCMReplen}}\do{%
- \itemtomacro\ListeNumMelangeQCM[##1]\PfMTitiQCM
- \item \ListeQCMRep[\PfMTitiQCM]
- }%
- \end{enumerate}%
- \ifboolKV[QCM]{Colonnes}{%
- \end{multicols}%
- }{}%
- }{}%
-}%
-%%%%%%%%%%%%%%%% fin QCM
-
-
-%%% PixelArt
-\newtoks\ToksPXTheme%
-\newtoks\ToksPXNiveau%
-%\newtoks\ToksPXListeSolAv%
-%\def\UpdateToksPXListeSolAv#1\nil{\global\addtotok\ToksPXListeSolAv{#1,}}%
-\def\UpdateToksPXNiveau#1\nil{\addtotok\ToksPXNiveau{#1}}%
-\def\UpdateToksPXTheme#1\nil{\addtotok\ToksPXTheme{#1}}%
-
-%\NewDocumentCommand\PfMPXCount{}{%
-% \stepcounter{PfMLettresPixelArt}%
-% \xdef\PfMCountPX{\csname p\Alph{PfMLettresPixelArt}\endcsname}%
-% \PfMCountPX%
-%}%
-
-\newcounter{PfMLettresPixelArt}
-
-\NewDocumentCommand\MPPixelArt{mm}{
- \mplibforcehmode
- \begin{mplibcode}
- path carre[];
-
- u:=0.5mm;
-
- color ColorEntier[],ColFond;
-
- vardef BlocAffichage=
- for k=0 upto 34:
- carre[k]:=(unitsquare scaled u) shifted(u*(k mod 5,5-(k div 5)));
- endfor;
- enddef;
-
- vardef Affichage(expr decomp)=
- save $;
- picture $;
- drawoptions(withpen pensquare scaled0.1);
- $=image(%
- for k=0 upto 34:
- if (substring(k,k+1) of decomp)="1":
- fill carre[k] withcolor ColFond;
- fi;
- endfor;
- );
- drawoptions();
- $
- enddef;
-
- nblignes:=1;
-
- decahoriz:=0;
-
- vardef Test(expr cptk)(text cptnt)=
- pair Decalage;
- Decalage=u*(decahoriz,-8*(nblignes-1));
- decahoriz:=decahoriz+6;
- if substring(cptk,cptk+1) of cptnt="A":draw Affichage("01110100011000110001111111000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="B":draw Affichage("11110100011000111110100011000111110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="C":draw Affichage("01110100011000010000100001000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="D":draw Affichage("11100100101000110001100011001011100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="E":draw Affichage("11111100001000011111100001000011111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="F":draw Affichage("11111100001000011111100001000010000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="G":draw Affichage("01110100011000010111100011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="H":draw Affichage("10001100011000111111100011000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="I":draw Affichage("01110001000010000100001000010001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="J":draw Affichage("00111000100001000010000101001001100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="K":draw Affichage("10001100101010011000101001001010001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="L":draw Affichage("10000100001000010000100001000011111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="M":draw Affichage("10001110111010110101100011000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="N":draw Affichage("10001100011100110101100111000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="O":draw Affichage("01110100011000110001100011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="P":draw Affichage("11110100011000111110100001000010000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="Q":draw Affichage("01110100011000110001101011001001101") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="R":draw Affichage("11110100011000111110101001001010001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="S":draw Affichage("01111100001000001110000010000111110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="T":draw Affichage("11111001000010000100001000010000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="U":draw Affichage("10001100011000110001100011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="V":draw Affichage("10001100011000110001100010101000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="W":draw Affichage("10101101011010110101101011010101010") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="X":draw Affichage("10001100010101000100010101000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="Y":draw Affichage("10001100011000101010001000010000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="Z":draw Affichage("11111000010001000100010001000011111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="a":draw Affichage("00000000000111100001011111000101111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="b":draw Affichage("10000100001011011001100011000111110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="c":draw Affichage("00000000000111010000100001000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="d":draw Affichage("00001000010110110011100011000101111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="e":draw Affichage("00000000000111010001111111000001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="f":draw Affichage("00110010010100011100010000100001000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="g":draw Affichage("00000011111000110001011110000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="h":draw Affichage("10000100001011011001100011000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="i":draw Affichage("00100000000110000100001000010001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="j":draw Affichage("00010000000011000010000101001001100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="k":draw Affichage("10000100001001010100110001010010010") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="l":draw Affichage("01100001000010000100001000010001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="m":draw Affichage("00000000001101010101101011000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="n":draw Affichage("00000000001011011001100011000110001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="o":draw Affichage("00000000000111010001100011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="p":draw Affichage("00000000001111010001111101000010000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="q":draw Affichage("00000000000110110011011110000100001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="r":draw Affichage("00000000001011011001100001000010000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="s":draw Affichage("00000000000111010000011100000111110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="t":draw Affichage("01000010001110001000010000100100110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="u":draw Affichage("00000000001000110001100011001101101") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="v":draw Affichage("00000000001000110001100010111000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="w":draw Affichage("00000000001010110101101011010101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="x":draw Affichage("00000000001000101010001000101010001") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="y":draw Affichage("00000000001000110001011110000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="z":draw Affichage("00000000001111100010001000100011111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="0":draw Affichage("01110100011001110101110011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="1":draw Affichage("00100011000010000100001000010001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="2":draw Affichage("01110100010000100010001000100011111") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="3":draw Affichage("11111000100010000010000011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="4":draw Affichage("00010001100101010010111110001000010") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="5":draw Affichage("11111100001111000001000011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="6":draw Affichage("00110010001000011110100011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="7":draw Affichage("11111000010001000100010000100001000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="8":draw Affichage("01110100011000101110100011000101110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="9":draw Affichage("01110100011000101111000010001001100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="!":draw Affichage("00100001000010000100000000000000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="'":draw Affichage("01100001000100000000000000000000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="(":draw Affichage("00010001000100001000010000010000010") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt=")":draw Affichage("01000001000001000010000100010001000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="*":draw Affichage("00000001001010101110101010010000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="+":draw Affichage("00000001000010011111001000010000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="-":draw Affichage("00000000000000011111000000000000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt=".":draw Affichage("00000000000000000000000000110001100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt=":":draw Affichage("00000011000110000000011000110000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt=";":draw Affichage("00000011000110000000011000010001000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="<":draw Affichage("00010001000100010000010000010000010") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="=":draw Affichage("00000000001111100000111110000000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt=">":draw Affichage("10000010000010000010001000100010000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="?":draw Affichage("01110100010000100010001000000000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="[":draw Affichage("01110010000100001000010000100001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="]":draw Affichage("01110000100001000010000100001001110") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="`":draw Affichage("01000001000001000000000000000000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="|":draw Affichage("00100001000010000100001000010000100") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt=" ":draw Affichage("00000000000000000000000000000000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="&":draw Affichage("00000100001100011100110001000000000") shifted(Decalage);
-% elseif substring(cptk,cptk+1) of cptnt="$":draw Affichage("00000000000000100001000010000111111") shifted(Decalage);
-% elseif substring(cptk,cptk+1) of cptnt="^":draw Affichage("00100010101000100000000000000000000") shifted(Decalage);
- elseif substring(cptk,cptk+1) of cptnt="_":draw Affichage("00000000000000000000000000000000000") shifted(Decalage);
-% elseif substring(cptk,cptk+1) of cptnt="~":draw Affichage("01000010000111001000010000100001000") shifted(Decalage);
- fi;
-enddef;
-
-vardef LCDSeul(text nt)=
- decahoriz:=0;
- ColFond:=black;
- if length(nt)>0:
- for k=0 upto length(nt)-1:
- BlocAffichage;
- Test(k,nt);
- endfor;
- fi;
- enddef;
-
- picture TestLCD;
- TestLCD=image(
- LCDSeul(#1);
- );
- bboxmargin:=3u;
- maxlarg=abs(lrcorner bbox TestLCD - llcorner bbox TestLCD)/u;
- maxhaut=abs(urcorner bbox TestLCD - lrcorner bbox TestLCD)/u;
- for k=0 upto maxlarg-1:
- for l=0 upto maxhaut-1:
- draw (unitsquare scaled u) shifted(llcorner bbox TestLCD+u*(k,l)) withcolor 0.8white;
- endfor;
- endfor;
- draw bbox TestLCD;
-
- draw TestLCD;
- picture Retiens;
- Retiens=currentpicture;
- currentpicture:=nullpicture;
- draw Retiens scaled 2;
- \end{mplibcode}
-}%
-
-\NewDocumentCommand\TikzPixelArt{}{%
- \ToksPXNiveau{}%
- \xdef\Titi{"Classe de \useKV[PixelArt]{Niveau}"}%
- \expandafter\UpdateToksPXNiveau\Titi\nil%
- \ToksPXTheme{}%
- \xdef\Toto{"\useKV[PixelArt]{Theme}"}%
- \expandafter\UpdateToksPXTheme\Toto\nil%
- \xdef\ListeAvantCouleurs{\useKV[PixelArt]{ListeCouleurs}}%
- \begin{center}
- \MPPixelArt{\the\ToksPXTheme}{\ListeAvantCouleurs}%
- \end{center}
-}%
-
-%\newcounter{PfMPX}[PfMMaquette]
-%\setcounter{PfMPX}{0}
-
-\NewDocumentCommand\PfMSolPixelArt{sm}{%
- \ifboolKV[Boulot]{PixelArt}{%
- \stepcounter{PfMLettresPixelArt}%
- \IfBooleanTF{#1}{}{
- \ifboolKV[PixelArt]{Aleatoire}{%
- \hfill\textbf{Lettre~\ListePourLesItems[\thePfMLettresPixelArt]}%
- }{%
- \hfill\textbf{Lettre~\Alph{PfMLettresPixelArt}}%
- }%
- }%
- \expandafter\xdef\csname PfMPXSolution\Alph{PfMLettresPixelArt}\endcsname{#2}%
- }{}%
-}%
-
-\NewDocumentEnvironment{exercicePX}{o}{%
- \setcounter{PfMAlea}{0}%
- \setcounter{PfMNbLogo}{1}%
- % Mettre les indications hors-jeu
- \setcounter{RetiensIndic}{0}%
- \useKVdefault[ClesExercices]%
- \setKV[ClesExercices]{#1}%
- \ifboolKV[Boulot]{Input}{\Relecture}{}%
- \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \refstepcounter{PfMExo}%
-}{}
-%%% Fin PixelArt
-
-% Big Ten
-\newcounter{PfMLettresBigTen}
-
-\NewDocumentCommand\PfMSolBigTen{m}{%
- \ifboolKV[Boulot]{BigTen}{%
- \stepcounter{PfMLettresBigTen}%
- \expandafter\xdef\csname PfMBigTenSolution\Alph{PfMLettresBigTen}\endcsname{#1}%
- }{}%
-}%
-%%% Fin BigTen
-
-
-\def\PfMLogoBeamer{}
-
%%%%%%%%%%%%%%% Debut Maquette %%%%%%%
% Environnement englobant le tout.
\makeatletter
@@ -4727,8 +4355,27 @@
\IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}%
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
+ \useKVdefault[Beamer]%
+ \setKV[Beamer]{#2}%
\ifboolKV[Boulot]{CorrigeFin}{%
- \AtEndDocument{%
+ \AtEndDocument{%
+ \ifboolKV[Beamer]{Separe}{%
+ \setcounter{PfMExoSol}{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\PfMCANTotalExo}}\do{%
+ \refstepcounter{PfMExoSol}%
+ \label{pagesol-\thePfMMaquette-\thePfMExoSol}%
+ \setcounter{PfMAlea}{0}%
+ \def\PfMTexteDuCorrige{\csname PfMTNomSol\Roman{PfMExoSol}\endcsname}%
+ \IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.sol}{%
+ \begin{frame}
+ \footnotesize
+ \frametitle{~\hspace{0.25\linewidth}{\Large Alea\TeX}~\hfill~\useKV[Beamer]{Theme} (Correction)\hfill~\raisebox{-0.25\height}{\PfMBoiteNumExoBeamer{##1}}\quad~}%
+ \textbf{\PfMTexteDuCorrige\ifnum\thePfMExo=1\relax\else~\ifboolKV[Boulot]{CorrigeSeul}{##1}{\ref{page-\thePfMMaquette-##1}}\fi\PfMAffichageTitreSolution}\par\nopagebreak\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}%
+ \end{frame}%
+ }{}%
+ }%
+ }{%
+ \setKV[Beamer]{#2}%
\PfMPrepareCorrection{#1}%
\begin{frame}
\frametitle{\useKV[Beamer]{Theme}\hfill\raisebox{-0.25\height}{%
@@ -4736,18 +4383,40 @@
\PfMAffichageCorrige%
\end{frame}
}%
- }{}%
- \useKVdefault[Beamer]%
- \setKV[Beamer]{#2}%
- \let\exercice\exerciceBeamer\let\endexercice\endexerciceBeamer%
- \begin{frame}[environment=Maquette,fragile]
- \setcounter{PfMExo}{0}%
- \PfCGraineAlea{\useKV[Boulot]{Graine}}%
- \frametitle{\useKV[Beamer]{Theme}\hfill\raisebox{-0.25\height}{%
- \PfMLogoBeamer}~\phantom{t}}%
+ }%
+ }{}%
+ \ifboolKV[Beamer]{Separe}{%
+ \let\exercice\ExoBeamerWrite\let\endexercice\endExoBeamerWrite%
+ \IfHookExistsTF{env/Maquette/after}{\RemoveFromHook{env/Maquette/after}[*]}{}%
+ \AddToHook{env/Maquette/after}[CodeBeamer]{%
+ \setKV[Beamer]{#2}%
+ \let\exercice\exerciceBeamer\let\endexercice\endexerciceBeamer%
+ \xdef\PfMCANTotalExo{\thePfMExo}%
+ \setcounter{PfMExo}{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\PfMCANTotalExo}}\do{%
+ \begin{frame}
+ \footnotesize
+ \frametitle{~\hspace{0.25\linewidth}{\Large Alea\TeX}~\hfill~\useKV[Beamer]{Theme}\hfill~\raisebox{-0.25\height}{\PfMBoiteNumExoBeamer{##1}}\quad~}%
+ %\begin{exercice}
+ \input{\jobname-Ma\thePfMMaquette-Ex##1.can}
+ %\end{exercice}
+ \end{frame}
+ }%
+ }
}{%
- \end{frame}
- }%
+ \let\exercice\exerciceBeamer\let\endexercice\endexerciceBeamer%
+ \setKV[Beamer]{#2}%
+ \begin{frame}[environment=Maquette,fragile]%
+ \setcounter{PfMExo}{0}%
+ \PfCGraineAlea{\useKV[Boulot]{Graine}}%
+ \frametitle{\useKV[Beamer]{Theme}\hfill\raisebox{-0.25\height}{%
+ \PfMLogoBeamer}~\phantom{t}}%
+ }%
+ }{%
+ \ifboolKV[Beamer]{Separe}{}{%
+ \end{frame}
+ }
+ }%
}{%
\NewDocumentEnvironment{Maquette}{om}{%
% on remet à zéro les compteurs de solutions : inutile ?
@@ -4765,31 +4434,37 @@
%% \opadd*{#1}{ScoreTotal\thePfMMaquette}{ScoreTotal\thePfMMaquette}%
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
+ \let\Complement\center\let\endComplement\endcenter
\if at AssembleCorrections
- \immediate\openout\PfMfile at out \jobname-DefiMq-\thePfMMaquette.tex%
- \immediate\write\PfMfile at out{\unexpanded{\useKVdefault[Boulot]}}%
- \immediate\write\PfMfile at out{\unexpanded{\setKV[Boulot]{#1}}}%
- \ifboolKV[Boulot]{Fiche}{\immediate\write\PfMfile at out{\TikzFicheCor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{DS}{\immediate\write\PfMfile at out{\TikzDSCor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{DM}{\immediate\write\PfMfile at out{\TikzDMCor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{IE}{\immediate\write\PfMfile at out{\TikzIECor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{QCM}{\immediate\write\PfMfile at out{\TikzQCMCor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{FdR}{\immediate\write\PfMfile at out{\TikzFdRCor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{Contrat}{\immediate\write\PfMfile at out{\TikzContratCor{\unexpanded{#2}}}}{}%
- \ifboolKV[Boulot]{Parcours}{\immediate\write\PfMfile at out{\TikzParcoursCor{\unexpanded{#2}}}}{}%
- \immediate\closeout\PfMfile at out%
+ \ifboolKV[Boulot]{ParcoursPerso}{}{
+ \immediate\openout\PfMfile at out \jobname-DefiMq-\thePfMMaquette.tex%
+ \immediate\write\PfMfile at out{\unexpanded{\useKVdefault[Boulot]}}%
+ \immediate\write\PfMfile at out{\unexpanded{\setKV[Boulot]{#1}}}%
+ \ifboolKV[Boulot]{Fiche}{\immediate\write\PfMfile at out{\TikzFicheCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{ParcoursPerso}{\immediate\write\PfMfile at out{\TikzFicheCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{DS}{\immediate\write\PfMfile at out{\TikzDSCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{DM}{\immediate\write\PfMfile at out{\TikzDMCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{IE}{\immediate\write\PfMfile at out{\TikzIECor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{QCM}{\immediate\write\PfMfile at out{\TikzQCMCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{FdR}{\immediate\write\PfMfile at out{\TikzFdRCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{Contrat}{\immediate\write\PfMfile at out{\TikzContratCor{\unexpanded{#2}}}}{}%
+ \ifboolKV[Boulot]{Parcours}{\immediate\write\PfMfile at out{\TikzParcoursCor{\unexpanded{#2}}}}{}%
+ \immediate\closeout\PfMfile at out%
+ }%
\fi
% options de boulot
\IfHookExistsTF{env/Maquette/after}{\RemoveFromHook{env/Maquette/after}[*]}{}%
\AddToHook{env/Maquette/after}[RetiensExo]{\xdef\PfMRetiensLienExoMa{\PfMRetiensLienExoMa,\thePfMExo}}
%--------------
-% \useKVdefault[Boulot]%
-% \setKV[Boulot]{#1}%
\ifboolKV[Boulot]{CorrigeSeul}{\setKV[Boulot]{CorrigeFin}}{}%
\if at Dyslexie%
\setKV[Boulot]{Dys}%
\fi%
+ \if at Daltonisme%
+ \setKV[Boulot]{Daltonisme}%
+ \fi%
\PfMBasculeDys%
+ \PfMBasculeDalton%
\IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection\PfMChoixAffichageEntrainement}}%
% Test
\IfHookExistsTF{env/exercice/begin}{\RemoveFromHook{env/exercice/begin}[*]}{}%
@@ -4819,38 +4494,48 @@
}{}%
}{%
\ifboolKV[Boulot]{CAN}{%
+ \let\exercice\ExoCANWrite\let\endexercice\endExoCANWrite%
+ \let\Complement\ExoCANCptWrite\let\endComplement\endExoCANCptWrite%
\setKV[CAN]{#2}%
\setcounter{PfMCNNumQ}{0}%
\setlength{\PfMLargeurQuestion}{\useKV[CAN]{CoefQ}\linewidth}\setlength{\PfMLargeurReponse}{\useKV[CAN]{CoefR}\linewidth}\setlength{\PfMLargeurJury}{\useKV[CAN]{CoefJ}\linewidth}%
- \let\exercice\ExoCANWrite\let\endexercice\endExoCANWrite%
\AddToHook{env/exercice/begin}{\setcounter{PfMAlea}{0}}%
\AddToHook{env/Maquette/end}{%
- \xdef\PfMAncienneGraine{\PfMChoisisGraineAlea{123456789}}%
+ \ifboolKV[CAN]{Graines}{%
+ \xdef\PfMAncienneGraine{\useKV[CAN]{Graine}}%
+ }{%
+ \xdef\PfMAncienneGraine{\PfMChoisisGraineAlea{123456789}}%
+ }%
\xdef\PfMCANTotalExo{\thePfMExo}%
\setbox\PfMSauvegardeBox\vbox{%
\PfMGraineAlea{\thePfMMaquette}%
+ \message{Numero Maquette A : \thePfMMaquette -- \PfMAncienneGraine}
\setcounter{PfMExo}{0}%
- \renewcommand{\arraystretch}{2}%
- \begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
- \hhline{~---}%
- \multicolumn{1}{c|}{}&\cellcolor{gray!15}\centering Question&\cellcolor{gray!15}\centering Réponse&\cellcolor{gray!15}\centering\arraybackslash Jury\\%
- \hline%
- \endhead%
+% \renewcommand{\arraystretch}{2}%
+% \begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
+% \hhline{~---}%
+% \multicolumn{1}{c|}{}&\cellcolor{gray!15}\centering Question&\cellcolor{gray!15}\centering Réponse&\cellcolor{gray!15}\centering\arraybackslash Jury\\%
+% \hline%
+% \endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
- \hline%
+ % \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&
+ \stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}
+ % &\IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.cancpt}{\input{\jobname-Ma\thePfMMaquette-Ex##1.cancpt}}{}&\\
+ % \hline%
}%
- \end{longtable}%
- \renewcommand{\arraystretch}{1}%
+ %\end{longtable}%
+ %\renewcommand{\arraystretch}{1}%
}%
\ifboolKV[Boulot]{CorrigeInverse}{%
\PfMPrepareCorrection{#1}%
\TikzCANCor{#2}%
\PfMAffichageCorrectionColonnes%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
\clearpage
\normalsize%
\TikzCAN%
\PfMGraineAlea{\thePfMMaquette}%
+ \message{Numero Maquette B : \thePfMMaquette}
\setcounter{PfMCNNumQ}{0}%
\setcounter{PfMExo}{0}%
\renewcommand{\arraystretch}{2}%
@@ -4860,13 +4545,16 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.cancpt}{\input{\jobname-Ma\thePfMMaquette-Ex##1.cancpt}}{}&\\
\hline%
}%
\end{longtable}%
\renewcommand{\arraystretch}{1}%
+ }
}{%
\PfMGraineAlea{\PfMAncienneGraine}%
+ \message{Numero Maquette C : \thePfMMaquette -- \PfMAncienneGraine}
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
\TikzCAN%
\setcounter{PfMCNNumQ}{0}%
\setcounter{PfMExo}{0}%
@@ -4877,28 +4565,40 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\IfFileExists{\jobname-Ma\thePfMMaquette-Ex##1.cancpt}{\input{\jobname-Ma\thePfMMaquette-Ex##1.cancpt}}{}&\\
\hline%
}%
\end{longtable}%
\renewcommand{\arraystretch}{1}%
+ }%
\ifboolKV[Boulot]{CorrigeFin}{%
- \ifboolKV[Boulot]{CorrigeInverse}{}{%
+% \ifboolKV[Boulot]{CorrigeInverse}{}{%
\clearpage
\PfMPrepareCorrection{#1}%
\TikzCANCor{#2}%
\PfMAffichageCorrectionColonnes%
+% }%
+ }{%
+ \ifboolKV[Boulot]{Alone}{}{%
+% \if at CAN
+ \ifnum\thepage<\fpeval{\thePfMMaquette*4+1}\relax
+ \xintFor* ##1 in{\xintSeq{1}{\fpeval{\thePfMMaquette*4+1-\thepage}}}\do{%
+ ~\clearpage%
+ }%
+ % \fi%
+ \fi%
+ }%
}%
- }{}%
}%
}%
}{%
\ifboolKV[Boulot]{FdR}{%
- % \input{PfMMaquetteFdR.tex}%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{%
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exerciceFdR\let\endexercice\endexerciceFdR%
\setKV[FdR]{#2}\TikzFdR%
}%
- \let\exercice\exerciceFdR\let\endexercice\endexerciceFdR%
\ifboolKV[Boulot]{AvecEntrainement}{%
\AddToHook{env/Maquette/end}[Haltere]{%
\PfMAffichageEntrainementColonnes%
@@ -4913,11 +4613,12 @@
}{}%
}{%
\ifboolKV[Boulot]{Contrat}{%
- % \input{PfMMaquetteContrat.tex}%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
- \setKV[Contrat]{#2}\TikzContrat%
- }%
- \let\exercice\exerciceContrat\let\endexercice\endexerciceContrat%
+ \ifboolKV[Boulot]{CorrigeSeul}{%
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exerciceContrat\let\endexercice\endexerciceContrat%
+ \setKV[Contrat]{#2}\TikzContrat%
+ }%
\ifboolKV[Boulot]{AvecEntrainement}{%
\AddToHook{env/Maquette/end}[Haltere]{%
\PfMAffichageEntrainementColonnes%
@@ -4932,7 +4633,6 @@
}{}%
}{%
\ifboolKV[Boulot]{Cours}{%
- % \input{PfMMaquetteCours.tex}%
\setKV[Cours]{#2}%
\TikzCours%
\let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
@@ -4945,7 +4645,6 @@
}{}%
}{%
\ifboolKV[Boulot]{RecapBrevet}{%
- % \input{PfMMaquetteRecapBrevet.tex}%
\setKV[RecapBrevet]{#2}%
\TikzRecapBrevet%
\let\exercice\ExerciceRecapBrevet\let\endexercice\endExerciceRecapBrevet%
@@ -4958,6 +4657,7 @@
}{}%
}{%
\ifboolKV[Boulot]{ParcoursPerso}{%
+ \RemoveFromHook{env/document/end}[AC]
\setKV[ParcoursPerso]{#2}%
\DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo,TypeMaq}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}%
\let\exercice\exerciceParcoursPerso\let\endexercice\endexerciceParcoursPerso%
@@ -4968,7 +4668,6 @@
}%
}{%
\ifboolKV[Boulot]{Parcours}{%
- % \input{PfMMaquetteParcours.tex}%
\ifboolKV[Boulot]{CorrigeSeul}{}{%
\setKV[Parcours]{#2}\TikzParcours%
}%
@@ -4987,11 +4686,12 @@
}{}%
}{%
\ifboolKV[Boulot]{PdT}{%
- % \input{PfMMaquettePdT.tex}%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{%
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exercicePdT\let\endexercice\endexercicePdT%
\setKV[PdT]{#2}\TikzPdT%
}%
- \let\exercice\exercicePdT\let\endexercice\endexercicePdT%
\ifboolKV[Boulot]{CorrigeFin}{%
\AddToHook{env/Maquette/after}[Correction]{%
\PfMPrepareCorrection{#1}%
@@ -5001,25 +4701,31 @@
}{}%
}{%
\ifboolKV[Boulot]{DM}{%
- % \input{PfMMaquetteDM.tex}%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{%
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exerciceDM\let\endexercice\endexerciceDM%
\setKV[DM]{#2}\TikzDM%
}%
- \let\exercice\exerciceDM\let\endexercice\endexerciceDM%
\ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \if at AssembleCorrections
+ \else
\PfMPrepareCorrection{#1}%
\TikzDMCor{#2}%
\PfMAffichageCorrectionColonnes%
+ \fi
}%
}{}%
}{%
\ifboolKV[Boulot]{Fiche}{%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
\setKV[Fiche]{#2}%
\TikzFiche%
}%
- \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
\ifboolKV[Boulot]{AvecEntrainement}{%
\AddToHook{env/Maquette/end}[Haltere]{%
\PfMAffichageEntrainementColonnes%
@@ -5050,14 +4756,6 @@
}%
}{%
\AddToHook{env/Maquette/after}[Correction]{%
-% \useKVdefault[Boulot]%
-% \setKV[Boulot]{#1}%
-% %%
-% \if at Dyslexie
-% \setKV[Boulot]{Dys}%
-% \fi
-% \PfMBasculeDys%
-% \setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
\if at AssembleCorrections
\else
\PfMPrepareCorrection{#1}%
@@ -5069,11 +4767,12 @@
}{}%
}{%
\ifboolKV[Boulot]{DS}{%
- % \input{PfMMaquetteDS.tex}%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exerciceDS\let\endexercice\endexerciceDS%
\setKV[DS]{#2}\TikzDS%
}%
- \let\exercice\exerciceDS\let\endexercice\endexerciceDS%
\ifboolKV[Boulot]{BaremeComplet}{%
\begin{center}
\TableauRecapitulatif
@@ -5091,21 +4790,24 @@
}{}%
}{%
\ifboolKV[Boulot]{IE}{%
- % \input{PfMMaquetteIE.tex}%
- \ifboolKV[Boulot]{CorrigeSeul}{}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{
+ \let\exercice\exerciceSauvegarde\let\endexercice\endexerciceSauvegarde%
+ }{%
+ \let\exercice\exerciceDS\let\endexercice\endexerciceDS%=DS
\setKV[IE]{#2}\TikzIE%
- }%
- \let\exercice\exerciceDS\let\endexercice\endexerciceDS%On garde exerciceDS
+ }%
\ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
+ \AddToHook{env/Maquette/after}[Correction]{%
+ \if at AssembleCorrections
+ \else
\PfMPrepareCorrection{#1}%
\TikzIECor{#2}%
\PfMAffichageCorrectionColonnes%
+ \fi
}%
}{}%
}{%
\ifboolKV[Boulot]{Kholle}{%
- % \input{PfMMaquetteKholle.tex}%
\setKV[Kholle]{#2}%
\TikzKholle%
\let\exercice\exerciceKholle\let\endexercice\endexerciceKholle%
@@ -5115,7 +4817,7 @@
\TikzKholleCor{#2}%
\TikzKholleCor{#2}%
\TikzKholleCor{#2}%
- \PfMAffichageCorrige%
+ \PfMAffichageCorrectionColonnes%
}%
}{}%
}%
@@ -5147,237 +4849,21 @@
}%
}{%
\ifboolKV[Boulot]{PixelArt}{%
- \setcounter{PfMLettresPixelArt}{0}%
- \setKV[PixelArt]{#2}%
- \setlength{\PfMLargeurTableauPixelArt}{\useKV[PixelArt]{LargeurTab}}%
- \ifboolKV[PixelArt]{Aleatoire}{%
- \StrLen{\useKV[PixelArt]{Lettres}}[\PfMNbLettres]%
- \ifboolKV[PixelArt]{Diversion}{%
- \xdef\PfMNbLettres{\fpeval{\PfMNbLettres+1}}%
- }{}%
- \ChoixSommet{\PfMNbLettres}{S}%
- \xdef\ListePourLesItemsAv{\pA}%
- \setcounter{PfMLettresPixelArt}{1}
- \xintFor* ##1 in{\xintSeq{2}{\PfMNbLettres}}\do{%
- \stepcounter{PfMLettresPixelArt}%
- \xdef\ListePourLesItemsAv{\ListePourLesItemsAv,\csname p\Alph{PfMLettresPixelArt}\endcsname}%
- }%
- \setsepchar{,}\ignoreemptyitems\readlist*\ListePourLesItems{\ListePourLesItemsAv}\reademptyitems%
- \setcounter{PfMLettresPixelArt}{0}%{-1}%
- \setKVdefault[PfMPixelArt]{ListeNombres={\ListePourLesItemsAv}}%
- }{}%
- \TikzPixelArt%
- \let\exercice\exercicePX\let\endexercice\endexercicePX%
- \AddToHook{env/Maquette/end}{%
- \StrLen{\useKV[PixelArt]{Lettres}}[\PfMNbLettres]%
- \ifboolKV[PixelArt]{Diversion}{%
- \xdef\PfMNbLettres{\fpeval{\PfMNbLettres+1}}%
- \PfMSolPixelArt*{\PfMListePourLesIntrus[1]}%
- }{}%
- \ifnum\thePfMLettresPixelArt=\fpeval{\PfMNbLettres}\relax
- \xdef\PfMListeExoPX{}%
- \xintFor* ##1 in{\xintSeq{1}{\PfMNbLettres}}\do{%
- \xdef\PfMListeExoPX{\PfMListeExoPX,##1}%
- }%
- \MelangeListe{\PfMListeExoPX}{\PfMNbLettres}%
- \xdef\PfMFooMelange{\faa}%
- \xdef\PfMListeCouleursAv{\useKV[PixelArt]{ListeCouleurs}}%
- \ifboolKV[PixelArt]{Diversion}{%
- \xdef\PfMListeCouleursAv{\PfMListeCouleursAv,\PfMListePourLesIntrus[2]}%
- }{}%
- \setsepchar{,}\ignoreemptyitems%
- \readlist*\ListePerm{\PfMFooMelange}%
- \readlist*\ListeCouleursPX{\PfMListeCouleursAv}%
- \reademptyitems%
-% Le nombre de couleurs est \ListeCouleursPXlen.\\
-% Le nombre de lettres est \PfMNbLettres\\
- \ifnum\fpeval{\ListeCouleursPXlen}=\fpeval{\PfMNbLettres}\relax
- \ifboolKV[PixelArt]{CoupureTableau}{%
- \begin{center}
- \quotient{\PfMNbLettres}{\useKV[PixelArt]{CoupeTableau}}%
- \modulo{\PfMNbLettres}{\useKV[PixelArt]{CoupeTableau}}%
- \xintFor* ##1 in{\xintSeq{1}{\the\intquotient}}\do{%
- \begin{tabular}{|*{\useKV[PixelArt]{CoupeTableau}}{>{\centering\arraybackslash}m{\PfMLargeurTableauPixelArt}|}}%
- \hline%
- \xintFor* ##2 in{\xintSeq{1}{\useKV[PixelArt]{CoupeTableau}}}\do{%
- \itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*(##1-1)+##2}]\PfMPermute%
- \itemtomacro\ListeCouleursPX[\PfMPermute]\Toto%
- \xdef\Titi{\Toto}%
- \cellcolor{\Titi}\xintifForLast{}{&}%\Titi
- }\\
- \hline%
- \xintFor* ##2 in{\xintSeq{1}{\useKV[PixelArt]{CoupeTableau}}}\do{%
- \itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*(##1-1)+##2}]\PfMPermute%
- \setcounter{PfCenumi}{\PfMPermute}
- \expandafter\xdef\csname PfMPXPourRetenir\endcsname{\csname PfMPXSolution\Alph{PfCenumi}\endcsname}%
- \PfMPXPourRetenir
- \xintifForLast{}{&}%
- }\\
- \hline
- \end{tabular}\par%
- }%
- \ifnum\remainder>0\relax
- \begin{tabular}{|*{\the\remainder}{>{\centering\arraybackslash}m{\PfMLargeurTableauPixelArt}|}}%
- \hline
- \xintFor* ##2 in{\xintSeq{1}{\the\remainder}}\do{%
- \itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*\the\intquotient+##2}]\PfMPermute%
- \itemtomacro\ListeCouleursPX[\PfMPermute]\Toto%
- \xdef\Titi{\Toto}%
- \cellcolor{\Titi}\xintifForLast{}{&}%
- }\\
- \hline
- \xintFor* ##2 in{\xintSeq{1}{\the\remainder}}\do{%
- \itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*\the\intquotient+##2}]\PfMPermute%
- \setcounter{PfCenumi}{\PfMPermute}
- \expandafter\xdef\csname PfMPXPourRetenir\endcsname{\csname PfMPXSolution\Alph{PfCenumi}\endcsname}%
- \PfMPXPourRetenir
- \xintifForLast{}{&}%
- }\\
- \hline
- \end{tabular}
- \fi
- \end{center}
- }{%
- \begin{center}
- \begin{tabular}{|*{\PfMNbLettres}{>{\centering\arraybackslash}m{\PfMLargeurTableauPixelArt}|}}
- \hline%
- \xintFor* ##1 in{\xintSeq{1}{\PfMNbLettres}}\do{%
- \itemtomacro\ListePerm[##1]\PfMPermute%
- \itemtomacro\ListeCouleursPX[\PfMPermute]\Toto%
- \xdef\Titi{\Toto}%
- \cellcolor{\Titi}\xintifForLast{}{&}
- }\\
- \hline
- \xintFor* ##1 in{\xintSeq{1}{\PfMNbLettres}}\do{%
- \itemtomacro\ListePerm[##1]\PfMPermute%
- \setcounter{PfCenumi}{\PfMPermute}
- \expandafter\xdef\csname PfMPXPourRetenir\endcsname{\csname PfMPXSolution\Alph{PfCenumi}\endcsname}%
- \PfMPXPourRetenir
- \xintifForLast{}{&}
- }\\
- \hline
- \end{tabular}
- \end{center}%
- }
- \begin{center}
- \PfMPixelArt[#2]{\useKV[PixelArt]{Fichier}}%
- \end{center}
- \else
- Le nombre de couleurs et le nombre de lettres ne correspondent pas.
- \fi
- \else
- \ifnum\thePfMLettresPixelArt<\fpeval{\PfMNbLettres}\relax
- Il manque des éléments de solutions.
- \else
- Il y a trop d'éléments de solutions.
- \fi
- \fi
- }%
+ %
}{%
\ifboolKV[Boulot]{QCM}{%
- \setKV[QCM]{#2}%
- \TikzQCM%
- \let\exercice\exerciceQCM\let\endexercice\endexerciceQCM%
- \ifboolKV[Boulot]{CorrigeFin}{%
- \AddToHook{env/Maquette/after}[Correction]{%
- \PfMPrepareCorrection{#1}%
- \TikzQCMCor{#2}%
- \PfMAffichageCorrectionColonnes%
- }%
- }{}%
+ %
}{%
\ifboolKV[Boulot]{JeuPuzzle}{%
- \let\exercice\ExoGBWrite\let\endexercice\endExoGBWrite%
- \AddToHook{env/Maquette/end}{%
- \clearpage
- \begin{tikzpicture}[remember picture,overlay]
- \coordinate (P) at (current page.north west);
- \node[anchor=north west,xshift=1cm,yshift=-1cm] at (P){\MPPuzzlePage};
- \coordinate[xshift=5.5cm,yshift=-5.65cm] (A1) at (P);
- \coordinate[xshift=14.5cm,yshift=-5.65cm] (A2) at (P);
- \coordinate[xshift=23.5cm,yshift=-5.65cm] (A3) at (P);
- \coordinate[xshift=5.5cm,yshift=-14.95cm] (A4) at (P);
- \coordinate[xshift=14.5cm,yshift=-14.95cm] (A5) at (P);
- \coordinate[xshift=23.5cm,yshift=-14.95cm] (A6) at (P);
- \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
- \node at (A##1) {\begin{minipage}{6.5cm}
- \input{\jobname-Ma\thePfMMaquette-Ex##1.gb}%
- \end{minipage}
- };
- }%
- \end{tikzpicture}
- }%
+ %
}{%
\ifboolKV[Boulot]{BigTen}{%
- %
- \setcounter{PfMLettresBigTen}{0}%
- \setKV[Fiche]{#2}%
- \setKV[BigTen]{#2}%
- \TikzFiche%
- \setlength{\PfMLargeurTableauBigTen}{\useKV[BigTen]{LargeurTab}}%
- \let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
- \AddToHook{env/Maquette/end}{%
- \xdef\PfMListeExoPX{}%
- \xintFor* ##1 in{\xintSeq{1}{\thePfMLettresBigTen}}\do{%
- \xdef\PfMListeExoPX{\PfMListeExoPX,##1}%
- }%
- \MelangeListe{\PfMListeExoPX}{\thePfMLettresBigTen}%
- \setsepchar{,}\ignoreemptyitems%
- \readlist*\ListePerm{\faa}%
- \reademptyitems%
- \begin{tcolorbox}
- \ifboolKV[BigTen]{CoupureTableau}{%
- \begin{center}
- \large
- \quotient{\thePfMLettresBigTen}{\useKV[BigTen]{CoupeTableau}}%
- \modulo{\thePfMLettresBigTen}{\useKV[BigTen]{CoupeTableau}}%
- \xintFor* ##1 in{\xintSeq{1}{\the\intquotient}}\do{%
- \begin{tabular}{*{\useKV[BigTen]{CoupeTableau}}{>{\centering\arraybackslash}m{\PfMLargeurTableauBigTen}}}%
-% \hline
- \xintFor* ##2 in{\xintSeq{1}{\useKV[BigTen]{CoupeTableau}}}\do{%
- \itemtomacro\ListePerm[\fpeval{\useKV[BigTen]{CoupeTableau}*(##1-1)+##2}]\PfMPermute%
- \setcounter{PfCenumi}{\PfMPermute}
- \expandafter\xdef\csname PfMBigTenPourRetenir\endcsname{\csname PfMBigTenSolution\Alph{PfCenumi}\endcsname}%
- \PfMBigTenPourRetenir
- \xintifForLast{}{&}%
- }\\
-% \ifnum\remainder=0\relax
-% \hline
-% \fi
- \end{tabular}\par%
- }%
- \ifnum\remainder>0\relax
- \begin{tabular}{*{\the\remainder}{>{\centering\arraybackslash}m{\PfMLargeurTableauBigTen}}}%
- \xintFor* ##2 in{\xintSeq{1}{\the\remainder}}\do{%
- \itemtomacro\ListePerm[\fpeval{\useKV[BigTen]{CoupeTableau}*\the\intquotient+##2}]\PfMPermute%
- \setcounter{PfCenumi}{\PfMPermute}
- \expandafter\xdef\csname PfMBigTenPourRetenir\endcsname{\csname PfMBigTenSolution\Alph{PfCenumi}\endcsname}%
- \PfMBigTenPourRetenir
- \xintifForLast{}{&}%
- }\\
-% \hline
- \end{tabular}
- \fi
- \end{center}
- }{%
- \begin{center}
- \large
- \begin{tabular}{*{\thePfMLettresBigTen}{>{\centering\arraybackslash}m{\PfMLargeurTableauBigTen}}}
-% \hline
- \xintFor* ##1 in{\xintSeq{1}{\thePfMLettresBigTen}}\do{%
- \itemtomacro\ListePerm[##1]\PfMPermute%
- \setcounter{PfCenumi}{\PfMPermute}
- \expandafter\xdef\csname PfMBigTenPourRetenir\endcsname{\csname PfMBigTenSolution\Alph{PfCenumi}\endcsname}%
- \PfMBigTenPourRetenir
- \xintifForLast{}{&}
- }\\
-% \hline
- \end{tabular}
- \end{center}%
- }%
- \end{tcolorbox}
- }%
- }{}%
+ %
+ }{%
+ \ifboolKV[Boulot]{Cartes}{%
+% %
+ }{}%
+ }%
}%
}%
}%
@@ -6186,7 +5672,7 @@
\setlist[Test,1]{%
leftmargin=*,
- label=\arabic*.,
+ label=\PfMLabelAuto,%\arabic*.,
before={%
\setcounter{PfMProfondeur}{1}%
\setcounter{PfMNbLignesFinitem}{0}
@@ -6194,7 +5680,7 @@
\def\Primeitem{\iffirstlegal\olditem\stepcounter{PfMNbLignesFinitem}%
\firstlegalfalse
\else
- \ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]>1\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]}\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]=1\relax\PfMPar\pointilles\fi\fi%
+ \ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]>1\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]}\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]=1\relax\PfMPar\pointilles\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]<0\relax\PfMBlocCfg{\fpeval{abs(\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem])}}\fi\fi\fi%
\olditem\stepcounter{PfMNbLignesFinitem}%
\fi
}% new, temporary defition of \item
@@ -6202,7 +5688,7 @@
\let\item\litem
},
after={%
- \ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]>0\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]}\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]=1\relax\PfMPar\pointilles\fi\fi%
+ \ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]>0\relax\PfMPar\Lignespointilles{\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]}\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]=1\relax\PfMPar\pointilles\else\ifnum\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem]<0\relax\PfMBlocCfg{\fpeval{abs(\PfMListeDesAjoutsdeLignes[\thePfMNbLignesFinitem])}}\fi\fi\fi%
% fill for final item in list
\let\litem\olditem% restore standard definition of \item
\let\item\olditem
@@ -6248,6 +5734,7 @@
\else%
\readlist*\PfMListeDesAjoutsdeLignesi{#2}%
\fi%
+ \reademptyitems
\begin{Test}[#1]%
#3
\end{Test}%
More information about the tex-live-commits
mailing list.