texlive[67936] Master/texmf-dist: profcollege (15aug23)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 15 22:21:44 CEST 2023


Revision: 67936
          http://tug.org/svn/texlive?view=revision&revision=67936
Author:   karl
Date:     2023-08-15 22:21:44 +0200 (Tue, 15 Aug 2023)
Log Message:
-----------
profcollege (15aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
    trunk/Master/texmf-dist/doc/latex/profcollege/profcollege-doc.zip
    trunk/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculatrice.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCLabyrintheJeu.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCMentalo.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCDefiCalc.tex

Modified: trunk/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/profcollege/profcollege-doc.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
===================================================================
--- trunk/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp	2023-08-15 20:21:15 UTC (rev 67935)
+++ trunk/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp	2023-08-15 20:21:44 UTC (rev 67936)
@@ -168,6 +168,7 @@
     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("11111111111111111111111111111111111") shifted(Decalage);
     fi;
 enddef;
 
@@ -178,10 +179,12 @@
   Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
   fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
   draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
+  if length(nt)>0:
   for k=0 upto length(nt)-1:
     BlocAffichage;
     Test(k,nt);
   endfor;
+  fi;
   for k=1 upto NB:
     nblignes:=nblignes+1;
     Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculatrice.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculatrice.tex	2023-08-15 20:21:15 UTC (rev 67935)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculatrice.tex	2023-08-15 20:21:44 UTC (rev 67936)
@@ -14,7 +14,7 @@
 \colorlet{greenish}{green!16!gray}%
 \colorlet{redish}{red!80!black}%
 
-\tcbset{calbackground/.style={
+\tcbset{calbackground/.style={%
     enhanced,
     leftright skip=0.25cm,beforeafter skip=0pt,
     toptitle=0mm,bottomtitle=0mm,
@@ -34,7 +34,7 @@
     autoparskip,
   }}%
 
-\newtcbox{\KY}[1][]{
+\newtcbox{\KY}[1][]{%
   enhanced,
   on line,
   arc=2pt,outer arc=2pt,
@@ -51,7 +51,7 @@
   before upper=\vrule width 0pt height 2ex depth 1ex\relax,
 }%
 
-\newtcbox{\KYm}[1][]{
+\newtcbox{\KYm}[1][]{%
   enhanced,
   on line,
   arc=2pt,outer arc=2pt,
@@ -69,7 +69,7 @@
   after upper=$,
 }%
 
-\newtcbox{\KN}{
+\newtcbox{\KN}{%
   enhanced,
   on line,
   arc=2pt,outer arc=2pt,
@@ -107,10 +107,10 @@
     at (frame.north east) {#1};}
 }
 
-\def\MPCalculatrice#1#2#3{
+\def\MPCalculatrice#1#2#3{%
   % #1 Calcul %2 r\'eponse
-  \ifluatex
-    \mplibnumbersystem{double}
+  \ifluatex%
+    \mplibnumbersystem{double}%
     \mplibforcehmode%
     \begin{mplibcode}%
       input PfCCalculatrice;
@@ -117,21 +117,19 @@
       LargeurEcran:=\useKV[ClesCalculatrice]{Largeur};
       boolean Calcul;
       Calcul=\useKV[ClesCalculatrice]{Calcul};
+      print:=\useKV[ClesCalculatrice]{Impression};      
       LCD(#1)(#2)(#3);
-    \end{mplibcode}
-    \mplibnumbersystem{scaled}
-  \else
+    \end{mplibcode}%
+    \mplibnumbersystem{scaled}%
+  \else%
     \begin{mpost}[mpsettings={input PfCCalculatrice;LargeurEcran:=\useKV[ClesCalculatrice]{Largeur};}]
       LCD(#1)(#2)(#3);    
     \end{mpost}
-  \fi
+  \fi%
 }%
 
-\setKVdefault[ClesCalculatrice]{Ecran=false,NbLignes=0,BL=0.775,Largeur=120,Calcul=false}
+\setKVdefault[ClesCalculatrice]{Ecran=false,NbLignes=0,BL=0.775,Largeur=120,Calcul=false,Impression=false}%
 
-\newtoks\toklistenombrecalculatrice
-\def\UpdatetoksCalculatrice#1\nil{\addtotok\toklistenombrecalculatrice{"\fpeval{#1}"}}
-
 \newcommand\Calculatrice[2][]{%
   \setstackgap{L}{\useKV[ClesCalculatrice]{BL}\baselineskip}%
   \useKVdefault[ClesCalculatrice]%

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCDefiCalc.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCDefiCalc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCDefiCalc.tex	2023-08-15 20:21:44 UTC (rev 67936)
@@ -0,0 +1,38 @@
+%%%
+% Defi Calculatrice
+%%%
+\setKVdefault[DefiCalculatrice]{NbCasesNoires=6,ListeTouches={!},Impression=false}%
+
+\newtoks\toktexteecran{}
+\newtoks\tokcibleecran{}
+\def\UpdatetoksTexteEcran#1\nil{\addtotok\toktexteecran{_}}
+\def\UpdatetoksCibleEcran#1\nil{\addtotok\tokcibleecran{"#1"}}
+
+\NewDocumentCommand\DefiCalculatrice{om}{%
+  \useKVdefault[DefiCalculatrice]%
+  \setKV[DefiCalculatrice]{#1}%
+  \defKV[DefiCalculatrice]{Impression=\setKV[ClesCalculatrice]{Impression}}%
+  \toktexteecran{"}%
+  \tokcibleecran{}%
+  \xdef\PfCFooDCListe{\useKV[DefiCalculatrice]{ListeTouches}}
+  \setsepchar{,}\ignoreemptyitems%
+  \readlist*\PfCDCListeEffacer{\PfCFooDCListe}%
+  \reademptyitems%
+  \xintFor* ##1 in{\xintSeq{1}{\useKV[DefiCalculatrice]{NbCasesNoires}}}\do{%
+    \expandafter\UpdatetoksTexteEcran##1\nil
+  }%
+  \addtotok\toktexteecran{"}
+  \expandafter\UpdatetoksCibleEcran#2\nil
+  % Dessin de la calculatrice
+  \begin{tcolorbox}[nobeforeafter,left=0pt,right=0pt,top=0pt,bottom=0pt,width=69pt]
+  \setlength{\tabcolsep}{0.01\tabcolsep}
+  \begin{tabular}{*{4}{m{20pt}}}
+    \ifboolKV[DefiCalculatrice]{Impression}{\multicolumn{4}{c}{\Calculatrice[Ecran,Largeur=40,Impression]{\the\toktexteecran/\the\tokcibleecran}}}{\multicolumn{4}{c}{\Calculatrice[Ecran,Largeur=40]{\the\toktexteecran/\the\tokcibleecran}}}\\
+    \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{7}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/7}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{8}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/8}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{9}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/9}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{/}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\div$}}}\\
+    \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{4}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/4}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{5}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/5}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{6}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/6}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{*}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\times$}}}\\
+    \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{1}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/1}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{2}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/2}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{3}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/3}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{-}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$-$}}}\\
+    \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{0}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/0}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{.}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/.}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{=}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$=$}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{+}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$+$}}}\\
+  \end{tabular}
+  \setlength{\tabcolsep}{100\tabcolsep}
+  \end{tcolorbox}
+}%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCDefiCalc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCLabyrintheJeu.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCLabyrintheJeu.tex	2023-08-15 20:21:15 UTC (rev 67935)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCLabyrintheJeu.tex	2023-08-15 20:21:44 UTC (rev 67936)
@@ -6,6 +6,8 @@
 \tikzset{FDirect/.style={-stealth}}
 \tikzset{FIndirect/.style={stealth-}}
 \tikzset{FBidirect/.style={stealth-stealth}}
