texlive[68558] Master/texmf-dist: profcollege (14oct23)

commits+karl at tug.org commits+karl at tug.org
Sun Oct 15 22:43:21 CEST 2023


Revision: 68558
          https://tug.org/svn/texlive?view=revision&revision=68558
Author:   karl
Date:     2023-10-15 22:43:20 +0200 (Sun, 15 Oct 2023)
Log Message:
-----------
profcollege (14oct23)

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/tex/latex/profcollege/PfCCartesJeux.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/metapost/profcollege/PfCLego.mp
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCLego.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)

Added: trunk/Master/texmf-dist/metapost/profcollege/PfCLego.mp
===================================================================
--- trunk/Master/texmf-dist/metapost/profcollege/PfCLego.mp	                        (rev 0)
+++ trunk/Master/texmf-dist/metapost/profcollege/PfCLego.mp	2023-10-15 20:43:20 UTC (rev 68558)
@@ -0,0 +1,336 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Lego boxes by Anthony Phan.
+% file: lego.mp
+% last modification: January 29, 2001.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Licence? Feel-free-to-send-me-a-postcard
+%
+% Anthony Phan,
+%
+% D\'epartement de Math\'ematiques,
+% SP2MI, T\'el\'eport 2,
+% Boulevard Marie et Pierre Curie,
+% BP 30179,
+% F-86962 Futuroscope-Chasseneuil cedex.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+magnification=1;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Les figures d\'efinies par ce programme
+% repr\'esente une tentative de programmation
+% tridimensionnelle avec MetaPost. Les trucs
+% essentiels sont l'usage d'un rep\`ere par
+% lequel s'effectue la projection sur le plan,
+% et l'affichage des faces dans le plan dont
+% le contour est orient\'e positivement qui
+% corespondent alors \`a des faces visibles.
+%
+% Le niveau math\'ematique correspondant
+% \`a ce programme devrait \^etre le niveau
+% premier cycle en sciences.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Param\`etres de projection
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Rep\`ere initial
+
+pair e_x,e_y,e_z,e_xi,e_yi,e_zi;
+e_xi=sqrt 0.5*dir 210;
+e_yi=sqrt 0.5*dir -30;
+e_zi=sqrt 0.5*dir 90;
+
+% trois coordonn\'ees du vecteur de profondeur,
+% il v\'erifie depth_xi*e_xi+depth_yi*e_yi+depth_zi*e_zi=(0,0);
+
+depth_xi:=-1; depth_yi:=-1; depth_zi:=-1;
+
+% Param\`etres d'\'eclairement
+
+% vecteur unitaire de l'origine \`a la source lumineuse
+
+light_xi=0; light_yi=0; light_zi=1;
+
+% r\'eglage du contraste
+
+light_min=0.25; light_max=1;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Param\`etres, unit\'es et mesures essentielles
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+color currentcolor; currentcolor=red;
+
+lego_unit        :=magnification*0.8cm; % official
+lego_height      :=1.2lego_unit;        % official
+lego_plate_height:=0.4lego_unit;        % official
+lego_thickness   :=1/6lego_unit;
+lego_eps         :=1/20lego_unit;
+lego_overshoot   :=lego_plate_height-lego_thickness;%0.2133lego_unit;
+lego_diam        :=lego_unit-2lego_thickness;
+lego_Diam        :=(sqrt 2)*lego_unit-lego_diam;
+cyl_steps        :=60;
+
+path upper_path, lower_path, temp_path;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Rotation du rep\`ere initial
+% selon des pr\'etendus angles d'Euler.
+% avec d\'etermination des facteurs d'ensoleillement.
+% et des facteurs de profondeur...
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+vardef euler(expr theta,phi,psi)=
+  save ctheta,stheta,cphi,sphi,cpsi,spsi;
+  ctheta=cosd theta; stheta=sind theta;
+  cphi=cosd phi; sphi=sind phi;
+  cpsi=cosd psi; spsi=sind psi;
+  %
+  e_x:= cphi*ctheta*e_xi + cphi*stheta*e_yi + sphi*e_zi;
+  e_y:=-(cpsi*stheta+spsi*sphi*ctheta)*e_xi
+  +     (cpsi*ctheta-spsi*sphi*stheta)*e_yi
+  +     spsi*cphi*e_zi;
+  e_z:=(spsi*stheta-cpsi*sphi*ctheta)*e_xi
+  -    (spsi*ctheta+cpsi*sphi*stheta)*e_yi
+  +    cpsi*cphi*e_zi;
+  %
+  light_x:= cphi*ctheta*light_xi + cphi*stheta*light_yi + sphi*light_zi;
+  light_y:=-(cpsi*stheta+spsi*sphi*ctheta)*light_xi
+  +     (cpsi*ctheta-spsi*sphi*stheta)*light_yi
+  +     spsi*cphi*light_zi;
+  light_z:=(spsi*stheta-cpsi*sphi*ctheta)*light_xi
+  -    (spsi*ctheta+cpsi*sphi*stheta)*light_yi
+  +    cpsi*cphi*light_zi;
+  %
+  depth_x:= cphi*ctheta*depth_xi + cphi*stheta*depth_yi + sphi*depth_zi;
+  depth_y:=-(cpsi*stheta+spsi*sphi*ctheta)*depth_xi
+  +     (cpsi*ctheta-spsi*sphi*stheta)*depth_yi
+  +     spsi*cphi*depth_zi;
+  depth_z:=(spsi*stheta-cpsi*sphi*ctheta)*depth_xi
+  -    (spsi*ctheta+cpsi*sphi*stheta)*depth_yi
+  +    cpsi*cphi*depth_zi;
+enddef;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Nous ne remplissons une face que
+% si elle est orient\'ee positivement.
+% L'argument ``factor'' correspond \`a 
+% l'\'eclairement.
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+def fill_special(expr p,factor)=
+  if turningnumber p>=0:
+    fill p withcolor mycolor factor
+  fi
+enddef;
+
+vardef mycolor expr factor=
+  ((0.5*(1+factor))[light_min,light_max])*currentcolor
+enddef;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% D\'etermination de l'ordre d'affichage (cylindres)
+% sur une ligne, sur un rectangle...
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+def ordered_row(expr e_n,e_m,depth_n,n)=
+  if depth_n<0:
+    for $=1 step 1 until n: row_command(e_n,e_m,$); endfor
+  else:
+    for $=n step -1 until 1: row_command(e_n,e_m,$); endfor
+  fi
+enddef;
+
+def ordered_rows(expr depth_n,depth_m,n,m)=
+  if depth_n<0:
+    if depth_m<0:
+      if depth_n<depth_m:
+	for $$=1 step 1 until m: for $=1 step 1 until n:
+	    row_command($,$$); endfor endfor
+      else:
+	for $=1 step 1 until n: for $$=1 step 1 until m:
+	    row_command($,$$); endfor endfor
+      fi
+    else:
+      if depth_n<depth_m:
+	for $$=m step -1 until 1: for $=1 step 1 until n:
+	    row_command($,$$); endfor endfor
+      else:
+	for $=1 step 1 until n:  for $$=m step -1 until 1:
+	    row_command($,$$); endfor endfor
+      fi
+    fi
+  else:
+    if depth_m<0:
+      if depth_n<depth_m:
+	for $$=1 step 1 until m: for $=n step -1 until 1:
+	    row_command($,$$); endfor endfor
+      else:
+	for $=n step -1 until 1: for $$=1 step 1 until m:
+	    row_command($,$$); endfor endfor
+      fi
+    else:
+      if depth_n<depth_m:
+	for $$=m step -1 until 1: for $=n step -1 until 1:
+	    row_command($,$$); endfor endfor
+      else:
+	for $=n step -1 until 1: for $$=m step -1 until 1:
+	    row_command($,$$); endfor endfor
+      fi
+    fi
+  fi
+enddef;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Cylindres divers
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+def z_cylinder(expr basepoint,radius,height,external)=
+  lower_path:=(for i=0 upto cyl_steps:
+      basepoint+radius*cosd(i*360/cyl_steps)*e_x
+      +radius*sind(i*360/cyl_steps)*e_y --
+    endfor basepoint+radius*e_x);
+  upper_path:=lower_path shifted (height*e_z);
+  for i=0 upto cyl_steps:
+    fill_special(if external:
+	point i of lower_path--point (i+1) of lower_path
+	--point (i+1) of upper_path--point i of upper_path--cycle
+      else:
+	point i of upper_path--point (i+1) of upper_path
+	--point (i+1) of lower_path--point i of lower_path--cycle
+      fi,
+      if external: else: - fi
+      (cosd((i+0.5)*360/cyl_steps)*light_x
+	+sind((i+0.5)*360/cyl_steps)*light_y));
+  endfor
+enddef;
+
+def teton_command(expr $,$$)=
+  z_cylinder(M1+($-0.5)*lego_unit*e_x+($$-0.5)*lego_unit*e_y,
+    0.5lego_diam-lego_eps,lego_overshoot,true);
+  fill_special(upper_path--cycle,light_z);
+enddef;
+
+def stick_command(expr e_n,e_m,$)=
+  z_cylinder(M1'+$*lego_unit*e_n+0.5lego_unit*e_m,
+    lego_thickness,lego_height-lego_thickness,true);
+  fill reverse lower_path--cycle withcolor mycolor -light_z;
+enddef;
+
+def cyl_command(expr $,$$)=
+  z_cylinder(M1'+$*lego_unit*e_x+$$*lego_unit*e_y,
+    0.5lego_diam,lego_height-lego_thickness,false);
+  temp_path:=lower_path;
+  z_cylinder(M1'+$*lego_unit*e_x+$$*lego_unit*e_y,
+    0.5lego_Diam,lego_height-lego_thickness,true);
+  fill (reverse lower_path)--temp_path--cycle
+  withcolor mycolor -light_z;
+enddef;
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Le plat principal : Adaptation à plusieurs legos sur une même figure par CP
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+pair M[],M[]',M[]'',M[]''';
+
+numeric currentnumber;
+currentnumber=0;
+
+color TR;
+TR=(0,0,0);
+
+vardef Lego_box(expr n,m,lego_color)=
+  currentcolor:=lego_color;
+  currentnumber:=currentnumber+1;
+  %
+  % Points clefs de la brique
+  %
+  if currentnumber=1:
+    M1=0.5(-n*lego_unit*e_x-m*lego_unit*e_y+lego_height*e_z)+(lego_unit*redpart(TR)*e_x+lego_unit*greenpart(TR)*e_y+lego_height*bluepart(TR)*e_z);
+  M1'-M1=-lego_height*e_z;
+  M2-M1=M2'-M1'=n*lego_unit*e_x;
+  M3-M1=M3'-M1'=n*lego_unit*e_x+m*lego_unit*e_y;
+  M4-M1=M4'-M1'=m*lego_unit*e_y;
+  M1'''-M1+lego_thickness*e_z=M1''-M1'=lego_thickness*(e_x+e_y);
+  M2'''-M2+lego_thickness*e_z=M2''-M2'=lego_thickness*(-e_x+e_y);
+  M3'''-M3+lego_thickness*e_z=M3''-M3'=lego_thickness*(-e_x-e_y);
+  M4'''-M4+lego_thickness*e_z=M4''-M4'=lego_thickness*(e_x-e_y);
+  else:
+    M1:=0.5(-n*lego_unit*e_x-m*lego_unit*e_y+lego_height*e_z)+(lego_unit*redpart(TR)*e_x+lego_unit*greenpart(TR)*e_y+lego_height*bluepart(TR)*e_z);
+    M1':=M1-lego_height*e_z;
+    M2:=M1+n*lego_unit*e_x;
+    M2':=M1'+n*lego_unit*e_x;
+    M3:=M1+n*lego_unit*e_x+m*lego_unit*e_y;
+    M3':=M1'+n*lego_unit*e_x+m*lego_unit*e_y;
+    M4:=M1+m*lego_unit*e_y;
+    M4':=M1'+m*lego_unit*e_y;
+    M1''':=M1-lego_thickness*e_z+lego_thickness*(e_x+e_y);
+    M1'':=M1'+lego_thickness*(e_x+e_y);
+    M2''':=M2-lego_thickness*e_z+lego_thickness*(-e_x+e_y);
+    M2'':=M2'+lego_thickness*(-e_x+e_y);
+    M3''':=M3-lego_thickness*e_z+lego_thickness*(-e_x-e_y);
+    M3'':=M3'+lego_thickness*(-e_x-e_y);
+    M4''':=M4-lego_thickness*e_z+lego_thickness*(e_x-e_y);
+    M4'':=M4'+lego_thickness*(e_x-e_y);
+  fi;
+  %%
+  %% (face du dessus et t\'etons)
+  %%             ou
+  %% (t\'etons, faces lat\'erales internes
+  %% et faces du dessous) 
+  %%
+  if turningnumber(M1--M2--M3--M4--cycle)>0:
+    fill_special(M1--M2--M3--M4--cycle,light_z);
+    let row_command=teton_command;
+    ordered_rows(depth_x,depth_y,n,m);
+  else:
+    let row_command=teton_command;
+    ordered_rows(depth_x,depth_y,n,m);
+    fill_special(M4'''--M3'''--M2'''--M1'''--cycle,-light_z);
+    fill_special(M1''--M1'''--M2'''--M2''--cycle,light_y);
+    fill_special(M3''--M3'''--M4'''--M4''--cycle,-light_y);
+    fill_special(M1''--M4''--M4'''--M1'''--cycle,light_x);
+    fill_special(M2''--M2'''--M3'''--M3''--cycle,-light_x);
+    if (n>1) and (m>1):
+      let row_command=cyl_command;
+      ordered_rows(depth_x,depth_y,n-1,m-1);
+    else: if (n>1) and (m=1):
+	let row_command=stick_command;
+	ordered_row(e_x,e_y,depth_x,n-1); fi
+      if (n=1) and (m>1):
+	let row_command=stick_command;
+	ordered_row(e_y,e_x,depth_y,m-1); fi
+    fi
+    fill_special(M4'--M3'--M2'--M1'--M4'--M4''--M1''--M2''
+      --M3''--M4''--cycle,-light_z);
+  fi;
+ % %
+ % % faces lat\'erales externes
+ % %
+  fill_special(M1--M1'--M2'--M2--cycle,-light_y);
+  fill_special(M3--M3'--M4'--M4--cycle,light_y);
+  fill_special(M1--M4--M4'--M1'--cycle,-light_x);
+  fill_special(M2--M2'--M3'--M3--cycle,light_x);
+enddef;
+
+endinput


Property changes on: trunk/Master/texmf-dist/metapost/profcollege/PfCLego.mp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -623,6 +623,7 @@
       \end{MyboxTrivial}%
     }{}%
   }%
+  \setlength{\tabcolsep}{4\tabcolsep}%
 }%
 
 \NewDocumentCommand\CartesTrivialPersoold{}{%

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -704,6 +704,43 @@
   }
 }
 
+\NewDocumentCommand\PfCSommeChiffres{m}{%
+  \xdef\PfCSMSomme{0}%
+  \ensuremath{
+    \StrLen{#1}[\PfCSMLongueur]
+    \xintFor* ##1 in{\xintSeq{1}{\PfCSMLongueur}}\do{
+      \StrChar{#1}{##1}[\PfCSMChiffre]
+      \xdef\PfCSMSomme{\fpeval{\PfCSMSomme+\PfCSMChiffre}}
+      \num{\PfCSMChiffre}\xintifForLast{=}{+}
+    }
+    \num{\fpeval{\PfCSMSomme}}
+  }%
+}%
+
+\newcommand\ListeTousFacteursPremier[1]{%
+  %#1 : le nombre entier \`a tester
+  \ensuremath{%
+  \newcount\anpl\newcount\bnpl\newcount\cnpl%
+  \newcount\pilebl%
+  \anpl=#1\relax%
+  \bnpl=2\relax%
+  \pilebl=2\relax%
+  \xdef\PfCPileFacteurs{}%
+  \whiledo{\the\anpl > 1}{%
+    \modulo{\the\anpl}{\the\bnpl}
+    \ifnum\remainder=0\relax
+      \cnpl=\numexpr\anpl/\bnpl\relax
+      \xdef\PfCPileFacteurs{\PfCPileFacteurs\the\bnpl}%
+%      \num{\the\bnpl}\ifnum\anpl>\bnpl\times\fi%
+      \anpl=\cnpl\relax
+    \else%
+      \bnpl=\numexpr\bnpl+1\relax%
+      \pilebl=\bnpl\relax%
+    \fi%
+    }%
+  }%
+}%
+
 \newcommand\ListeDiviseur[1]{%#1 : le nombre entier \`a tester
   \newcount\anp\newcount\bnp%
   \anp=#1%

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -0,0 +1,40 @@
+%%%
+% Jeton
+%%%
+\setKVdefault[Jeton]{Diametre=5mm,Impression=false}%
+
+\NewDocumentCommand\Jeton{om}{%
+  \useKVdefault[Jeton]%
+  \setKV[Jeton]{#1}%
+  \ifluatex%
+    \setsepchar{,}\ignoreemptyitems%
+    \readlist*\PfCListeJeton{#2}%
+    \foreachitem\compteur\in\PfCListeJeton{\BuildJeton{\PfCListeJeton[\compteurcnt]}}%
+    \reademptyitems%
+  \fi%
+}%
+
+\NewDocumentCommand\BuildJeton{m}{%
+  \ifluatex%
+    \mplibforcehmode%
+    \begin{mplibcode}
+      input fiziko;
+      
+      boolean Impression;
+      Impression=\useKV[Jeton]{Impression};
+      numeric Diametre;
+      Diametre=\useKV[Jeton]{Diametre};
+      color Fond;
+      Fond= if Impression:white else:BurlyWood fi;
+      
+      path p;
+      p:=fullcircle scaled Diametre;
+      fill p withcolor Fond;
+      JetonAngle:=45+uniformdeviate(30);
+      Intensite:=0.3+uniformdeviate(2)/10;
+      draw woodenThing(p,JetonAngle) withcolor Intensite*Fond;
+      draw p;
+      label(TEX("\bfseries "&decimal(#1)),(0,0));
+    \end{mplibcode}
+  \fi%
+}%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -22,15 +22,15 @@
   \readlist*\ListeKakuroNombres{\ListeAvantNombres}%
   \savecomparemode%
   \comparestrict%
-  \begin{NiceTabular}{*{\useKV[Kakuro]{TLargeur}}{m{\useKV[Kakuro]{Largeur}}}}[hvlines]
+  \begin{NiceTabular}{*{\useKV[Kakuro]{TLargeur}}{m{\useKV[Kakuro]{Largeur}}}}[hvlines]%
     \xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Kakuro]{THauteur}-1}}}\do{%
       \xintFor* ##2 in {\xintSeq{1}{\useKV[Kakuro]{TLargeur}}}\do{%
         \rule{0pt}{\PfCKakuro}%
-        \StrCompare{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}{*}[\PfCTestBlack]
+        \StrCompare{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}{*}[\PfCTestBlack]%
         \xintifboolexpr{\PfCTestBlack==0}{%
           \Block[fill=black]{1-1}{}%
         }{%
-          \xintifboolexpr{\listlen\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2}]==2}{
+          \xintifboolexpr{\listlen\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2}]==2}{%
             \Block[fill=\useKV[Kakuro]{CouleurCase}]{1-1}{\diagbox{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},2]}}%
           }{%
             \Block{1-1}{\ifboolKV[Kakuro]{Solution}{\Large\color{\useKV[Kakuro]{CouleurSolution}}\num{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}}{%

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -0,0 +1,143 @@
+%%%
+% Lego
+%%%
+\setKVdefault[Lego]{Couleur=LightSteelBlue,Unite=8,Diviseur=2,Perso=false,Plaque=false}%
+\defKV[Lego]{ListePerso=\setKV[Lego]{Perso}\xdef\PfCFooLegoListePerso{#1}}%
+
+\NewDocumentCommand\ChoixCouleur{m}{%
+  \xdef\ListeCouleurs{Maroon,PeachPuff,Yellow,red,Gray,Crimson,Cornsilk,Purple,Cornsilk,Salmon}%
+  \readlist*\PfCListeCouleurs{\ListeCouleurs}%
+  \xintifboolexpr{\fpeval{#1+1}>\PfCListeCouleurslen}{\textbf{! Vous demandez trop de couleurs !}}{%
+    \MelangeListe{1,2,3,4,5,6,7,8,9,10}{\fpeval{#1+1}}%
+    \setsepchar{,}\ignoreemptyitems%
+    \readlist*\ListeRotation{\faa}%
+    \xintFor* ##2 in{\xintSeq{1}{#1}}\do{%
+      \xdef\RetiensCouleur{\ListeRotation[##2]}%
+      \xintifForFirst{\xdef\FooCouleur{\PfCListeCouleurs[\RetiensCouleur]}}{\xdef\FooCouleur{\FooCouleur,\PfCListeCouleurs[\RetiensCouleur]}}%
+    }%
+  }%
+}%
+
+\NewDocumentCommand\Lego{o}{%
+  \useKVdefault[Lego]%
+  \setKV[Lego]{#1}%
+  \xdef\PfCNbCouleurs{\fpeval{floor(\useKV[Lego]{Unite}/\useKV[Lego]{Diviseur})}}%
+  \ChoixCouleur{\PfCNbCouleurs}%
+  \ifboolKV[Lego]{Perso}{%
+    \BuildBarreLego{\FooCouleur}{\PfCFooLegoListePerso}%
+  }{%
+    \BuildBarreLego{\FooCouleur}{}%
+  }%
+}%
+
+\NewDocumentCommand\BuildBarreLego{mm}{%
+  \ifluatex%
+    \mplibforcehmode%
+    \begin{mplibcode}
+      boolean Plaque;
+      Plaque=\useKV[Lego]{Plaque};
+      
+      input PfCLego;
+      %
+      vardef ChoixCouleur(text t)=
+      color Brique[];
+      nbc:=0;
+      for p_=t:
+      Brique[nbc]=p_;
+      nbc:=nbc+1;
+      endfor;
+      enddef;
+      %
+      vardef ListePerso(text t)=
+      nbperso=0;
+      for p_=t:
+      Diviseurs[nbperso]=p_;
+      nbperso:=nbperso+1;
+      endfor;
+      enddef;
+      %
+      ChoixCouleur(#1);
+      %
+      Longueur=\useKV[Lego]{Unite};
+      Largeur=2;
+      Diviseur=\useKV[Lego]{Diviseur};
+      color BriqueUnite;
+      BriqueUnite=\useKV[Lego]{Couleur};
+      boolean Perso;
+      Perso=\useKV[Lego]{Perso};
+      %
+      euler(-45,0,0);
+      if Plaque:
+      lego_height_old:=lego_height;
+      lego_height:=lego_thickness;
+      TR:=(0,1,0);
+      Lego_box(2*Longueur,4*Largeur,Gold);
+      TR:=(0,0,0);
+      lego_height:=lego_height_old;
+      fi;      
+      Lego_box(Longueur,Largeur,BriqueUnite);
+      if Perso:
+      Somme=0;
+      ListePerso(#2);
+      for k=0 upto (nbperso-1):
+      TR:=(0.5*(Longueur-Diviseurs[k]-Somme),2,0);
+      Lego_box(Diviseurs[k],2,Brique[k]);
+      Somme:=Somme+2*Diviseurs[k];
+      endfor;
+      else:
+      for k=0 upto ((Longueur div Diviseur)-1):
+      TR:=(0.5*(Longueur-Diviseur)-k*Diviseur,2,0);
+      Lego_box(Diviseur,2,Brique[k]);
+      endfor;
+      fi;
+    \end{mplibcode}
+  \else
+    \begin{mpost}
+      input PfCLego;
+      %
+      vardef ChoixCouleur(text t)=
+      color Brique[];
+      nbc:=0;
+      for p_=t:
+      Brique[nbc]=p_;
+      nbc:=nbc+1;
+      endfor;
+      enddef;
+      %
+      vardef ListePerso(text t)=
+      nbperso=0;
+      for p_=t:
+      Diviseurs[nbperso]=p_;
+      nbperso:=nbperso+1;
+      endfor;
+      enddef;
+      %
+      ChoixCouleur(#1);
+      %
+      Longueur=\useKV[Lego]{Unite};
+      Largeur=2;
+      Diviseur=\useKV[Lego]{Diviseur};
+      color BriqueUnite;
+      BriqueUnite=\useKV[Lego]{Couleur};
+      boolean Perso;
+      Perso=\useKV[Lego]{Perso};
+      %
+      euler(-45,0,0);
+      Lego_box(Longueur,Largeur,BriqueUnite);
+      if Perso:
+      Somme=0;
+      ListePerso(#2);
+      for k=0 upto (nbperso-1):
+      TR:=(0.5*(Longueur-Diviseurs[k]-Somme),2,0);
+      Lego_box(Diviseurs[k],2,Brique[k]);
+      Somme:=Somme+2*Diviseurs[k];
+      endfor;
+      else:
+      for k=0 upto ((Longueur div Diviseur)-1):
+      TR:=(0.5*(Longueur-Diviseur)-k*Diviseur,2,0);
+      Lego_box(Diviseur,2,Brique[k]);
+      endfor;
+      fi;
+    \end{mpost}
+  \fi%
+}%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -5,7 +5,7 @@
 
 \newcounter{CompteurMotEmpile}
 
-\newcommand\MotsEmpiles[2][]{%
+\NewDocumentCommand\MotsEmpiles{om}{%
   \useKVdefault[ClesMotEmpile]%
   \setKV[ClesMotEmpile]{#1}%
   \setcounter{CompteurMotEmpile}{0}%
@@ -18,7 +18,7 @@
     \xintifboolexpr{\ListeMotsEmpilesMax<\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}{\xdef\ListeMotsEmpilesMax{\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}}{}%
   }%
   \begin{NiceTabular}{c|*{\fpeval{\ListeMotsEmpilesMax}}{m{10pt}}}%
-    \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&$\downarrow$\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
+    \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&\Block{}{$\downarrow$}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
     \xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpileslen}}}\do{%
       \rule[-1.2ex]{0pt}{3.8ex}\stepcounter{CompteurMotEmpile}\Alph{CompteurMotEmpile}&\Block{1-\fpeval{\ListeMotsEmpiles[##1,1]}}{}\xintFor* ##2 in {\xintSeq {1}{\fpeval{\ListeMotsEmpiles[##1,1]}}}\do{%
         &
@@ -25,10 +25,10 @@
       }%
       \StrLen{\ListeMotsEmpiles[##1,2]}[\LongueurMot]%
       \xintFor* ##3 in {\xintSeq {1}{\fpeval{\LongueurMot}}}\do{%
-        \xintifForFirst{}{&}\Block[draw=black]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\centering\arraybackslash\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%%
+        \xintifForFirst{}{&}\Block[draw=black,b]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%
       }%
       \\
     }%
-    \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});
+    \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});%
   \end{NiceTabular}%
 }%
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -28,7 +28,7 @@
 \newlength\PfCTableurLargeurUn%
 \newlength\PfCTableurLargeur%
 
-\RequirePackage{printlen}
+%\RequirePackage{printlen}
 
 \newenvironment{Tableur}[1][]{%
   \useKVdefault[Tableur]%
@@ -36,8 +36,8 @@
   \setlength{\PfCTableurLargeurUn}{\fpeval{\useKV[Tableur]{LargeurUn}}pt}%
   \setlength{\PfCTableurLargeur}{\fpeval{\useKV[Tableur]{Largeur}}pt}%
   \ttfamily%
-  \newcolumntype{Y}{>{\centering\arraybackslash}m{\PfCTableurLargeurUn}}%
-  \newcolumntype{X}{>{\centering\arraybackslash}m{\PfCTableurLargeur}}%
+  \newcolumntype{A}{>{\centering\arraybackslash}m{\PfCTableurLargeurUn}}%
+  \newcolumntype{B}{>{\centering\arraybackslash}m{\PfCTableurLargeur}}%
   \setlength{\PfCLongInter}{-40pt+\fpeval{\useKV[Tableur]{LargeurUn}}pt+\fpeval{(\useKV[Tableur]{Colonnes}-2)*\useKV[Tableur]{Largeur}}pt+\fpeval{2*\useKV[Tableur]{Colonnes}-6}\tabcolsep+\fpeval{\useKV[Tableur]{Colonnes}+2}\arrayrulewidth}%  
   \ifboolKV[Tableur]{Bandeau}{%
     \begin{NiceTabular}{p{\PfCTableurLargeur}p{10pt}p{50pt}p{\PfCLongInter}}
@@ -56,7 +56,7 @@
           \ifboolKV[Tableur]{Selection}{%
             \xintifboolexpr{\cntlin>\useKV[Tableur]{Ligne} && \cntlin<\fpeval{\useKV[Tableur]{Ligne}+\useKV[Tableur]{PasL}+1}}{\textcolor{white}{\number\numexpr\cntlin-1\relax}}{\number\numexpr\cntlin-1\relax}%
           }{\number\numexpr\cntlin-1\relax}\fi}%
-        wc{20pt}Y*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{X}}[hvlines]%
+        wc{20pt}A*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{B}}[hvlines]%
       \CodeBefore
       % on colorie en gris toute la première ligne
       \tikz\fill[gray!15](row-1-|col-1) rectangle (row-2-|last);%
@@ -101,4 +101,4 @@
   \repeat%
   \addtot at b{\\&}%
   \collectcp at body}{\the\t at b}%
-\makeatother
\ No newline at end of file
+\makeatother

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex	2023-10-15 20:43:20 UTC (rev 68558)
@@ -1,7 +1,7 @@
 %%%
 % Tableaux d'unit\'es
 %%%
-\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false,CouleurGN=white,CadreGN=black,Tabcolsep=0.275\tabcolsep,Exterieur=false}%
+\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,CarreA=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,CubeA=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false,CouleurGN=white,CadreGN=black,Tabcolsep=0.275\tabcolsep,Exterieur=false}%
 \defKV[ClesTableaux]{ColonnesSup=\setKV[ClesTableaux]{Exterieur}}%
 %
 \newcommand\PfCTBstrut{\rule[-1.2ex]{0pt}{3.8ex}}% Top and Bottom strut
@@ -9,23 +9,23 @@
 \newcommand\PfCBstrut{\rule[-1.2ex]{0pt}{0ex}}% Bottom strut
 
 \newlength\PfCTableauPuissances%
-\newlength\PfCCubeTabColSep
+\newlength\PfCCubeTabColSep%
 
-\def\PfCCG{centaines de milliards}
-\def\PfCDG{dizaines de milliards}
-\def\PfCUG{unit\'es de milliards}
-\def\PfCCM{centaines de millions}
-\def\PfCDM{dizaines de millions}
-\def\PfCUM{unit\'es de millions}
-\def\PfCCm{centaines de milliers}
-\def\PfCDm{dizaines de milliers}
-\def\PfCUm{unit\'es de milliers}
-\def\PfCC{centaines}
-\def\PfCD{dizaines}
-\def\PfCU{unit\'es}
-\def\PfCd{dixi\`emes}
-\def\PfCc{centi\'emes}
-\def\PfCm{milli\`emes}
+\def\PfCCG{centaines de milliards}%
+\def\PfCDG{dizaines de milliards}%
+\def\PfCUG{unit\'es de milliards}%
+\def\PfCCM{centaines de millions}%
+\def\PfCDM{dizaines de millions}%
+\def\PfCUM{unit\'es de millions}%
+\def\PfCCm{centaines de milliers}%
+\def\PfCDm{dizaines de milliers}%
+\def\PfCUm{unit\'es de milliers}%
+\def\PfCC{centaines}%
+\def\PfCD{dizaines}%
+\def\PfCU{unit\'es}%
+\def\PfCd{dixi\`emes}%
+\def\PfCc{centi\'emes}%
+\def\PfCm{milli\`emes}%
 
 \newcommand\Tableau[2][]{%
   \useKVdefault[ClesTableaux]%
@@ -43,6 +43,10 @@
       \xdef\PfCTableauUnite{\cubic\meter}%
       \xdef\PfCCoefConversion{1000}%
     }{}%
+    \ifboolKV[ClesTableaux]{CubeA}{%
+      \xdef\PfCTableauUnite{\cubic\meter}%
+      \xdef\PfCCoefConversion{1000}%
+    }{}%
     \ifboolKV[ClesTableaux]{Gramme}{%
       \xdef\PfCTableauUnite{\gram}%
       \xdef\PfCCoefConversion{10}%
@@ -1219,6 +1223,87 @@
     \]%
   }{}%
   %
+  % Carré Eve
+  %
+  \ifboolKV[ClesTableaux]{CarreA}{%
+    \[\renewcommand{\arraystretch}{1.15}%
+      \begin{NiceTabular}{*{7}{wc{20pt}wc{20pt}}}%
+        \Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}\\
+        \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{km$^2$\PfCTBstrut}&
+        \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{hm$^2$\PfCTBstrut}&
+        \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{dam$^2$\PfCTBstrut}&
+        \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{m$^2$\PfCTBstrut}&
+        \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{dm$^2$\PfCTBstrut}&
+        \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{cm$^2$\PfCTBstrut}&
+        \Block[borders={left,top}]{1-1}{}&\Block[borders={top,right}]{1-1}{mm$^2$\PfCTBstrut}\\
+        \ifboolKV[ClesTableaux]{Are}{%
+          \Block[borders={left,right,bottom}]{1-2}{}&&\Block[draw=gray!50,borders={left,top,bottom}]{}{~}&\Block[borders={top,right,bottom}]{}{\scriptsize ha}&\Block[draw=gray!50,borders={left,top,bottom}]{}{~}&\Block[borders={top,right,bottom}]{}{\scriptsize a}&\Block[borders={left,right,bottom}]{1-2}{}&&\Block[borders={left,right,bottom}]{1-2}{}&&\Block[borders={left,right,bottom}]{1-2}{}&&\Block[borders={left,right,bottom}]{1-2}{}&\\
+        }{\hline}%
+        \xintFor* ##1 in {\xintSeq {1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
+          &&&&&&&&&&&&&\\
+        }%
+        \Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}%
+        &&\Block[]{1-2}{}\\
+        \CodeAfter
+        % on trace les lignes verticales
+        \xintifboolexpr{\useKV[ClesTableaux]{Are}}{%
+          \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+            \tikz\draw (4-|\fpeval{2*(##1-1)+1})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+1});
+          }%
+          \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+            \tikz\draw[gray!50] (4-|\fpeval{2*(##1-1)+2})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+2});
+          }%
+        }{%
+          \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+            \tikz\draw (3-|\fpeval{2*(##1-1)+1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+1});
+          }%
+          \xintifboolexpr{\useKV[ClesTableaux]{Colonnes}}{%
+            \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+              \tikz\draw[gray!50] (3-|\fpeval{2*(##1-1)+2})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+2});
+            }%
+          }{}%
+        }%
+        % On place le nombre éventuel
+        \ifx\bla#2\bla%
+        \else%
+        \setsepchar[*]{,*/}
+        \readlist*\ListeNombreAPlacer{#2}%
+        \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{
+          \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]%
+          \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{%
+            \tikz\node at (\fpeval{##2+\ifboolKV[ClesTableaux]{Are}{3.5}{2.5}}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}};
+          }%
+        }
+        \fi%
+        % on trace les flèches
+        \ifboolKV[ClesTableaux]{Fleches}{\setKV[ClesTableaux]{FlechesH,FlechesB}}{}%
+        \ifboolKV[ClesTableaux]{Are}{\xdef\PfCTableauDepart{4}}{\xdef\PfCTableauDepart{3}}%
+        \ifboolKV[ClesTableaux]{FlechesH}{%
+          \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+            \tikz\draw[gray,->,>=latex,out=30,in=150] (1.5-|\fpeval{2*##1+0.5}) to node[above, midway]{\small$\times\num{100}$}(1.5-|\fpeval{2*(##1+1)+0.5});%
+          }%
+        }{}%
+        \ifboolKV[ClesTableaux]{FlechesB}{%
+          \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+            \tikz\draw[gray,->,>=latex,out=-150,in=-30] (\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{2*(##1+1)+0.5}) to node[below,midway]{\small$\div\num{100}$}(\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{2*##1+0.5});%
+          }%
+        }{}%
+        \useKV[ClesTableaux]{CodeAfter}%
+      \end{NiceTabular}
+    \]%
+  }{}%
+  %
   %%% Prise en compte de la cl\'e Cube
   %
   \ifboolKV[ClesTableaux]{Cube}{%
@@ -1299,7 +1384,86 @@
       \end{NiceTabular}
     \]%
   }{}%
+  % 
+  %%% Prise en compte de la cl\'e CubeA (Idée d'Eve Chambon)
   %
+  \ifboolKV[ClesTableaux]{CubeA}{%
+    \setlength{\PfCCubeTabColSep}{\useKV[ClesTableaux]{Tabcolsep}}
+  \[\renewcommand{\arraystretch}{1.15}%
+    \setlength{\tabcolsep}{\PfCCubeTabColSep}%
+    \begin{NiceTabular}{*{7}{wc{25pt}wc{25pt}wc{25pt}}}
+      \Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}\\
+      \Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{km$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{hm$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{dam$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{m$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{dm$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{cm$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{mm$^3$\PfCTBstrut}\\
+      \ifboolKV[ClesTableaux]{Capacite}{%
+        \Block[borders={left,right,bottom}]{1-3}{}&&&\Block[borders={right,bottom}]{1-3}{}&&&\Block[borders={right,bottom}]{1-3}{}&&&\Block[borders={right,bottom}]{1-3}{}&&&\Block[draw=gray!50,borders={top,left,bottom}]{}{\scriptsize hL}&\Block[draw=gray!50,borders={top,bottom}]{}{\scriptsize daL}&\Block[draw=gray!50,borders={top,right,bottom}]{}{\scriptsize L}&\Block[draw=gray!50,borders={top,left,bottom}]{}{\scriptsize dL}&\Block[draw=gray!50,borders={top,bottom}]{}{\scriptsize cL}&\Block[draw=gray!50,borders={top,right,bottom}]{}{\scriptsize mL}&\Block[borders={right,bottom}]{1-3}{}&&\\
+      }{\hline}%
+      \xintFor* ##1 in {\xintSeq{1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
+        &&&&&&&&&&&&&&&&&&&&\\
+      }%
+      \Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}%
+      &&&\Block[]{1-3}{}\\
+      \CodeAfter
+      % on trace les lignes verticales
+      \xintifboolexpr{\useKV[ClesTableaux]{Capacite}}{%
+        \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+          \tikz\draw (4-|\fpeval{3*(##1-1)+1})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+1});
+        }%
+        \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+          \tikz\draw[gray!50] (4-|\fpeval{3*(##1-1)+2})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+2});
+          \tikz\draw[gray!50] (4-|\fpeval{3*##1})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*##1});
+        }%
+      }{%
+        \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+          \tikz\draw (3-|\fpeval{3*(##1-1)+1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+1});
+        }%
+        \xintifboolexpr{\useKV[ClesTableaux]{Colonnes}}{%
+          \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+            \tikz\draw[gray!50] (3-|\fpeval{3*(##1-1)+2})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+2});
+            \tikz\draw[gray!50] (3-|\fpeval{3*##1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*##1});
+          }%
+        }{}%
+      }%
+      % On place le nombre éventuel
+      \ifx\bla#2\bla%
+      \else%
+        \setsepchar[*]{,*/}
+        \readlist*\ListeNombreAPlacer{#2}%
+        \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{
+          \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]%
+          \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{%
+            \tikz\node at (\fpeval{##2+\ifboolKV[ClesTableaux]{Capacite}{3.5}{2.5}}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}};
+            }%
+          }%
+        \fi%
+        % on trace les flèches
+        \ifboolKV[ClesTableaux]{Fleches}{\setKV[ClesTableaux]{FlechesH,FlechesB}}{}%
+          \ifboolKV[ClesTableaux]{Capacite}{\xdef\PfCTableauDepart{4}}{\xdef\PfCTableauDepart{3}}%
+            \ifboolKV[ClesTableaux]{FlechesH}{%
+                \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+                  \tikz\draw[gray,->,>=latex,out=30,in=150] (1.5-|\fpeval{3.5+3*(##1-1)}) to node[above, midway]{\small$\times\num{1000}$}(1.5-|\fpeval{3.5+3*##1});%
+                }%
+              }{}%
+              \ifboolKV[ClesTableaux]{FlechesB}{%
+                  \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+                    \tikz\draw[gray,->,>=latex,out=-150,in=-30] (\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{3.5+3*##1}) to node[below,midway]{\small$\div\num{1000}$}(\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{3.5+3*(##1-1)});%
+                  }%
+                }{}%
+                \useKV[ClesTableaux]{CodeAfter}%
+              \end{NiceTabular}
+  \]%
+  }{}%
+  %
   %%% Prise en compte de la cl\'e Litre
   %
   \ifboolKV[ClesTableaux]{Litre}{%

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2023-10-15 20:42:19 UTC (rev 68557)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2023-10-15 20:43:20 UTC (rev 68558)
@@ -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/10/08}%
+\def\filedate{2023/10/15}%
 \let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-u}%
+\def\fileversion{0.99-z-v}%
 \let\PfCfileversion\fileversion%
 \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
 
@@ -599,6 +599,8 @@
 }%\emoticon
 }%\raisebox
 }%
+\input{PfCLego}
+\input{PfCJeton}
 \input{PfCDessinAlgo}
 \input{PfCBonbon}
 \input{PfCPattern}



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