summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profmaquette/latex/ProfMaquette.sty')
-rw-r--r--macros/latex/contrib/profmaquette/latex/ProfMaquette.sty482
1 files changed, 290 insertions, 192 deletions
diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
index 2e5b5eeec2..e5c5e2ca36 100644
--- a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
+++ b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
@@ -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/01/13}%
+\def\filedate{2024/01/21}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.86}%
+\def\fileversion{0.87}%
\let\PfMfileversion\fileversion%
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
@@ -30,19 +30,13 @@
% mettre un option Dys
\RequirePackage{ragged2e}%
-%\RequirePackage{scalefnt}%
-% Define our simple macro \getfontsize
-%\bgroup%
-%\catcode`@=11%
-%\gdef\getfontsize{\f@size}%
-%\egroup%
+
\makeatletter
-%\def\GetPointSize{\@ptsize}
\gdef\PfMFontSize{\@ptsize}
\makeatother
%définition des clés
\RequirePackage{simplekv}%
-\setKVdefault[Boulot]{Dys=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,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,Epaisseur=0pt,AllDirect=false,AllPouce=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé
+\setKVdefault[Boulot]{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,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,Epaisseur=0pt,AllDirect=false,AllPouce=false,VersSolution=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé
\defKV[Boulot]{Colonnes=\setKV[Boulot]{CorrectionColonnes}}%
\setKVdefault[Cours]{Couleur=Crimson,Theme=Trace écrite,NomExercice=Exercice}%
\setKVdefault[DM]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname}%
@@ -59,7 +53,7 @@
\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lycée
du Hainaut (Valenciennes),NomEleve=Albert Einstein,CR=false}%
\setKVdefault[CAN]{Date=\today,Niveau=6,Duree=9,CoefQ=0.4,CoefR=0.35,CoefJ=0.1}%
-\setKVdefault[ClesExercices]{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,Cadres=false,TitreSol=false}%
+\setKVdefault[ClesExercices]{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,Cadres=false,TitreSol=false,NonUtilise=false,Profile=false}%
\defKV[ClesExercices]{TitreSolution=\setKV[ClesExercices]{TitreSol}}%
\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}%
\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}%
@@ -108,6 +102,9 @@
\newlength\PfMLargeurJury%
\newlength\PfMEspaceAvantLignes%
\newlength\PfMEspaceApresLignes%
+\newlength\PfMLargeurComp
+\newlength\CRRHauteur
+\setlength{\CRRHauteur}{10cm}
\setlength{\PfMHauteurAppreciation}{5cm}%
\setlength{\PfMHauteurRemarque}{5cm}%
\setlength{\PfMEspaceAvantLignes}{1em}
@@ -177,9 +174,99 @@
}%
}{}%
+%% Gestion de l'affichage ou pas des item (Pour élèves PAP) par exemple
+% Code by egreg : https://tex.stackexchange.com/questions/627250/hide-specific-item-in-a-list
+\ExplSyntaxOn
+
+\NewDocumentCommand{\cacheitem}{}
+ {
+ \PfMitem_hide:
+ }
+
+\NewDocumentCommand{\PfMhideitems}{}
+ {
+ \bool_set_true:N \l_PfMitem_hide_bool
+ }
+\NewDocumentCommand{\PfMshowitems}{}
+ {
+ \bool_set_false:N \l_PfMitem_hide_bool
+ }
+
+\bool_new:N \l_PfMitem_hide_bool
+
+\cs_new_protected:Nn \PfMitem_hide:
+ {
+ \bool_if:NT \l_PfMitem_hide_bool
+ {
+ \peek_regex_replace_once:nn
+ % search \item followed by anything until finding
+ % \item or \hideit or \end{<current environment>}
+ { \c{item}.*?(\c{item}|\c{cacheitem}|\c{end}\{\u{@currenvir}\}) }
+ % replace by the matching item
+ { \1 }
+ }
+ }
+
+\ExplSyntaxOff
+
\definecolor{SLCP}{HTML}{00B51A}%
\colorlet{Evidence}{SLCP}%
+\NewDocumentCommand\RepartirEffectifTotal{mmm}{%
+ % #1 valeur de l'effectif total
+ % #2 nombre de valeurs à obtenir
+ % #3 écart acceptable :) autour de la moyenen
+ \xdef\PfCSLEffectifs{}%
+ \xdef\PfCValeurMoyenneTemp{\fpeval{floor(#1/#2)}}%
+ \xdef\PfCRetiensRETSomme{}%
+ \xdef\PfCRetiensRETSommeTotale{0}%
+ \xintFor* ##1 in {\xintSeq{1}{\fpeval{#2-1}}}\do{%
+ \xdef\PfCSLDelta{\fpeval{randint(0,#3)}}%
+ \ifodd##1\relax%
+ \xdef\PfCSLEffectifs{\PfCSLEffectifs \fpeval{\PfCValeurMoyenneTemp+\PfCSLDelta},}%
+ \xdef\PfCRetiensRETSomme{\PfCRetiensRETSomme-\fpeval{\PfCValeurMoyenneTemp+\PfCSLDelta}}%
+ \xdef\PfCRetiensRETSommeTotale{\PfCRetiensRETSommeTotale+\fpeval{\PfCValeurMoyenneTemp+\PfCSLDelta}}%
+ \else%
+ \xdef\PfCSLEffectifs{\PfCSLEffectifs \fpeval{\PfCValeurMoyenneTemp-\PfCSLDelta},}%
+ \xdef\PfCRetiensRETSomme{\PfCRetiensRETSomme-\fpeval{\PfCValeurMoyenneTemp-\PfCSLDelta}}%
+ \xdef\PfCRetiensRETSommeTotale{\PfCRetiensRETSommeTotale+\fpeval{\PfCValeurMoyenneTemp-\PfCSLDelta}}%
+ \fi%
+ }%
+ % 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}{%
+ % #1 valeur de l'effectif total
+ % #2 nombre de valeurs à obtenir
+ % #3 le scale de la valeur de base pour calculer le delta
+ \xdef\PfCCPEffectifs{}%
+ \xdef\PfCValeurMoyenneTemp{\fpeval{floor(#1/#2)}}%
+ \xdef\PfCRetiensRETSomme{#1}%
+ \xdef\PfCRetiensRETSommeTotale{0}%
+ \xintFor* ##1 in {\xintSeq{1}{\fpeval{#2-1}}}\do{%
+ %La valeur moyenne ##1 est \PfCValeurMoyenneTemp\\
+ %On cherche entre \fpeval{-\PfCValeurMoyenneTemp+1} et \fpeval{\PfCValeurMoyenneTemp-1}\\
+ \xdef\PfCCPDelta{\fpeval{randint(-floor(#3*\PfCValeurMoyenneTemp)+1,floor(#3*\PfCValeurMoyenneTemp)-1)}}%
+ %Le delta ##1 est \PfCCPDelta\\
+ \xdef\PfCCPValeurRetenue{\fpeval{\PfCValeurMoyenneTemp+\PfCCPDelta}}%
+ %La valeur retenue ##1 est \PfCCPValeurRetenue\\
+ \xdef\PfCCPEffectifs{\PfCCPEffectifs \PfCCPValeurRetenue,}%
+ \xdef\PfCRetiensRETSomme{\fpeval{\PfCRetiensRETSomme-\PfCCPValeurRetenue}}%
+ \xdef\PfCValeurMoyenneTemp{\fpeval{floor(\PfCRetiensRETSomme/(#2-##1))}}%
+ \xdef\PfCRetiensRETSommeTotale{\PfCRetiensRETSommeTotale+\PfCCPValeurRetenue}%
+ %La somme totale ##1 est \fpeval{\PfCRetiensRETSommeTotale}\\
+ }%
+% % 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
% afin de permettre d'utiliser le même exercice.
% Extraire des sommets
@@ -534,6 +621,45 @@
\end{enumerate}
}{}%
+\newcount\PfManp%
+\newcount\PfMbnp%
+\newcount\PfMcnp%
+\newcount\PfMdnp%
+
+\NewDocumentCommand\DeterminerNonPremiersEntreEuxInf{m}{%#1 : le nombre entier \`a tester
+ \xdef\RetiensNonPremiersEntreEuxInf{}%
+ \xdef\RetiensPremiersEntreEuxInf{}%
+ \PfManp=#1%
+ \PfMbnp=2%
+ \PfMcnp=0%
+ \PfMdnp=0%
+ \whiledo{\PfMbnp<\PfManp}{%
+ \PGCD{\the\PfManp}{\the\PfMbnp}{}%
+ \ifnum\pgcd>1\relax
+ \PfMcnp=\numexpr\PfMcnp+1\relax
+ \ifnum\PfMcnp=1\relax
+ \xdef\RetiensNonPremiersEntreEuxInf{\the\PfMbnp}%
+ \else%
+ \xdef\RetiensNonPremiersEntreEuxInf{\RetiensNonPremiersEntreEuxInf,\the\PfMbnp}%
+ \fi%
+ \else
+ \PfMdnp=\numexpr\PfMdnp+1\relax
+ \ifnum\PfMdnp=1\relax
+ \xdef\RetiensPremiersEntreEuxInf{\the\PfMbnp}%
+ \else%
+ \xdef\RetiensPremiersEntreEuxInf{\RetiensPremiersEntreEuxInf,\the\PfMbnp}%
+ \fi%
+ \fi%
+ \PfMbnp=\numexpr\PfMbnp+1%
+ }%
+ \ifnum\PfMcnp=0\relax%
+ \xdef\RetiensNonPremiersEntreEuxInf{1}%
+ \fi%
+ \ifnum\PfMdnp=0\relax%
+ \xdef\RetiensPremiersEntreEuxInf{1}%
+ \fi%
+}%
+
% Définitions pour les compétences
\NewDocumentCommand\Competences{O{3}m}{%
\setsepchar[*]{/}\ignoreemptyitems%
@@ -555,8 +681,6 @@
\]
}%
-\newlength\PfMLargeurComp
-
\def\Buildtabcompetences#1#2{%
\setlength{\PfMLargeurComp}{\fpeval{0.85-0.05*#1}\linewidth-\fpeval{2*(#1-3)}\tabcolsep}%
\[\begin{tabular}{|p{\PfMLargeurComp}|*{#1}{>{\centering\arraybackslash}p{0.05\linewidth}|}}%
@@ -619,14 +743,14 @@
\def\endIndiceWrite{\immediate\closeout\verbatim@out\@esphack}
\makeatother
-\def\SolutionNow{\textbf{Correction de l'exercice --}\par\nopagebreak\setcounter{PfMExoSol}{\thePfMExo}\setcounter{PfMAlea}{0}}
-\def\endSolutionNow{\par\goodbreak}
+\def\SolutionNow{\textbf{Correction de l'exercice --}\par\nopagebreak\setcounter{PfMExoSol}{\thePfMExo}\setcounter{PfMAlea}{0}\PfMAffichageHideItemSolution}
+\def\endSolutionNow{\par\goodbreak\PfMshowitems}
-\def\ReponseNow{\textbf{Réponse(s) de l'exercice --}\par\nopagebreak}
-\def\endReponseNow{\par\goodbreak}
+\def\ReponseNow{\textbf{Réponse(s) de l'exercice --}\par\nopagebreak\PfMAffichageHideItemSolution}
+\def\endReponseNow{\par\goodbreak\PfMshowitems}
-\def\IndiceNow{\textbf{Indice(s) --}\par\nopagebreak}
-\def\endIndiceNow{\par\goodbreak}
+\def\IndiceNow{\textbf{Indice(s) --}\par\nopagebreak\PfMAffichageHideItemSolution}
+\def\endIndiceNow{\par\goodbreak\PfMshowitems}
\NewDocumentEnvironment{Solution}{}{}{}%
\NewDocumentEnvironment{Reponse}{}{}{}%
@@ -721,18 +845,21 @@
\xintFor* ##1 in{\xintSeq{1}{\PfMCANTotalExo}}\do{%
\setcounter{PfMExoSol}{##1}%
\setcounter{PfMAlea}{0}%
- \IfFileExists{\jobname-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~##1 :\fi}~\input{\jobname-Ex##1.sol}\par\goodbreak}{}%
+ \IfFileExists{\jobname-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~\ref{page-\thePfMMaquette-##1} :\fi}~\input{\jobname-Ex##1.sol}\par\goodbreak}{}%
}%
}{%
- \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
- \setcounter{PfMExoSol}{##1}%
- \setcounter{PfMAlea}{0}%
- \IfFileExists{\jobname-Ex##1.sol}{\textbf{Corrigé de l'exercice\ifnum\thePfMExo=1\relax\else~##1\fi\PfMAffichageTitreSolution}\par\nopagebreak\input{\jobname-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ex##1.rep}{\textbf{Réponse(s) seule(s) de l'exercice\ifnum\thePfMExo=1\relax\else~##1\fi}\par\nopagebreak\input{\jobname-Ex##1.rep}\par\goodbreak}{%
- \IfFileExists{\jobname-Ex##1.cdp}{\textbf{Indice(s) pour l'exercice\ifnum\thePfMExo=1\relax\else~##1\fi}\par\nopagebreak\input{\jobname-Ex##1.cdp}\par\goodbreak}{}
+ \setcounter{PfMExoSol}{0}%
+ \xintFor* ##1 in{\xintSeq{1}{\thePfMExo}}\do{%
+ \refstepcounter{PfMExoSol}%{##1}%
+ \label{pagesol-\thePfMMaquette-\thePfMExoSol}
+ \setcounter{PfMAlea}{0}%
+ \IfFileExists{\jobname-Ex##1.sol}{\PfMAffichageHideItemSolution\textbf{Corrigé de l'exercice\ifnum\thePfMExo=1\relax\else~\ref{page-\thePfMMaquette-##1}\fi\PfMAffichageTitreSolution}\par\nopagebreak\input{\jobname-Ex##1.sol}\par\goodbreak}{\IfFileExists{\jobname-Ex##1.rep}{\PfMAffichageHideItemSolution\textbf{Réponse(s) seule(s) de l'exercice\ifnum\thePfMExo=1\relax\else~\ref{page-\thePfMMaquette-##1}\fi}\par\nopagebreak\input{\jobname-Ex##1.rep}\par\goodbreak}{%
+ \IfFileExists{\jobname-Ex##1.cdp}{\PfMAffichageHideItemSolution\textbf{Indice(s) pour l'exercice\ifnum\thePfMExo=1\relax\else~\ref{page-\thePfMMaquette-##1}\fi}\par\nopagebreak\input{\jobname-Ex##1.cdp}\par\goodbreak}{}%
+ }%
}%
+ \PfMshowitems%
}%
}%
- }%
}%
%%%%%%%% BAREME %%%%%%%%%%%
%% Bareme
@@ -822,6 +949,8 @@
}%
}%
+\def\TexteDevantPointParExercice{}%
+
\newcommand\TableauRecapitulatif{%
\@ifundefined{Op@TotalExo}{Recompilez}%
{%
@@ -831,7 +960,7 @@
\multicolumn{2}{|c|}{Barème récapitulatif}\\
\hline
\xintFor* ##1 in {\xintSeq{1}{\TotalExo}}\do{
- Exercice ##1&\total{##1-##1}\\
+ Exercice ##1&\TexteDevantPointParExercice\total{##1-##1}\\
}
\hline
\end{tabular}
@@ -839,6 +968,49 @@
}%
\makeatother
%%%%%%%% FIN BAREME %%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Commandes pour les affichages optionnels dans les cadre
+\NewDocumentCommand{\PfMAffichageCompetencesTravaillees}{}{%
+ \ifboolKV[ClesExercices]{AffichageCompetence}{%
+ \node[%
+ fill=white,%
+ anchor=east,%
+ xshift=-10pt,%
+ text=PfMColCpt,%
+ ]
+ at (frame.north east)
+ {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
+ }{}%
+}
+\NewDocumentCommand{\PfMLienVersSolution}{}{%
+ \ifboolKV[Boulot]{VersSolution}{%
+ \ifboolKV[ClesExercices]{PasCorrige}{}{%
+ \node[%
+ fill=tcbcolback,%
+ anchor=center,%
+ ] at (frame.east){\hyperref[pagesol-\thePfMMaquette-\thePfMExo]{\faKey}};%
+ }%
+ }{}%
+}%
+
+\makeatletter
+\NewDocumentCommand{\PfMAffichageSource}{}{%
+ \ifboolKV[ClesExercices]{AffichageSource}{%
+ \node[%
+ fill=tcbcolback,
+ anchor=east,
+ yshift=0.5pt,
+ xshift=-\kvtcb@rightlower,%-10pt,
+ text=PfMColSrc,
+ ]
+ at (frame.south east)
+ {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
+ }{}%
+}%
+\makeatother
+%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
%%%Style des différents documents
\tcbset{%
tikzbase/.style={%
@@ -888,16 +1060,9 @@
(title.south east)--++(90:\tcboxedtitleheight)--++(183:\tcboxedtitlewidth)--++(-90:\tcboxedtitleheight)|-cycle;
},%
overlay unbroken and first={%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=gray!50,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ %
+ \PfMAffichageSource%
+ %
\ifboolKV[ClesExercices]{BaremeTotal}{%
\node[
fill=white,
@@ -908,7 +1073,8 @@
]
at (frame.north east)
{\footnotesize\sffamily \total{\the\c@PfMSection-\the\c@PfMExo}};
- }{}
+ }{}%
+ \PfMLienVersSolution%
}%
}%
}%
@@ -934,7 +1100,7 @@
\begin{tcolorbox}[%
tikzdm,%
label is label,%
- label=page-\thePfMMaquette-\thePfMExo%
+ label=page-\thePfMMaquette-\thePfMExo,%
]%
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
#3
@@ -1150,27 +1316,11 @@
\ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}}
\ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}
%%
- \ifboolKV[ClesExercices]{AffichageCompetence}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColCpt,%
- ]
- at (frame.north east)
- {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
- }{}%
+ \PfMAffichageCompetencesTravaillees%
%%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColSrc,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ \PfMAffichageSource%
+ %
+ \PfMLienVersSolution%
}%
}%
}%
@@ -1617,27 +1767,11 @@
\ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}}
\ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}
%%
- \ifboolKV[ClesExercices]{AffichageCompetence}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColCpt,%
- ]
- at (frame.north east)
- {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
- }{}%
+ \PfMAffichageCompetencesTravaillees%
%%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColSrc,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ \PfMAffichageSource%
+ %
+ \PfMLienVersSolution%
}%
}%
}%
@@ -1848,30 +1982,58 @@
}%
}%
+\NewDocumentCommand\PfMChoixHideItemSolution{}{%
+ \ifboolKV[ClesExercices]{Profile}{%
+ % J'ai un élève à profile Je dois me souvenir que la correction doit être profilée. Le compteur PfMExo vaut \thePfMExo
+ \expandafter\xdef\csname PfMHideSol\Roman{PfMExo}\endcsname{A}}{%
+ %Je n'ai pas d'élève à profile
+ \expandafter\xdef\csname PfMHideSol\Roman{PfMExo}\endcsname{}%
+ }%
+}%
+
+\NewDocumentCommand\PfMAffichageHideItemSolution{}{%
+ \expandafter\xdef\csname PfMEcrireHideItemSol\endcsname{\csname PfMHideSol\Roman{PfMExoSol}\endcsname}%
+ \ifx\bla\PfMEcrireHideItemSol\bla%
+% \textcolor{blue}{Normalement, pas de hide car clé profile pas active.}
+ \else
+% \textcolor{red}{Hide Item dans les solutions}
+ \PfMhideitems%
+ \fi%
+}%
+
\NewDocumentEnvironment{exerciceFiche}{so+b}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
- \IfBooleanTF{#1}{%
- \setKV[ClesExercices]{Numerote=false}%
- }{}%
- \colorlet{ColExoFiche}{\useKV[ClesExercices]{Background}}%
- \colorlet{PfMCadreFiche}{\useKV[ClesExercices]{Cadre}}%
- \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
- \refstepcounter{PfMSection}%
- \PfMChoixCorrection%
- \refstepcounter{PfMExo}%
- \PfMChoixTitreSolution%
- \begin{tcolorbox}[%
- tikzfiche,
- label is label,
- label=page-\thePfMMaquette-\thePfMExo
- ]
- \ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
- \end{tcolorbox}%
- \PfMApresLesExercices%
+ \ifboolKV[ClesExercices]{NonUtilise}{%
+ % Mettre la correction hors-jeu
+ \setKV[ClesExercices]{PasCorrige}%
+ \PfMChoixCorrection%
+ }{%
+ \IfBooleanTF{#1}{%
+ \setKV[ClesExercices]{Numerote=false}%
+ }{}%
+ \ifboolKV[ClesExercices]{Profile}{\PfMhideitems}{}%
+ \colorlet{ColExoFiche}{\useKV[ClesExercices]{Background}}%
+ \colorlet{PfMCadreFiche}{\useKV[ClesExercices]{Cadre}}%
+ \setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
+ \refstepcounter{PfMSection}%
+ \PfMChoixCorrection%
+ \refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
+ \PfMChoixHideItemSolution%
+ \begin{tcolorbox}[%
+ tikzfiche,
+ label is label,
+ label=page-\thePfMMaquette-\thePfMExo
+ ]
+ \ifboolKV[Boulot]{Dys}{\raggedright}{}%
+ #3
+ \end{tcolorbox}%
+ \ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
+ \PfMApresLesExercices%
+ }%
}{}
\NewDocumentEnvironment{exerciceDS}{so+b}{%
@@ -2026,28 +2188,12 @@
%%
\ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}}
\ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}%
- %%
- \ifboolKV[ClesExercices]{AffichageCompetence}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColCpt,%
- ]
- at (frame.north east)
- {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
- }{}%
- %%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColSrc,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ %
+ \PfMAffichageCompetencesTravaillees%
+ %
+ \PfMAffichageSource%
+ %
+ \PfMLienVersSolution%
}%
}%
}%
@@ -2091,7 +2237,9 @@
\refstepcounter{PfMExo}%
\PfMChoixTitreSolution%
\tcolorbox[%
- tikzpdt
+ tikzpdt,
+ label is label,
+ label=page-\thePfMMaquette-\thePfMExo
]%
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
}{\endtcolorbox%
@@ -2173,17 +2321,8 @@
}
}
;
- %%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=gray!50,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ %%
+ \PfMAffichageSource%
}%
}%
}%
@@ -2212,9 +2351,6 @@
\endtcolorbox%
}
-\newlength{\CRRHauteur}
-\setlength{\CRRHauteur}{10cm}
-
\newenvironment{CRRemarque}{%
\tcolorbox[colback=white,height=\CRRHauteur,title=REMARQUE(S),fonttitle=\color{black}\bfseries\sffamily,colbacktitle=white%
]}
@@ -2480,28 +2616,12 @@
%%
\ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=ColExoFiche,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}}
\ifboolKV[ClesExercices]{Oral}{\node[fill=ColExoFiche,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}
- %%
- \ifboolKV[ClesExercices]{AffichageCompetence}{%
- \node[%
- fill=ColExoFiche,
- anchor=east,
- xshift=-\kvtcb@rightlower,
- text=PfMColCpt,%
- ]
- at (frame.north east)
- {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
- }{}%
- %%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[%
- fill=ColExoFiche,
- anchor=east,
- xshift=-\kvtcb@rightlower,
- text=PfMColSrc,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ %
+ \PfMAffichageCompetencesTravaillees%
+ %
+ \PfMAffichageSource%
+ % Lien vers la solution
+ \PfMLienVersSolution
}%
}%
}%
@@ -2553,27 +2673,11 @@
\ifboolKV[ClesExercices]{Calculatrice}{}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\cancel{\faCalculator}};\stepcounter{PfMNbLogo}}
\ifboolKV[ClesExercices]{Oral}{\node[fill=white,anchor=west,xshift=(\thePfMNbLogo*2.5+(\thePfMNbLogo-1)*20)*1pt] at (A.east) {\faBullhorn};\stepcounter{PfMNbLogo}}{}
%%
- \ifboolKV[ClesExercices]{AffichageCompetence}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColCpt,%
- ]
- at (frame.north east)
- {\itshape\scriptsize\sffamily Compétence(s) dominante(s) : \useKV[ClesExercices]{Competence}};
- }{}%
+ \PfMAffichageCompetencesTravaillees%
%%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[%
- fill=white,
- anchor=east,
- xshift=-10pt,
- text=PfMColSrc,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}%
+ \PfMAffichageSource%
+ %
+ \PfMLienVersSolution%
}%
}%
}%
@@ -2640,17 +2744,9 @@
fonttitle=\bfseries\sffamily,
title=Exercice\ifboolKV[ClesExercices]{Numerote}{ \thePfMExo}{}\ifboolKV[ClesExercices]{AffichageTitre}{ : \useKV[ClesExercices]{Titre}}{},
overlay unbroken and first={%
- \ifboolKV[ClesExercices]{AffichageSource}{%
- \node[
- fill=white,
- anchor=east,
- yshift=0.5pt,
- xshift=-10pt,
- text=gray!85,
- ]
- at (frame.south east)
- {\scriptsize\sffamily \useKV[ClesExercices]{Source}};
- }{}
+ %
+ \PfMAffichageSource%
+ %
\ifboolKV[ClesExercices]{BaremeTotal}{%
\node[
fill=white,
@@ -2662,6 +2758,7 @@
at (frame.north east)
{\footnotesize\sffamily \total{\the\c@PfMSection-\the\c@PfMExo}};
}{}
+ \PfMLienVersSolution%
}%
}%
}%
@@ -2761,17 +2858,18 @@
\NewDocumentCommand\PfMBasculeDys{}{%
\ifboolKV[Boulot]{Dys}{%
% d'après \url{https://culturedys.com/quelle-est-la-meilleure-police-pour-les-dyslexiques/}
- \fontsize{14}{\fpeval{16.8*1.5}}\selectfont%
+ \xdef\PfMTaillePointDys{\useKV[Boulot]{Taille}}
+ \fontsize{\PfMTaillePointDys}{\fpeval{\PfMTaillePointDys*1.2*1.5}}\selectfont%
\raggedright%
}{%
\ifnum\thePfMMaquette=1\relax%
\else%
\ifnum\PfMFontSize=0\relax%
- \fontsize{\fpeval{10}}{\fpeval{1.2*10}}%
+ \fontsize{10}{\fpeval{1.2*10}}%
\else\ifnum\PfMFontSize=1\relax%
- \fontsize{\fpeval{11}}{\fpeval{1.2*11}}%
+ \fontsize{11}{\fpeval{1.2*11}}%
\else%
- \fontsize{\fpeval{12}}{\fpeval{1.2*12}}%
+ \fontsize{12}{\fpeval{1.2*12}}%
\fi%
\fi%
\selectfont%