+\tikzset{PfCStyleI/.style={near start}}
+\tikzset{PfCStyle/.style={near start}}
 
 \newlength{\LabyLongCM}
 
@@ -75,7 +77,7 @@
             \ifboolKV[Labyrinthe]{Passages}{%
               \xdef\NomNode{\noexpand\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},1]}%
               \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]==1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]==2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}%
-                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,PfCStyleI,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
               }{}
             }{%
               \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1});
@@ -89,10 +91,10 @@
               \xdef\NomNode{\noexpand\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},1]}%
               \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]>0}{%
                 \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]==1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]==2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}
-                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+                \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,PfCStyle,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
               }{}%
             }{%
-              \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
+              \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- node[fill=white,PfCStyle,\LabySlop]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1});
             }%          
           }%
         }%

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCMentalo.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCMentalo.tex	2023-08-15 20:21:15 UTC (rev 67935)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCMentalo.tex	2023-08-15 20:21:44 UTC (rev 67936)
@@ -13,46 +13,91 @@
   \fi%
 }%
 
-\setKVdefault[Mentalo]{Questions=10,ValeurMin=1,ValeurMax=15}
+\setKVdefault[Mentalo]{Questions=10,ValeurMin=1,ValeurMax=15,Perso=false}
 
 \NewDocumentCommand\Mentalo{o m}{%
   \useKVdefault[Mentalo]%
   \setKV[Mentalo]{#1}%
-  \xdef\PfCMentaloEtages{\fpeval{\useKV[Mentalo]{Questions}+1}}
-  \setsepchar{,}\ignoreemptyitems%
-  \readlist*\PfCMentaloListeOperations{#2}%
-  \reademptyitems%
-  \setlength{\tabcolsep}{0.25\tabcolsep}
-  \renewcommand{\arraystretch}{1.5}
-  \begin{NiceTabular}{*{\fpeval{\PfCMentaloEtages}}{m{5pt}}m{20pt}cm{20pt}cl*{\fpeval{\PfCMentaloEtages}}{m{5pt}}*{5}{m{15pt}}*{1}{m{10pt}}}
-    \Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}%
-    \Block[draw,fill=gray!15]{1-5}{Arrivée}&&&&&\Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}\\
-    \xintFor* ##1 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-1}}}\do{%
-      \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}%
-      \Block[borders={top,left,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}%
-      \Block[borders={top,bottom}]{1-1}{%
-        \xdef\PfCMentaloPremierTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}%
-        \num{\PfCMentaloPremierTerme}}&\Block[borders={top,bottom}]{1-1}{%
-        \xintifboolexpr{\PfCMentaloListeOperationslen==1}{%
-          \StrSubstitute{\PfCMentaloListeOperations[1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$%
-        }{%
-          \StrSubstitute{\PfCMentaloListeOperations[##1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$%
+  \ifboolKV[Mentalo]{Perso}{%
+      \setsepchar{,}\ignoreemptyitems%
+      \readlist*\PfCMentaloListeOperations{#2}%
+      \reademptyitems%
+      \xdef\PfCMentaloEtages{\fpeval{\PfCMentaloListeOperationslen+1}}%
+      \setlength{\tabcolsep}{0.25\tabcolsep}%
+      \renewcommand{\arraystretch}{1.5}%
+      \begin{NiceTabular}{*{\fpeval{\PfCMentaloEtages}}{m{5pt}}m{20pt}cm{20pt}cl*{\fpeval{\PfCMentaloEtages}}{m{5pt}}*{5}{m{15pt}}*{1}{m{10pt}}}
+      \Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}%
+      \Block[draw,fill=gray!15]{1-5}{Arrivée}&&&&&\Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}\\
+      \xintFor* ##1 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-1}}}\do{%
+        \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}%
+        \Block[borders={top,left,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}%
+        \Block[borders={top,bottom}]{1-1}{%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{+}{\StrBefore{\PfCMentaloListeOperations[##1]}{+}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{-}{\StrBefore{\PfCMentaloListeOperations[##1]}{-}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{*}{\StrBefore{\PfCMentaloListeOperations[##1]}{*}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{/}{\StrBefore{\PfCMentaloListeOperations[##1]}{/}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}%
+        }&
+        \Block[borders={top,bottom}]{1-1}{%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{+}{$+$}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{-}{$-$}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{*}{$\times$}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{/}{$\div$}{}%
         }%
-      }&%
-      \Block[borders={top,bottom}]{1-1}{\xdef\PfCMentaloDeuxiemeTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}%
-        \PfCNum{\PfCMentaloDeuxiemeTerme}}&\Block[borders={top,bottom}]{1-1}{$=$}&\Block[borders={top,bottom}]{1-1}{\pointilles[20pt]}&%
-      \Block[borders={top,right,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}%
-      \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}%
-      &&&&\Block{1-2}{%
-        \xintifboolexpr{\PfCMentaloListeOperationslen==1}{%
-          \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[1]\PfCMentaloDeuxiemeTerme}}
-        }{%
-          \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[##1]\PfCMentaloDeuxiemeTerme}}
+        &
+        \Block[borders={top,bottom}]{1-1}{%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{+}{\StrBehind{\PfCMentaloListeOperations[##1]}{+}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{-}{\StrBehind{\PfCMentaloListeOperations[##1]}{-}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{*}{\StrBehind{\PfCMentaloListeOperations[##1]}{*}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}%
+          \IfSubStr{\PfCMentaloListeOperations[##1]}{/}{\StrBehind{\PfCMentaloListeOperations[##1]}{/}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}%
         }%
-      }&\\
-    }%
-    \Block[draw,fill=gray!15]{1-\fpeval{2*\PfCMentaloEtages+5}}{Départ}\xintFor* ##2 in{\xintSeq{1}{\fpeval{2*\PfCMentaloEtages+5}}}\do{&}\\%
-    \CodeAfter
-    \tikz\draw[dashed] (1-|\fpeval{5+5+2+2*\PfCMentaloEtages-2})--(last-|\fpeval{5+5+2+2*\PfCMentaloEtages-2});
-  \end{NiceTabular}
+        &\Block[borders={top,bottom}]{1-1}{$=$}&\Block[borders={top,bottom}]{1-1}{\pointilles[20pt]}&%
+        \Block[borders={top,right,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}%
+        \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}%
+        &&&&\Block{1-2}{%
+          \num{\fpeval{\PfCMentaloListeOperations[##1]}}%
+        }&\\
+      }%
+      \Block[draw,fill=gray!15]{1-\fpeval{2*\PfCMentaloEtages+5}}{Départ}\xintFor* ##2 in{\xintSeq{1}{\fpeval{2*\PfCMentaloEtages+5}}}\do{&}\\%
+      \CodeAfter
+      \tikz\draw[dashed] (1-|\fpeval{5+5+2+2*\PfCMentaloEtages-2})--(last-|\fpeval{5+5+2+2*\PfCMentaloEtages-2});
+    \end{NiceTabular}
+  }{%
+    \xdef\PfCMentaloEtages{\fpeval{\useKV[Mentalo]{Questions}+1}}
+    \setsepchar{,}\ignoreemptyitems%
+    \readlist*\PfCMentaloListeOperations{#2}%
+    \reademptyitems%
+    \setlength{\tabcolsep}{0.25\tabcolsep}
+    \renewcommand{\arraystretch}{1.5}
+    \begin{NiceTabular}{*{\fpeval{\PfCMentaloEtages}}{m{5pt}}m{20pt}cm{20pt}cl*{\fpeval{\PfCMentaloEtages}}{m{5pt}}*{5}{m{15pt}}*{1}{m{10pt}}}
+      \Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}%
+      \Block[draw,fill=gray!15]{1-5}{Arrivée}&&&&&\Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}\\
+      \xintFor* ##1 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-1}}}\do{%
+        \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}%
+        \Block[borders={top,left,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}%
+        \Block[borders={top,bottom}]{1-1}{%
+          \xdef\PfCMentaloPremierTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}%
+          \num{\PfCMentaloPremierTerme}}&\Block[borders={top,bottom}]{1-1}{%
+          \xintifboolexpr{\PfCMentaloListeOperationslen==1}{%
+            \StrSubstitute{\PfCMentaloListeOperations[1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$%
+          }{%
+            \StrSubstitute{\PfCMentaloListeOperations[##1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$%
+          }%
+        }&%
+        \Block[borders={top,bottom}]{1-1}{\xdef\PfCMentaloDeuxiemeTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}%
+          \PfCNum{\PfCMentaloDeuxiemeTerme}}&\Block[borders={top,bottom}]{1-1}{$=$}&\Block[borders={top,bottom}]{1-1}{\pointilles[20pt]}&%
+        \Block[borders={top,right,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}%
+        \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}%
+        &&&&\Block{1-2}{%
+          \xintifboolexpr{\PfCMentaloListeOperationslen==1}{%
+            \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[1]\PfCMentaloDeuxiemeTerme}}
+          }{%
+            \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[##1]\PfCMentaloDeuxiemeTerme}}
+          }%
+        }&\\
+      }%
+      \Block[draw,fill=gray!15]{1-\fpeval{2*\PfCMentaloEtages+5}}{Départ}\xintFor* ##2 in{\xintSeq{1}{\fpeval{2*\PfCMentaloEtages+5}}}\do{&}\\%
+      \CodeAfter
+      \tikz\draw[dashed] (1-|\fpeval{5+5+2+2*\PfCMentaloEtages-2})--(last-|\fpeval{5+5+2+2*\PfCMentaloEtages-2});
+    \end{NiceTabular}
+  }%
 }%
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2023-08-15 20:21:15 UTC (rev 67935)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2023-08-15 20:21:44 UTC (rev 67936)
@@ -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{2023/08/15}%
+\def\filedate{2023/08/16}%
 \let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-r}%
+\def\fileversion{0.99-z-s}%
 \let\PfCfileversion\fileversion%
 \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
 
@@ -573,6 +573,7 @@
 }%\emoticon
 }%\raisebox
 }%
+\input{PfCDefiCalc}
 \input{PfCMulArt}
 \input{PfCGrimuku}
 \input{PfCHorloge}



More information about the tex-live-commits mailing list.