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.sty36
1 files changed, 32 insertions, 4 deletions
diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
index 6713b00c72..2e5b5eeec2 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/03}%
+\def\filedate{2024/01/13}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.85}%
+\def\fileversion{0.86}%
\let\PfMfileversion\fileversion%
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
@@ -59,7 +59,8 @@
\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}%
+\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}%
+\defKV[ClesExercices]{TitreSolution=\setKV[ClesExercices]{TitreSol}}%
\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}%
\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}%
\defKV[ClesExercices]{Competence=\setKV[ClesExercices]{AffichageCompetence}}%
@@ -726,7 +727,7 @@
\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}\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.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}{}
}%
}%
@@ -922,6 +923,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\immediate\write\@auxout{%
\string\opcopy{\thePfMExo}{TotalExo}%
}%
@@ -1077,6 +1079,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\immediate\write\@auxout{\string\opcopy{\thePfMExo}{\Roman{PfMMaquette}-ContratTotalExo}}%
% Creation des parcours
\ifboolKV[ClesExercices]{Contrat}{%
@@ -1431,6 +1434,7 @@
\stepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\immediate\write\@auxout{\string\opcopy{\thePfMExo}{\Roman{PfMMaquette}-FdRTotalExo}}%
% Creation des parcours
\ifboolKV[ClesExercices]{Routes}{%
@@ -1762,6 +1766,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\immediate\write\@auxout{\string\opcopy{\thePfMExo}{\Roman{PfMMaquette}-ParcoursTotalExo}}%
% Creation des parcours
\ifboolKV[ClesExercices]{Parcours}{%
@@ -1825,6 +1830,24 @@
}{}%
}%
+\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%
+ \else
+ \PfMEcrireTitreSol%
+ \fi%
+}%
+
+\NewDocumentCommand\PfMChoixTitreSolution{}{%
+ \ifboolKV[ClesExercices]{TitreSol}{%
+ %J'ai un titre à mettre à la solution.\par LE compteur PfMExo vaut \thePfMExo
+ \expandafter\xdef\csname PfMTSol\Roman{PfMExo}\endcsname{\useKV[ClesExercices]{TitreSolution}}}{%
+ %Je n'ai pas de titre à mettre à la solution.\par%
+ \expandafter\xdef\csname PfMTSol\Roman{PfMExo}\endcsname{}%
+ }%
+}%
+
\NewDocumentEnvironment{exerciceFiche}{so+b}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
@@ -1839,6 +1862,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\begin{tcolorbox}[%
tikzfiche,
label is label,
@@ -1860,6 +1884,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\immediate\write\@auxout{%
\string\opcopy{\thePfMExo}{TotalExo}%
}
@@ -1890,6 +1915,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\ifboolKV[ClesExercices]{BaremeTotal}{%
\immediate\write\@auxout{%
\string\opcopy{0}{total\the\c@PfMSection-\the\c@PfMExo}%
@@ -2063,6 +2089,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\tcolorbox[%
tikzpdt
]%
@@ -2201,6 +2228,7 @@
\setKV[ClesExercices]{BaremeTotal=false,BaremeDetaille=false}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \PfMChoixTitreSolution%
\tcolorbox[%
tikzkholle,
label is label,