texlive[72757] Master/texmf-dist: profmaquette (3nov24)
commits+karl at tug.org
commits+karl at tug.org
Sun Nov 3 22:05:30 CET 2024
Revision: 72757
https://tug.org/svn/texlive?view=revision&revision=72757
Author: karl
Date: 2024-11-03 22:05:30 +0100 (Sun, 03 Nov 2024)
Log Message:
-----------
profmaquette (3nov24)
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 2024-11-03 21:05:21 UTC (rev 72756)
+++ trunk/Master/texmf-dist/tex/latex/profmaquette/ProfMaquette.sty 2024-11-03 21:05:30 UTC (rev 72757)
@@ -2,9 +2,9 @@
% 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/10/21}%
+\def\filedate{2024/11/03}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.99-i}%
+\def\fileversion{0.99-k}%
\let\PfMfileversion\fileversion%
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
@@ -54,12 +54,15 @@
\makeatother
%définition des clés
\RequirePackage{simplekv}%
-\setKVdefault[Boulot]{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]{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}%
\defKV[Boulot]{Colonnes=\setKV[Boulot]{CorrectionColonnes}}%
\defKV[Boulot]{EColonnes=\setKV[Boulot]{EntrainementColonnes}}%
-\setKVdefault[PixelArt]{Aleatoire=false,Landscape=false,CoupureTableau=false,Fichier={},Lettres={},Largeur={},Hauteur={},ListeCouleurs={},Solution=false,Theme=Essai,Arcenciel=false,LargeurTab=40pt}%
+\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]{ListeNombres=\setKV[PixelArt]{Aleatoire}\setsepchar{,}\ignoreemptyitems\readlist*\ListePourLesItems{#1}\reademptyitems}
+\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}%
@@ -71,13 +74,14 @@
\setKVdefault[Parcours]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice,Vertical=false,Plan=false,Court=false}%
\setKVdefault[Contrat]{Theme=Les nombres d\'ecimaux,Date=\today,Niveau=6,Classe={},Code={},NomExercice=Exercice}%
\setKVdefault[OlympiadesAPMEP]{Theme=Les nombres d\'ecimaux,Bandeau=false}%
-\setKVdefault[ParcoursPerso]{Fichier={}}%
+\setKVdefault[ParcoursPerso]{Fichier={},RectoVerso=false}%
\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}%
+\setKVdefault[CAN]{Date=\today,Niveau=6,Duree=9,CoefQ=0.4,CoefR=0.35,CoefJ=0.1,Logos=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[ClesExercices]{TitreSolution=\setKV[ClesExercices]{TitreSol}}%
@@ -149,6 +153,7 @@
}%
}%
% Definition de longueurs
+\newlength\PfMLargeurTableauBigTen%
\newlength\PfMLargeurTableauPixelArt%
\newlength\PfMLargeurSchemaParcours%
\newlength\PfMRayonSchemaParcours%
@@ -552,7 +557,11 @@
\ifnum\ListeValeursRetenueslen=1\relax%
\xdef#5{\PfMMixFoo}%
\else%
- \MelangeListe{\PfMMixFoo}{#1}%
+ \ifnum#1=1\relax
+ \MelangeListe*{\PfMMixFoo}{#1}%
+ \else
+ \MelangeListe{\PfMMixFoo}{#1}%
+ \fi
\xdef#5{\faa}%
\fi%
\fi%
@@ -580,7 +589,11 @@
\readlist*\ListeValeursRetenues{\PfMMixFoo}%
}%
\ifnum\ListeValeursRetenueslen>1\relax%
- \MelangeListe{\PfMMixFoo}{#1}%
+ \ifnum#1=1\relax
+ \MelangeListe*{\PfMMixFoo}{#1}%
+ \else
+ \MelangeListe{\PfMMixFoo}{#1}%
+ \fi
\xdef#4{\faa}%
\else%
\xdef#4{\PfMMixFoo}%
@@ -1212,7 +1225,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-##1}}:\fi}~\input{\jobname-Ma\thePfMMaquette-Ex##1.sol}\par\goodbreak}{}%
+ \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}{}%
}%
}{%
\setcounter{PfMExoSol}{0}%
@@ -1505,6 +1518,19 @@
{\scriptsize\sffamily \useKV[ClesExercices]{Source}};
}{}%
}%
+\NewDocumentCommand{\PfMAffichageSourceQCM}{}{%
+ \ifboolKV[ClesExercices]{AffichageSource}{%
+ \node[%
+ %fill=tcbcolback,
+ anchor=east,
+ yshift=1em,
+ xshift=-\kvtcb at rightlower,%-10pt,
+ text=PfMColSrc,
+ ]
+ at (frame.south east)
+ {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
+ }{}%
+}%
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -2255,6 +2281,12 @@
\begin{center}
\Large Sujet \useKV[CAN]{Niveau}\hspace{0.15\linewidth}\useKV[CAN]{Date}
\end{center}
+
+ \bigskip
+
+ \begin{center}
+ \ifboolKV[CAN]{Logos}{\useKV[CAN]{Logo}}{}%
+ \end{center}
\clearpage%
}%
%\makeatother
@@ -2878,6 +2910,8 @@
\begin{tcolorbox}[colback=colLogo]
\begin{Dispo}*{\normalsize\logoapmep{\scale at logo}}
\Large\sffamily \useKV[OlympiadesAPMEP]{Theme}
+
+ (Sujet)
\end{Dispo}
\end{tcolorbox}%
}%
@@ -3847,37 +3881,52 @@
\NewDocumentCommand\PfMRecapitulatif{mm}{%
\setKV[Boulot]{#1}%
+ \setKV[ParcoursPerso]{#2}%
\setcounter{PfMRetiensMapourPP}{\thePfMMaquette}%
- \DTLforeach*{dataperso}{\Prenom=PrenomEleve,\Nom=NomEleve,\RecapListeExo=ListeExo}{%
- \ifboolKV[Boulot]{Dys}{%
- \begin{Maquette}[Fiche,Dys]{#2,Code=\normalsize\Prenom~\Nom}%
- }{%
- \begin{Maquette}[Fiche]{#2,Code=\normalsize\Prenom~\Nom}%
- }%
- \readlist*\ListeExercices{\RecapListeExo}%
- \ifnum\fpeval{\ListeExerciceslen}=1\relax{}
- \setKVdefault[ClesExercices]{Numerote=false}
- \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[1].tex}%
- \setKVdefault[ClesExercices]{Numerote}
- \else
- \foreach\i in{1,...,\ListeExerciceslen}{%
- \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].tex}%
- }
- \fi
- \ifnum\thePfMCorrigeParcoursPerso=1\relax%
- % \RecapitulatifCorrection{#2}%
- \clearpage
- \TikzFicheCor{#1,Code=\normalsize\Prenom~\Nom}%
+ \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}}%
+ }%
+ }%
+ \fi%
+ \PfMBasculeDys%
\readlist*\ListeExercices{\RecapListeExo}%
- \ifnum\fpeval{\ListeExerciceslen}=1\relax{}
- \textbf{Corrigé de l'exercice} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[1].sol}\par\goodbreak%
- \else
+ \ifnum\fpeval{\ListeExerciceslen}=1\relax{}%
+ \setKVdefault[ClesExercices]{Numerote=false}%
+ \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[1].tex}%
+ \setKVdefault[ClesExercices]{Numerote}%
+ \else%
\foreach\i in{1,...,\ListeExerciceslen}{%
- \textbf{Corrigé de l'exercice \i} : \input{\jobname-Ma\thePfMMaquette-PPEx\ListeExercices[\i].sol}\par\goodbreak%
+ \input{\jobname-Ma\thePfMRetiensMapourPP-PPEx\ListeExercices[\i].tex}%
}%
\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}{%
+ \ifodd\fpeval{\PfMNumeroPageArriveePP-\PfMNumeroPageDepartPP+1}\relax%
+ \clearpage\phantom{t}\clearpage%
\fi%
- \end{Maquette}%
+ }{}%
}%
}%
@@ -4106,8 +4155,6 @@
\newlength\PfMAMCBarreFraction
\makeatletter
-
-
\setKVdefault[ListeReponses]{Lettre=x,Unites=false}
\defKV[ListeReponses]{Unite=\setKV[ListeReponses]{Unites}\DeclareSIUnit{\TempoAMC}{#1}}
@@ -4257,7 +4304,7 @@
\fi
\end{question}
\fi
- }{}%
+ }{}%
}%
\makeatother
@@ -4311,17 +4358,129 @@
%%%%%%%%%%%%%%%%% 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%
-}%
+%\NewDocumentCommand\PfMPXCount{}{%
+% \stepcounter{PfMLettresPixelArt}%
+% \xdef\PfMCountPX{\csname p\Alph{PfMLettresPixelArt}\endcsname}%
+% \PfMCountPX%
+%}%
\newcounter{PfMLettresPixelArt}
@@ -4498,23 +4657,20 @@
\end{center}
}%
-\newcounter{PfMPX}[PfMMaquette]
-\setcounter{PfMPX}{0}
+%\newcounter{PfMPX}[PfMMaquette]
+%\setcounter{PfMPX}{0}
-\NewDocumentCommand\PfMSolPixelArt{m}{%
+\NewDocumentCommand\PfMSolPixelArt{sm}{%
\ifboolKV[Boulot]{PixelArt}{%
\stepcounter{PfMLettresPixelArt}%
+ \IfBooleanTF{#1}{}{
\ifboolKV[PixelArt]{Aleatoire}{%
- \hfill\textbf{Lettre~\ListePourLesItems[\fpeval{\thePfMLettresPixelArt+1}]}%
- %Num Lettre = \thePfMLettresPixelArt
+ \hfill\textbf{Lettre~\ListePourLesItems[\thePfMLettresPixelArt]}%
}{%
\hfill\textbf{Lettre~\Alph{PfMLettresPixelArt}}%
}%
- \ifdef{\ListeSolAv}{%
- \xdef\ListeSolAv{\ListeSolAv,#1}%
- }{%
- \xdef\ListeSolAv{#1}%
}%
+ \expandafter\xdef\csname PfMPXSolution\Alph{PfMLettresPixelArt}\endcsname{#2}%
}{}%
}%
@@ -4531,6 +4687,18 @@
}{}
%%% 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 %%%%%%%
@@ -4605,6 +4773,7 @@
\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}}}}{}%
@@ -4638,7 +4807,7 @@
\TikzOlympiadesAPMEP{#2}%
\bigskip
}{%
- \xdef\PfMTitreAPMEP{\useKV[OlympiadesAPMEP]{Theme}}
+ \xdef\PfMTitreAPMEP{\noexpand\useKV[OlympiadesAPMEP]{Theme}}
\chapter{\PfMTitreAPMEP}
}
\ifboolKV[Boulot]{CorrigeFin}{%
@@ -4668,7 +4837,7 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
@@ -4691,7 +4860,7 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
@@ -4708,7 +4877,7 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMMaquette-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ma\thePfMMaquette-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
@@ -4789,9 +4958,8 @@
}{}%
}{%
\ifboolKV[Boulot]{ParcoursPerso}{%
- % \input{PfMMaquetteParcoursPerso.tex}%
\setKV[ParcoursPerso]{#2}%
- \DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}%
+ \DTLloaddb[noheader,keys={PrenomEleve,NomEleve,ListeExo,TypeMaq}]{dataperso}{\useKV[ParcoursPerso]{Fichier}.csv}%
\let\exercice\exerciceParcoursPerso\let\endexercice\endexerciceParcoursPerso%
\ifboolKV[Boulot]{CorrigeFin}{\setcounter{PfMCorrigeParcoursPerso}{1}}{}%
\setcounter{PfMExo}{0}%
@@ -4979,38 +5147,44 @@
}%
}{%
\ifboolKV[Boulot]{PixelArt}{%
- \setcounter{PfMLettresPixelArt}{0}
- \xdef\ListeSolAv{}%
+ \setcounter{PfMLettresPixelArt}{0}%
\setKV[PixelArt]{#2}%
\setlength{\PfMLargeurTableauPixelArt}{\useKV[PixelArt]{LargeurTab}}%
\ifboolKV[PixelArt]{Aleatoire}{%
- \setcounter{PfMLettresPixelArt}{1}%
\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}{-1}%
+ \setcounter{PfMLettresPixelArt}{0}%{-1}%
\setKVdefault[PfMPixelArt]{ListeNombres={\ListePourLesItemsAv}}%
}{}%
\TikzPixelArt%
\let\exercice\exercicePX\let\endexercice\endexercicePX%
\AddToHook{env/Maquette/end}{%
- \StrLen{\useKV[PixelArt]{Lettres}}[\PfMNbLettres]
- \setsepchar{,}\ignoreemptyitems
- \readlist*\ListeSolPX{\ListeSolAv}%
- \reademptyitems
- \ifnum\fpeval{\ListeSolPXlen}=\fpeval{\PfMNbLettres}\relax
+ \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}{\ListeSolPXlen}}\do{%
+ \xintFor* ##1 in{\xintSeq{1}{\PfMNbLettres}}\do{%
\xdef\PfMListeExoPX{\PfMListeExoPX,##1}%
}%
- \MelangeListe{\PfMListeExoPX}{\ListeSolPXlen}%
+ \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}%
@@ -5020,8 +5194,8 @@
\ifnum\fpeval{\ListeCouleursPXlen}=\fpeval{\PfMNbLettres}\relax
\ifboolKV[PixelArt]{CoupureTableau}{%
\begin{center}
- \quotient{\ListeSolPXlen}{\useKV[PixelArt]{CoupeTableau}}%
- \modulo{\ListeSolPXlen}{\useKV[PixelArt]{CoupeTableau}}%
+ \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%
@@ -5034,8 +5208,10 @@
\hline%
\xintFor* ##2 in{\xintSeq{1}{\useKV[PixelArt]{CoupeTableau}}}\do{%
\itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*(##1-1)+##2}]\PfMPermute%
- \itemtomacro\ListeSolPX[\PfMPermute]\Toto%
- \Toto\xintifForLast{}{&}%\Toto
+ \setcounter{PfCenumi}{\PfMPermute}
+ \expandafter\xdef\csname PfMPXPourRetenir\endcsname{\csname PfMPXSolution\Alph{PfCenumi}\endcsname}%
+ \PfMPXPourRetenir
+ \xintifForLast{}{&}%
}\\
\hline
\end{tabular}\par%
@@ -5047,14 +5223,16 @@
\itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*\the\intquotient+##2}]\PfMPermute%
\itemtomacro\ListeCouleursPX[\PfMPermute]\Toto%
\xdef\Titi{\Toto}%
- \cellcolor{\Titi}\xintifForLast{}{&}%\Titi
+ \cellcolor{\Titi}\xintifForLast{}{&}%
}\\
\hline
\xintFor* ##2 in{\xintSeq{1}{\the\remainder}}\do{%
\itemtomacro\ListePerm[\fpeval{\useKV[PixelArt]{CoupeTableau}*\the\intquotient+##2}]\PfMPermute%
- \itemtomacro\ListeSolPX[\PfMPermute]\Toto%
- \Toto\xintifForLast{}{&}%\Toto
- }\\
+ \setcounter{PfCenumi}{\PfMPermute}
+ \expandafter\xdef\csname PfMPXPourRetenir\endcsname{\csname PfMPXSolution\Alph{PfCenumi}\endcsname}%
+ \PfMPXPourRetenir
+ \xintifForLast{}{&}%
+ }\\
\hline
\end{tabular}
\fi
@@ -5061,9 +5239,9 @@
\end{center}
}{%
\begin{center}
- \begin{tabular}{|*{\ListeSolPXlen}{>{\centering\arraybackslash}m{\PfMLargeurTableauPixelArt}|}}
+ \begin{tabular}{|*{\PfMNbLettres}{>{\centering\arraybackslash}m{\PfMLargeurTableauPixelArt}|}}
\hline%
- \xintFor* ##1 in{\xintSeq{1}{\ListeSolPXlen}}\do{%
+ \xintFor* ##1 in{\xintSeq{1}{\PfMNbLettres}}\do{%
\itemtomacro\ListePerm[##1]\PfMPermute%
\itemtomacro\ListeCouleursPX[\PfMPermute]\Toto%
\xdef\Titi{\Toto}%
@@ -5070,10 +5248,12 @@
\cellcolor{\Titi}\xintifForLast{}{&}
}\\
\hline
- \xintFor* ##1 in{\xintSeq{1}{\ListeSolPXlen}}\do{%
+ \xintFor* ##1 in{\xintSeq{1}{\PfMNbLettres}}\do{%
\itemtomacro\ListePerm[##1]\PfMPermute%
- \itemtomacro\ListeSolPX[\PfMPermute]\Toto%
- \Toto\xintifForLast{}{&}
+ \setcounter{PfCenumi}{\PfMPermute}
+ \expandafter\xdef\csname PfMPXPourRetenir\endcsname{\csname PfMPXSolution\Alph{PfCenumi}\endcsname}%
+ \PfMPXPourRetenir
+ \xintifForLast{}{&}
}\\
\hline
\end{tabular}
@@ -5086,7 +5266,7 @@
Le nombre de couleurs et le nombre de lettres ne correspondent pas.
\fi
\else
- \ifnum\fpeval{\ListeSolPXlen}<\fpeval{\PfMNbLettres}\relax
+ \ifnum\thePfMLettresPixelArt<\fpeval{\PfMNbLettres}\relax
Il manque des éléments de solutions.
\else
Il y a trop d'éléments de solutions.
@@ -5093,7 +5273,114 @@
\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}
+ }%
+ }{}%
+ }%
+ }%
+ }%
}%
}%
}%
@@ -5849,7 +6136,11 @@
\ifboolKV[Boulot]{CAN}{%
\setKV[ClesExercices]{NbQuestions=1}%
}{%
- \setKV[ClesExercices]{NbQuestions=#1}%
+ \ifboolKV[Boulot]{QCM}{%
+ \setKV[ClesExercices]{NbQuestions=1}%
+ }{%
+ \setKV[ClesExercices]{NbQuestions=#1}%
+ }%
}%
}%
\makeatletter
@@ -6349,4 +6640,46 @@
Lecturecsv("#1");
\end{mplibcode}
\fi%
-}%
\ No newline at end of file
+}%
+
+% Puzzle Page
+\NewDocumentCommand\MPPuzzlePage{}{%
+ \begin{Geometrie}[Cadre="aucun"]
+ pair A,B,C,D,M[],N[],K[],L[],O[];
+ A=(0,0);
+ B-A=u*(27,0);
+ C-B=u*(0,-18.6);
+ D-C=A-B;
+ M1=1/3[A,B];
+ M2=2/3[A,B];
+ M3=1/3[D,C];
+ M4=2/3[D,C];
+ N1=1/2[A,D];
+ N3=1/2[B,C];
+ trace polygone(A,B,C,D);
+ K1=1/6[N1,N3]+u*(-0.3,0);
+ K2=1/6[N1,N3]+u*(0.3,0);
+ K3=iso(K1,K2)+u*(0,0.3);
+ K4=3/6[N1,N3]+u*(-0.3,0);
+ K5=3/6[N1,N3]+u*(0.3,0);
+ K6=iso(K4,K5)+u*(0,0.3);
+ K7=5/6[N1,N3]+u*(-0.3,0);
+ K8=5/6[N1,N3]+u*(0.3,0);
+ K9=iso(K7,K8)+u*(0,0.3);
+ trace N3--arccercle(K8,K7,K9)--arccercle(K5,K4,K6)--arccercle(K2,K1,K3)--N1;
+ L1=1/4[M1,M3]+u*(0,0.3);
+ L2=1/4[M1,M3]+u*(0,-0.3);
+ L3=iso(L1,L2)+u*(0.3,0);
+ L4=3/4[M1,M3]+u*(0,0.3);
+ L5=3/4[M1,M3]+u*(0,-0.3);
+ L6=iso(L4,L5)+u*(-0.3,0);
+ trace M3--reverse(arccercle(L4,L5,L6))--arccercle(L2,L1,L3)--M1;
+ O1=1/4[M2,M4]+u*(0,0.3);
+ O2=1/4[M2,M4]+u*(0,-0.3);
+ O3=iso(O1,O2)+u*(-0.3,0);
+ O4=3/4[M2,M4]+u*(0,0.3);
+ O5=3/4[M2,M4]+u*(0,-0.3);
+ O6=iso(O4,O5)+u*(0.3,0);
+ trace M4--arccercle(O5,O4,O6)--reverse(arccercle(O1,O2,O3))--M2;
+ \end{Geometrie}
+}
\ No newline at end of file
More information about the tex-live-commits
mailing list.