texlive[66856] Master/texmf-dist: profcollege (15apr23)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 15 22:49:33 CEST 2023


Revision: 66856
          http://tug.org/svn/texlive?view=revision&revision=66856
Author:   karl
Date:     2023-04-15 22:49:32 +0200 (Sat, 15 Apr 2023)
Log Message:
-----------
profcollege (15apr23)

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/PfCGeometrie.mp
    trunk/Master/texmf-dist/metapost/profcollege/PfCObjets.mp
    trunk/Master/texmf-dist/metapost/profcollege/PfCSolid.mp
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCEcritureUnites.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCNotionFonction.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagore.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCRangementNombres.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCReperage.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresentationGraphique.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCResoudreEquation.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCSimplifierFraction.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculsFractions.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCFactorisation.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeuRangement.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagoreold.tex
    trunk/Master/texmf-dist/tex/latex/profcollege/PfCTrio.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/PfCGeometrie.mp
===================================================================
--- trunk/Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp	2023-04-15 20:49:32 UTC (rev 66856)
@@ -1559,7 +1559,7 @@
   axx=image(
     drawarrow (x.so*cm,y.origine)--(x.ne*cm,y.origine);
     drawarrow (x.origine,y.so*cm)--(x.origine,y.ne*cm);
-    label.llft(btex $O$ etex,z.origine);
+    label.llft(LATEX($O$),z.origine);
     );
   axx
 enddef;

Modified: trunk/Master/texmf-dist/metapost/profcollege/PfCObjets.mp
===================================================================
--- trunk/Master/texmf-dist/metapost/profcollege/PfCObjets.mp	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/metapost/profcollege/PfCObjets.mp	2023-04-15 20:49:32 UTC (rev 66856)
@@ -42,6 +42,120 @@
 boolean couleurz;%pour g\xE9rer l'affichage "des lignes" de niveaux
 couleurz:=false;
 
+vardef AffichagePfC[]=
+  save _affi;
+  picture _affi;
+  color Fc[][];color cou[];
+  tapj:=0;
+  for k=0 upto apj.@:
+    cpt[tapj]:=tapj;
+    Fc[tapj].nb:=OTFc.@[k].nb;
+    for l=1 upto Fc[tapj].nb:
+      Fc[tapj][l]:=OTFc.@[k][l];
+    endfor;
+    Fc[tapj].iso:=OTFc.@[k].iso;
+    ALT[tapj]:=ALT.@[k];
+    Vue[tapj]:=Vue.@[k];
+    tapj:=tapj+1;
+  endfor;
+  tapj:=tapj-1;
+  QS(0,tapj);
+  %if Transparence :
+  for k=0 upto tapj:
+    if Vue[cpt[k]]=false:
+%	fill for l=1 upto Fc[cpt[k]].nb:
+%	    Projette(Fc[cpt[k]][l])--
+%	endfor
+%	cycle withcolor abs(lumin(cpt[k]))*cou[cpt[k]];
+%	if traits=true:
+      draw Projette(Fc[cpt[k]][1]) for l=2 upto Fc[cpt[k]].nb-1:
+	  --Projette(Fc[cpt[k]][l])
+      endfor
+       dashed evenly withpen pencircle scaled0.25 withcolor 0.7white;
+%	fi;
+    fi;
+  endfor;
+  for k=0 upto tapj:
+    if Vue[cpt[k]]:
+%	transparence for l=1 upto Fc[cpt[k]].nb:
+%	    Projette(Fc[cpt[k]][l])--
+%	endfor
+%	cycle;
+%	if traits=true:
+      draw for l=1 upto Fc[cpt[k]].nb:
+	  Projette(Fc[cpt[k]][l])--
+      endfor
+      cycle withpen pencircle scaled0.5 withcolor 0.25white;
+%	fi;
+    fi;
+  endfor;
+enddef;
+
+vardef AffichageEquateur[]=
+  save _affi;
+  picture _affi;
+  color Fc[][];color cou[];
+  tapj:=0;
+  for k=0 upto apj.@:
+    cpt[tapj]:=tapj;
+    Fc[tapj].nb:=OTFc.@[k].nb;
+    for l=1 upto Fc[tapj].nb:
+      Fc[tapj][l]:=OTFc.@[k][l];
+    endfor;
+    Fc[tapj].iso:=OTFc.@[k].iso;
+    ALT[tapj]:=ALT.@[k];
+    Vue[tapj]:=Vue.@[k];
+    tapj:=tapj+1;
+  endfor;
+  tapj:=tapj-1;
+  QS(0,tapj);
+  for k=0 upto tapj:
+ %   if Vue[cpt[k]]=false:
+      draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][4])
+      if Vue[cpt[k]]=false:
+      dashed evenly;
+    fi;
+%  endfor;
+%  for k=0 upto tapj:
+%    if Vue[cpt[k]]:
+%    else:
+%      draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][4]);
+%    fi;
+  endfor;
+  drawoptions();
+enddef;
+
+vardef AffichageGreenwich[]=
+  save _affi;
+  picture _affi;
+  color Fc[][];color cou[];
+  tapj:=0;
+  for k=0 upto apj.@:
+    cpt[tapj]:=tapj;
+    Fc[tapj].nb:=OTFc.@[k].nb;
+    for l=1 upto Fc[tapj].nb:
+      Fc[tapj][l]:=OTFc.@[k][l];
+    endfor;
+    Fc[tapj].iso:=OTFc.@[k].iso;
+    ALT[tapj]:=ALT.@[k];
+    Vue[tapj]:=Vue.@[k];
+    tapj:=tapj+1;
+  endfor;
+  tapj:=tapj-1;
+  QS(0,tapj);
+  for k=0 upto tapj:
+    draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2])
+      if Vue[cpt[k]]=false:
+      dashed evenly;
+    fi;% withpen pencircle scaled0.75;
+  endfor;
+%  for k=0 upto tapj:
+%    if Vue[cpt[k]]:
+%      draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2]);
+%    fi;
+%  endfor;
+enddef;
+
 vardef AffichageObjet[]=
   save _affi;
   picture _affi;
@@ -668,6 +782,177 @@
   apj.@:=apj-1;
 enddef;
 
+vardef ObjetSpherePfC[](expr Rn)=
+%  subh:=12;
+%  NewOeil:=(0,0,0);
+  Outcolor.@:=outcolor;
+  Incolor.@:=incolor;
+  if creux:Ferme.@:=false else: Ferme.@:=true fi;
+  scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";");
+  vardef Famille(expr u,v)=(R*(cos(u)*cos(v),cos(u)*sin(v),sin(u))) enddef;
+  umin:=-pi/2; upas:=pi/nb;% umax:=0;
+  vmin:=-pi; vpas:=2*pi/subh;% vmax:=2*pi;
+  apj:=0;
+  %On cr\xE9e les facettes et on calcule la profondeur en Z.
+  for k=0 upto nb-1:
+    for l=0 upto (subh-1):
+      tcpt.@[apj]:=apj;
+      OTFc.@[apj].nb:=4;
+      OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas));%1
+      OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas));%2
+      OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas));%3
+      OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas));%4
+      OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4;
+      ALT.@[apj]:=Zpart(GCoord(OTFc.@[apj].iso));
+      if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))<0:%OTFc.@[apj][1]
+	Vue.@[apj]:=false;coul.@[apj]:=outcolor;
+      else:
+	Vue.@[apj]:=true;coul.@[apj]:=incolor;
+%	drawarrow Projette(OTFc.@[apj].iso)--Projette(OTFc.@[apj].iso+Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]));
+%	drawarrow Projette(OTFc.@[apj].iso)--Projette(NewOeil-OTFc.@[apj].iso);	
+      fi;
+      apj:=apj+1;
+    endfor;
+  endfor;
+  apj.@:=apj-1;
+enddef;
+
+vardef ObjetSphereCabinet[](expr Rn)=
+%  Oeil:=(0,0,0);
+%  subh:=subh;
+ % nb:=8;
+  Outcolor.@:=outcolor;
+  Incolor.@:=incolor;
+  if creux:Ferme.@:=false else: Ferme.@:=true fi;
+  scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";");
+  vardef Famille(expr u,v)=(R*(cosd(u)*cosd(v),cosd(u)*sind(v),sind(u))) enddef;
+  umin:=-90; upas:=180/nb;% umax:=0;
+  vmin:=-180; vpas:=360/subh;% vmax:=2*pi;
+  apj:=0;
+  %On cr\xE9e les facettes et on calcule la profondeur en Z.
+  for k=0 upto nb-1:%nb-1:
+    for l=0 upto (subh-1):
+      tcpt.@[apj]:=apj;
+      OTFc.@[apj].nb:=4;
+      OTFc.@[apj][1]:=(Famille(umin+(k+1)*upas,vmin+l*vpas));%1
+      OTFc.@[apj][2]:=(Famille(umin+k*upas,vmin+l*vpas));%2
+      OTFc.@[apj][3]:=(Famille(umin+k*upas,vmin+(l+1)*vpas));%3
+      OTFc.@[apj][4]:=(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas));%4
+      OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4;
+      ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso));
+      PfCPS:=ProduitScalaire(Oeil-OTFc.@[apj][1],Normal(OTFc.@[apj][1],OTFc.@[apj][2],OTFc.@[apj][3]))/1000;
+%      PfCPS:=ProduitScalaire(Oeil,-OTFc.@[apj].iso)/1000;
+      if PfCPS<0:%ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))<0:%OTFc.@[apj][1]
+	Vue.@[apj]:=false;coul.@[apj]:=incolor;
+	%label(TEX("visible"&decimal(floor(0.01*ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj][1],OTFc.@[apj][2],OTFc.@[apj][3]))))),(0,0)+5mm*(0,-apj));
+%	dotlabel.llft(decimal(1),Projette(OTFc.@[apj][1]));
+%	dotlabel.llft(decimal(2),Projette(OTFc.@[apj][2]));
+%	dotlabel.llft(decimal(4),Projette(OTFc.@[apj][4]));
+%	drawarrow Projette(OTFc.@[apj][1])--Projette(OTFc.@[apj][1]+Normal(OTFc.@[apj][1],OTFc.@[apj][2],OTFc.@[apj][3]));
+%	drawarrow Projette(OTFc.@[apj][1])--Projette(Oeil+OTFc.@[apj][1]);
+%	label.rt(decimal(PfCPS)&"/Oeil-P1",Projette(OTFc.@[apj][1]+Normal(OTFc.@[apj][1],OTFc.@[apj][2],OTFc.@[apj][3])));
+	apj:=apj+1;
+      else:%if PfCPS>0:
+	Vue.@[apj]:=true;coul.@[apj]:=outcolor;
+%	dotlabel.llft(decimal(1),Projette(OTFc.@[apj][1]));
+%	dotlabel.llft(decimal(2),Projette(OTFc.@[apj][2]));
+%	dotlabel.llft(decimal(3),Projette(OTFc.@[apj][3]));
+%	dotlabel.llft(decimal(4),Projette(OTFc.@[apj][4]));
+%	drawarrow Projette(OTFc.@[apj][1])--Projette(OTFc.@[apj][1]+Normal(OTFc.@[apj][1],OTFc.@[apj][2],OTFc.@[apj][3]));
+%	drawarrow Projette(OTFc.@[apj][1])--Projette(Oeil+OTFc.@[apj][1]);
+%	label(TEX(decimal(floor(ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))))),Projette(OTFc.@[apj].iso));
+%	drawarrow Projette(OTFc.@[apj].1)--Projette(OTFc.@[apj].iso+Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]));
+%	drawarrow Projette(OTFc.@[apj].iso)--Projette(NewOeil-OTFc.@[apj].iso);
+	      apj:=apj+1;
+      fi;
+    endfor;
+  endfor;
+  apj.@:=apj-1;
+enddef;
+
+vardef ObjetEquateur[](expr Rn)=
+  Outcolor.@:=outcolor;
+  Incolor.@:=incolor;
+  if creux:Ferme.@:=false else: Ferme.@:=true fi;
+  scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";");
+  vardef Famille(expr u,v)=(R*(cos(u)*cos(v),cos(u)*sin(v),sin(u))) enddef;
+%  umin:=-pi/2; upas:=pi/nb; umax:=pi/2;
+  umin:=-pi/nb; upas:=pi/nb; umax:=0;
+  vmin:=-pi; vpas:=2*pi/subh; vmax:=-pi+vpas;
+  apj:=0;
+  %On cr\xE9e les facettes et on calcule la profondeur en Z.
+  for k=0 upto 0:%(nb-1):
+    for l=0 upto (subh-1):%(subh-1):
+      tcpt.@[apj]:=apj;
+      OTFc.@[apj].nb:=4;
+      OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas));
+      OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas));
+      OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas));
+      OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas));
+      OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4;
+      ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso));
+      if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0:
+	Vue.@[apj]:=true;coul.@[apj]:=outcolor;
+      else:
+	Vue.@[apj]:=false;coul.@[apj]:=incolor;
+      fi;
+      apj:=apj+1;
+    endfor;
+  endfor;
+  apj.@:=apj-1;
+enddef;
+
+vardef ObjetGreenwich[](expr Rn)=
+  Outcolor.@:=outcolor;
+  Incolor.@:=incolor;
+  if creux:Ferme.@:=false else: Ferme.@:=true fi;
+  scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";");
+  vardef Famille(expr u,v)=(R*(cos(u)*cos(v),cos(u)*sin(v),sin(u))) enddef;
+  umin:=-pi/2; upas:=pi/nb; umax:=pi;
+  vmin:=0; vpas:=2*pi/subh; vmax:=2*pi;
+  apj:=0;
+  %On cr\xE9e les facettes et on calcule la profondeur en Z.
+  for l=0 upto 0:%(subh-1):
+  for k=0 upto nb-1:%(nb-1):
+      tcpt.@[apj]:=apj;
+      OTFc.@[apj].nb:=4;
+      OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas));
+      OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas));
+      OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas));
+      OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas));
+      OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4;
+      ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso));
+      if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0:
+	Vue.@[apj]:=true;coul.@[apj]:=outcolor;
+      else:
+	Vue.@[apj]:=false;coul.@[apj]:=incolor;
+      fi;
+      apj:=apj+1;
+    endfor;
+  endfor;
+  umin:=-pi/2; upas:=pi/nb; umax:=pi;
+  vmin:=pi; vpas:=2*pi/subh; vmax:=2*pi;
+  for l=0 upto 0:
+  for k=0 upto nb-1:%(nb-1):
+      tcpt.@[apj]:=apj;
+      OTFc.@[apj].nb:=4;
+      OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas));
+      OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas));
+      OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas));
+      OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas));
+      OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4;
+      ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso));
+      if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0:
+	Vue.@[apj]:=true;coul.@[apj]:=outcolor;
+      else:
+	Vue.@[apj]:=false;coul.@[apj]:=incolor;
+      fi;
+      apj:=apj+1;
+    endfor;
+  endfor;
+  apj.@:=apj-1;
+enddef;
+
 vardef Objetcalotte[](expr Rn,Phib,Phih)=
   Outcolor.@:=outcolor;
   Incolor.@:=incolor;

Modified: trunk/Master/texmf-dist/metapost/profcollege/PfCSolid.mp
===================================================================
--- trunk/Master/texmf-dist/metapost/profcollege/PfCSolid.mp	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/metapost/profcollege/PfCSolid.mp	2023-04-15 20:49:32 UTC (rev 66856)
@@ -54,12 +54,18 @@
   Aux6:=Aux1*Aux2;
   Aux7:=Aux3*Aux4;
   Aux8:=Aux1*Aux4;
+  color Oeil;
+%  if typerepre="cabinet":
+%    Oeil=(Rho,0,0);
+%  else:
+    Oeil=(Aux7,Aux8,Aux2)*Rho;
+%  fi;
   pointilles:="oui";
   Lumiere:=Oeil;
 enddef;
 
-vardef Oeil=(Rho*Aux7,Rho*Aux8,Rho*Aux2)
-enddef;
+%vardef Oeil=(Rho*Aux7,Rho*Aux8,Rho*Aux2)
+%enddef;
 
 vardef sin(expr t) = sind(c*t) enddef;
 
@@ -104,11 +110,17 @@
 unit:=1;%pour les mises \xE0 l'\xE9chelle :) Merci pst-solides3d
 
 vardef Projette(expr M)=
-  %if typerepre="proj":
-  %  unit*(DE*(Xpart(GCoord(M)/Zpart(GCoord(M))),(Ypart(GCoord(M))/Zpart(GCoord(M)))))
-  %elseif typerepre="persp":
-    unit*(DE*(Xpart(GCoord(M)),Ypart(GCoord(M))))
-  %fi
+  if typerepre="proj":
+    ((Xpart(GCoord(M)),Ypart(GCoord(M)))/Zpart(GCoord(M)))*DE*10%
+  elseif typerepre="persp":
+    (Xpart(GCoord(M)),Ypart(GCoord(M)))*unit*DE
+  elseif typerepre="cabinet":
+%    (0.5*cosd(30)*Xpart(GCoord(M)),0.75*sind(30)*Ypart(GCoord(M)))*unit*DE
+    (Xpart(GCoord(M))+0.5*cosd(30)*Zpart(GCoord(M)),Ypart(GCoord(M))+0.5*sind(30)*Zpart(GCoord(M)))*20
+%    (0.5*cosd(45)*Xpart(GCoord(M)),0.5*sind(45)*Ypart(GCoord(M)))*unit*DE
+%    (Xpart(GCoord(M)),Ypart(GCoord(M)))*unit*DE
+    %(Xpart(GCoord(M)),Ypart(GCoord(M)))*10
+  fi
 enddef;
 
 vardef TraceAxes=
@@ -181,7 +193,6 @@
 enddef;
 
 vardef ProduitScalaire(expr wec,mor)=
-  %Mexp(Mlog redpart(wec) Mmul Mlog redpart(mor))+Mexp(Mlog greenpart(wec) Mmul Mlog greenpart(mor))+Mexp(Mlog bluepart(wec) Mmul Mlog bluepart(mor))
   Xpart(wec)*Xpart(mor)+Ypart(wec)*Ypart(mor)+Zpart(wec)*Zpart(mor)
 enddef;
 %pour les rotations et translations

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculsFractions.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculsFractions.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculsFractions.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -0,0 +1,177 @@
+\setKVdefault[CalculsFractions]{Couleur=Crimson}
+
+\NewDocumentCommand\tofrac{m}{%
+  \IfDecimal{#1}{#1}{%
+    \StrBefore{#1}{/}[\PfCnum]%
+    \StrBehind{#1}{/}[\PfCden]%
+    \frac{\PfCnum}{\PfCden}%
+  }%
+}%
+
+\NewDocumentCommand\AddFraction{soommo}{%
+  \useKVdefault[CalculsFractions]%
+  \setKV[CalculsFractions]{#2}%
+  \IfBooleanTF{#1}{%
+    \xdef\PfCFractionOp{-}%
+  }{%
+    \xdef\PfCFractionOp{+}%
+  }%
+  \IfDecimal{#4}{%
+    \xdef\PfCNumA{#4}%
+    \xdef\PfCNumB{1}%
+  }{%
+    \StrCut{#4}{/}\PfCNumA\PfCNumB%
+  }%
+  \IfDecimal{#5}{%
+    \xdef\PfCNumC{#5}%
+    \xdef\PfCNumD{1}%
+  }{%
+    \StrCut{#5}{/}\PfCNumC\PfCNumD%
+  }
+  \xdef\PfCAddFoo{\PfCNumA/\PfCNumB,\PfCNumC/\PfCNumD}%
+  \setsepchar[*]{,*/}\ignoreemptyitems%
+  \readlist*\ListeFractions{\PfCAddFoo}%
+  \reademptyitems
+  \setsepchar{,}%
+  % Partie calculs
+  \PGCD{\ListeFractions[1,2]}{\ListeFractions[2,2]}%
+  \xdef\PfCPremierMul{\fpeval{\ListeFractions[2,2]/\the\pgcd}}%
+  \xdef\PfCDeuxiemeMul{\fpeval{\ListeFractions[1,2]/\the\pgcd}}%
+  \xdef\PfCAddNumFin{\fpeval{(\ListeFractions[1,1])*(\PfCPremierMul)\PfCFractionOp(\ListeFractions[2,1])*(\PfCDeuxiemeMul)}}%
+  \xdef\PfCAddDenoFin{\fpeval{(\ListeFractions[1,2])*(\PfCPremierMul)}}%
+  \PGCD{\fpeval{abs(\PfCAddNumFin)}}{\fpeval{abs(\PfCAddDenoFin)}}\xdef\PfCAddPgcd{\the\pgcd}%
+  \xdef\PfCAddNumSimp{\fpeval{\PfCAddNumFin/\PfCAddPgcd}}%
+  \xdef\PfCAddDenoSimp{\fpeval{\PfCAddDenoFin/\PfCAddPgcd}}%
+  \xdef\PfCAddSumSimp{\PfCAddNumSimp/\PfCAddDenoSimp}%
+  \IfValueT{#6}{\xdef#6{\PfCAddSumSimp}}%
+  % Partie affichage
+  \ensuremath{%
+    \IfValueTF{#3}{%
+      \ifnum#3=4\relax%
+      \tofrac{\PfCAddSumSimp}%
+      \else%
+      \ifnum#3=3\relax%
+      \SSimpliTest{\fpeval{abs(\PfCAddNumFin)}}{\fpeval{abs(\PfCAddDenoFin)}}\ifthenelse{\boolean{Simplification}}{\tofrac{\PfCAddNumFin/\PfCAddDenoFin}}{\tofrac{\PfCAddSumSimp}}%
+      \else%
+      \ifnum#3=1\relax%
+      \ifnum\PfCPremierMul>1\relax%
+      \frac{\ListeFractions[1,1]_{\times\num{\PfCPremierMul}}}{\ListeFractions[1,2]_{\times\num{\PfCPremierMul}}}
+      \else%
+      \tofrac{#4}%
+      \fi%
+      \PfCFractionOp%
+      \ifnum\PfCDeuxiemeMul>1\relax%
+      \frac{\ListeFractions[2,1]_{\times\num{\PfCDeuxiemeMul}}}{\ListeFractions[2,2]_{\times\num{\PfCDeuxiemeMul}}}%
+      \else%
+      \tofrac{#5}%
+      \fi%
+      \else%
+      \ifnum#3=2\relax%
+      \frac{\num{\fpeval{\ListeFractions[1,1]*\PfCPremierMul}}}{\num{\fpeval{\ListeFractions[1,2]*\PfCPremierMul}}}\PfCFractionOp\frac{\num{\fpeval{\ListeFractions[2,1]*\PfCDeuxiemeMul}}}{\num{\fpeval{\ListeFractions[2,2]*\PfCDeuxiemeMul}}}%
+      \fi%
+      \fi%
+      \fi%
+      \fi%
+    }{\tofrac{#4}\PfCFractionOp\tofrac{#5}
+    }%
+  }%
+}%
+
+\NewDocumentCommand\SousFraction{oomm}{%
+  \AddFraction*[#1][#2]{#3}{#4}%
+}%
+
+\NewDocumentCommand\MulFraction{oommo}{%
+  \useKVdefault[CalculsFractions]%
+  \setKV[CalculsFractions]{#1}%
+  \IfDecimal{#3}{%
+    \xdef\PfCNumA{#3}%
+    \xdef\PfCNumB{1}%
+  }{%
+    \StrCut{#3}{/}{\PfCNumA}{\PfCNumB}%
+  }%
+  \IfDecimal{#4}{%
+    \xdef\PfCNumC{#4}%
+    \xdef\PfCNumD{1}%
+  }{%
+    \StrCut{#4}{/}{\PfCNumC}{\PfCNumD}%
+  }%
+  \xdef\PfCMulFoo{\PfCNumA/\PfCNumB,\PfCNumC/\PfCNumD}%
+  \setsepchar[*]{,*/}\ignoreemptyitems%
+  \readlist*\ListeFractions{\PfCMulFoo}%
+  \reademptyitems
+  \setsepchar{,}%
+  % Calculs
+  \xdef\PfCMulNumFin{\fpeval{(\ListeFractions[1,1])*(\ListeFractions[2,1])}}
+  \xdef\PfCMulDenoFin{\fpeval{\ListeFractions[1,2]*\ListeFractions[2,2]}}
+  \PGCD{\fpeval{abs(\PfCMulNumFin)}}{\fpeval{abs(\PfCMulDenoFin)}}\xdef\PfCMulPgcd{\pgcd}%
+  \xdef\PfCMulNumSimp{\fpeval{\PfCMulNumFin/\PfCMulPgcd}}%
+  \xdef\PfCMulDenoSimp{\fpeval{\PfCMulDenoFin/\PfCMulPgcd}}%
+  \xdef\PfCMulPdtSimp{\PfCMulNumSimp/\PfCMulDenoSimp}%
+  \IfValueT{#5}{\xdef#5{\PfCMulPdtSimp}}%
+  \ensuremath{%
+    \IfValueTF{#2}{%
+      \ifnum#2=3\relax
+      \tofrac{\PfCMulPdtSimp}%
+      \else
+      \ifnum#2=2\relax%
+      \SSimpliTest{\PfCMulNumFin}{\PfCMulDenoFin}\ifthenelse{\boolean{Simplification}}{\frac{\ifnum\PfCMulNumFin<0\relax-\fi\Decomposition[Longue]{\fpeval{abs(\PfCMulNumFin)}}}{\ifnum\PfCMulDenoFin<0\relax-\fi\Decomposition[Longue]{\fpeval{abs(\PfCMulDenoFin)}}}}{\tofrac{\PfCMulPdtSimp}}%
+      \else%
+      \ifnum#2=1\relax%
+       \frac{\ListeFractions[1,1]\times\ifnum\ListeFractions[2,1]<0\relax(\fi\ListeFractions[2,1]\ifnum\ListeFractions[2,1]<0\relax)\fi}{\ListeFractions[1,2]\times\ifnum\ListeFractions[2,2]<0\relax(\fi\ListeFractions[2,2]\ifnum\ListeFractions[2,2]<0\relax)\fi}
+      \fi
+      \fi
+      \fi
+    }{\tofrac{#3}\times\tofrac{#4}
+    }
+  }%
+}%
+
+\NewDocumentCommand\DivFraction{oommo}{%
+  \useKVdefault[CalculsFractions]%
+  \setKV[CalculsFractions]{#1}%
+  \IfDecimal{#3}{%
+    \xdef\PfCNumA{#3}%
+    \xdef\PfCNumB{1}%
+  }{%
+    \StrCut{#3}{/}{\PfCNumA}{\PfCNumB}%
+  }%
+  \IfDecimal{#4}{%
+    \xdef\PfCNumC{#4}%
+    \xdef\PfCNumD{1}%
+  }{%
+    \StrCut{#4}{/}{\PfCNumC}{\PfCNumD}%
+  }%
+  \xdef\PfCDivFoo{\PfCNumA/\PfCNumB,\PfCNumC/\PfCNumD}%
+  \setsepchar[*]{,*/}\ignoreemptyitems%
+  \readlist*\ListeFractions{\PfCDivFoo}%
+  \reademptyitems%
+  \setsepchar{,}%
+  % Calculs
+  \xdef\PfCDivNumFin{\fpeval{(\ListeFractions[1,1])*(\ListeFractions[2,2])}}%
+  \xdef\PfCDivDenoFin{\fpeval{\ListeFractions[1,2]*\ListeFractions[2,1]}}%
+  \PGCD{\fpeval{abs(\PfCDivNumFin)}}{\fpeval{abs(\PfCDivDenoFin)}}\xdef\PfCDivPgcd{\pgcd}%
+  \xdef\PfCDivNumSimp{\fpeval{\PfCDivNumFin/\PfCDivPgcd}}%
+  \xdef\PfCDivDenoSimp{\fpeval{\PfCDivDenoFin/\PfCDivPgcd}}%
+  \xdef\PfCDivPdtSimp{\PfCDivNumSimp/\PfCDivDenoSimp}%
+  \IfValueT{#5}{\xdef#5{\PfCDivPdtSimp}}%
+  \ensuremath{%
+    \IfValueTF{#2}{%
+      \ifnum#2=4\relax
+      \tofrac{\PfCDivPdtSimp}%
+      \else\ifnum#2=3\relax
+      \MulFraction[][\fpeval{#2-1}]{\ListeFractions[1,1]/\ListeFractions[1,2]}{\ListeFractions[2,2]/\ListeFractions[2,1]}%
+      \else
+      \ifnum#2=2\relax%
+      \MulFraction[][\fpeval{#2-1}]{\ListeFractions[1,1]/\ListeFractions[1,2]}{\ListeFractions[2,2]/\ListeFractions[2,1]}%
+      \else%
+      \ifnum#2=1\relax%
+      \tofrac{\ListeFractions[1,1]/\ListeFractions[1,2]}\times\tofrac{\ListeFractions[2,2]/\ListeFractions[2,1]}
+      \fi
+      \fi
+      \fi
+      \fi
+    }{\tofrac{#3}\div\tofrac{#4}
+    }
+  }%
+}%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCCalculsFractions.tex
___________________________________________________________________
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-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -38,6 +38,9 @@
   colbacktitle=TrameCouleur,%
 }%
 
+\newcommand\PfCTexteJai{J'ai}
+\newcommand\PfCTexteQuia{Qui a ?}
+
 \makeatletter
 \newtcolorbox{MyboxJQ}[2]{%
   enhanced,%
@@ -65,9 +68,9 @@
     \coordinate[yshift=3mm] (C3) at (frame.south);
     \coordinate[xshift=\largeurcarte/2] (A3) at (A1);
     \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A3){};
-    \node[TexteCouleur] (T1a) at (T1){\Large J'ai};
+    \node[TexteCouleur] (T1a) at (T1){\Large \PfCTexteJai};
     \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T2) at (S3){};
-    \node[TexteCouleur] (T2a) at (T2){\Large Qui a ?};
+    \node[TexteCouleur] (T2a) at (T2){\Large \PfCTexteQuia};
     \node[minimum height=1cm,text width=\largeurcarte-6mm] (PointTexte1) at ($(A3)!0.5!(S3)$) {\begin{minipage}{\largeurcarte-6mm}%
         \begin{center}%
           #1%

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCEcritureUnites.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCEcritureUnites.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCEcritureUnites.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -128,7 +128,7 @@
 %  \SI[round-mode=places,round-precision=#1]{#2}{\EuRo}%
 %}
 
-\NewDocumentCommand\Prix{O{} O{2} m}{%
+\NewDocumentCommand\Prix{o O{2} m}{%
   \useKVdefault[Unites]%
   \setKV[Unites]{#1}%
   \ifboolKV[Unites]{Nombre}{%

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCFactorisation.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCFactorisation.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCFactorisation.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -0,0 +1,236 @@
+\setKVdefault[Facto]{Aide=false,AideMul=false,Couleur=Crimson,NomExpression=A,Lettre=x,Details,Formel=false,VariableSup=false,ParenthesesFin=false,Finale=false}
+\defKV[Facto]{Litteral=\setKV[Facto]{Details=false}}
+\defKV[Facto]{AutreVariable=\setKV[Facto]{VariableSup}}
+\defKV[Facto]{Resultat=\setKV[Facto]{Finale}}
+
+\NewDocumentCommand\PfCEcrireFacteur{mm}{%
+  \StrCount{#1}{+}[\PfCCountArgTroisPlus]%
+  \StrCount{#1}{-}[\PfCCountArgTroisMoins]%
+  \xdef\PfCCountArgTrois{\fpeval{\PfCCountArgTroisPlus+\PfCCountArgTroisMoins}}%
+  \ensuremath{%
+    \IfDecimal{#1}{%
+      \ifboolKV[Facto]{Aide}{%
+        \phantom{(}\print{#2}\phantom{)}%
+      }{%
+        \print{#2}%
+      }%
+    }{%
+      \xintifboolexpr{\PfCCountArgTrois==0}{%
+        \ifboolKV[Facto]{Aide}{%
+          \phantom{(}\print{#2}\phantom{)}%
+        }{%
+          \print{#2}%
+        }%
+      }{
+        (\print{#2})%
+      }
+    }%
+  }%
+}%
+ 
+\NewDocumentCommand\Factorisation{sommm}{%
+  \directlua{dofile('poly_render_fix.lua')}
+  \useKVdefault[Facto]%
+  \setKV[Facto]{#2}%
+  \colorlet{Csymbole}{\useKV[Facto]{Couleur}}%
+  \IfBooleanTF{#1}{%
+    \xdef\PfCFactoSymbole{-}%
+  }{%
+    \xdef\PfCFactoSymbole{+}%
+  }%
+  \xdef\PfCFactoNE{\useKV[Facto]{NomExpression}}%
+  \ifx\bla#5\bla%
+  % Cas a^2-b^2
+  \begin{CAS}
+    % La variable
+    vars('\useKV[Facto]{Lettre}')
+    % Les facteurs
+    Ka=#3
+    Kb=#4
+    Kc=(#3)^2
+    Kd=(#4)^2
+    Ke=(#3)-(#4)
+    Kf=(#3)+(#4)
+    % Les dérivées pour savoir si ce sont des facteurs littéraux ou pas.
+    PfCDDn=DD(Ka,\useKV[Facto]{Lettre}):autosimplify()
+    PfCDDm=DD(Kb,\useKV[Facto]{Lettre}):autosimplify()
+    PfCDDo=DD(Ke,\useKV[Facto]{Lettre}):autosimplify()
+    PfCDDp=DD(Kf,\useKV[Facto]{Lettre}):autosimplify()
+    % opposé
+    Ko=topoly(-Kb)
+    % 
+  \end{CAS}
+  \setsepchar{,}\ignoreemptyitems
+  \readlist\ListeElementDeriveeA{\fetch{PfCDDn}}
+  \readlist\ListeElementDeriveeB{\fetch{PfCDDm}}
+  \readlist\ListeElementDeriveeE{\fetch{PfCDDo}}
+  \readlist\ListeElementDeriveeF{\fetch{PfCDDp}}
+  \reademptyitems
+  \xdef\TestCASA{\ListeElementDeriveeA[1]}
+  \xdef\TestCASB{\ListeElementDeriveeB[1]}
+  \ifboolKV[Facto]{Details}{%Version monome mais pas deux nombres
+    \begin{align*}
+      \PfCFactoNE&=\print{Kc:expand()}-\print{Kd:expand()}\\
+      \PfCFactoNE&=\ifboolKV[Facto]{Aide}{\xintifboolexpr{\TestCASA>1}{(\,}{}{\underbrace{\Fdash{$\print{Ka}$}}_{A}}\xintifboolexpr{\TestCASA>1}{\,)}{}^{\,2}-\xintifboolexpr{\TestCASB>1}{(\,}{}{\underbrace{\Fdash{$\print{Kb}$}}_{B}}\xintifboolexpr{\TestCASB>1}{\,)}{}^{\,2}}{\IfDecimal{#3}{\print{Ka}^2}{\print{Kc}}-\IfDecimal{#4}{\print{Kb}^2}{\print{Kd}}}\\
+      \PfCFactoNE&=(\print{Ke})\times(\print{Kf})%
+                   \ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=(\print{Ke})(\print{Kf})}{}%
+    \end{align*}
+  }{%Avec au moins un des facteurs polynomes
+    \begin{align*}
+      \ifboolKV[Facto]{Aide}{\IfDecimal{#3}{\PfCFactoNE&=\print{Kc}-\print{Kd}}{\IfDecimal{#4}{\PfCFactoNE&=\print{Kc}-\print{Kd}}{\PfCFactoNE&={\underbrace{\Fdash{$(\print{Ka})$}}_{A}}^{\,2}-{\underbrace{\Fdash{$(\print{Kb})$}}_{B}}^{\,2}}}}{\PfCFactoNE&=\print{Kc}-\print{Kd}}\\
+      \IfDecimal{#3}{\PfCFactoNE\uppercase{&}=\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$\phantom{(}\print{Ka}\phantom{)}$}}_{A}}^{\,2}}{\print{Ka}^2}-\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$(\print{Kb})$}}_{B}}^{\,2}}{\print{Kd}}\\}{\IfDecimal{#4}{\PfCFactoNE\uppercase{&}=\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$(\print{Ka})$}}_{A}}^{\,2}}{\print{Kc}}-\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$\phantom{(}\print{Kb}\phantom{)}$}}_{B}}^{\,2}}{\print{Kb}^2}\\}{}}
+      \PfCFactoNE&=\left[\IfDecimal{#3}{\print{Ka}}{(\print{Ka})}-\IfDecimal{#4}{\print{Kb}}{(\print{Kb})}\right]\times\left[\IfDecimal{#3}{\print{Ka}}{(\print{Ka})}+\IfDecimal{#4}{\print{Kb}}{(\print{Kb})}\right]\\
+      \PfCFactoNE&=\left[\print{Ka}\xintifboolexpr{\TestCASB<0}{+}{}\print{Ko}\right]\times\left[\print{Ka}\StrChar{#4}{1}[\PfCTestCaracUn]\StrCompare{\PfCTestCaracUn}{-}[\PfCTestCaracRetour]\xintifboolexpr{\PfCTestCaracRetour==0}{}{+}\print{Kb}\right]\\
+      \PfCFactoNE&=\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Kf:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}%
+                   \ifboolKV[Facto]{Finale}{\\\PfCFactoNE&=\useKV[Facto]{Resultat}}{\ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Kf:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}}{}}%
+    \end{align*}
+  }
+  \else%k*a+-k*b=k(a+-b)
+  \begin{CAS}
+    % La variable
+    vars('\useKV[Facto]{Lettre}'\ifboolKV[Facto]{VariableSup}{%
+      ,'\useKV[Facto]{AutreVariable}'
+    }{})
+    % Les facteurs
+    Kk=#3
+    Ka=#4
+    Kb=#5
+    Kka=Kk*Ka
+    Kkb=Kk*Kb
+    % Les dérivées pour savoir si ce sont des facteurs littéraux ou pas.
+    PfCDDn=DD(Ka,\useKV[Facto]{Lettre}):autosimplify()
+    PfCDDm=DD(Kb,\useKV[Facto]{Lettre}):autosimplify()
+    % opposé
+    Ko=topoly(-Kb)
+    Ke=(#4)\PfCFactoSymbole(#5)
+  \end{CAS}
+  \setsepchar{,}\ignoreemptyitems
+  \readlist\ListeElementDeriveeA{\fetch{PfCDDn}}
+  \readlist\ListeElementDeriveeB{\fetch{PfCDDm}}
+  \reademptyitems
+  \xdef\TestCAS{\ListeElementDeriveeA[1]}
+  \xdef\TestCASB{\ListeElementDeriveeB[1]}
+  \ifboolKV[Facto]{Details}{%Version monome mais pas des nombres
+    \begin{align*}
+      \PfCFactoNE&=\print{Kka:expand()}\PfCFactoSymbole\print{Kkb:expand()}\\
+      \PfCFactoNE&=\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{Kk}\phantom{)}$}}_{k}}{\print{Kk}}\times\xintifboolexpr{\TestCAS<0}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$(\print{Ka}$}}_{a}}{(\print{Ka})}}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{Ka}\phantom{)}$}}_{a}}{\print{Ka}}}\PfCFactoSymbole\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{Kk}\phantom{)}$}}_{k}}{\print{Kk}}\times\xintifboolexpr{\TestCASB<0}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$(\print{Kb}$}}_{b}}{(\print{Kb})}}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{Kb}\phantom{)}$}}_{b}}{\print{Kb}}}\\
+      \PfCFactoNE&=\print{Kk}\times(\print{Ka\PfCFactoSymbole Kb})%
+                   \ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\print{Kk}(\print{Ka\PfCFactoSymbole Kb})}{}%
+    \end{align*}
+  }{%Avec au moins un des facteurs polynomes
+    \StrCompare{\PfCFactoSymbole}{-}[\PfCRetiensSigneFacteurDeux]
+    \begin{align*}
+      \ifboolKV[Facto]{Aide}{\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#4}{Ka}\PfCFactoSymbole\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#5}{Kb}\\\setKV[Facto]{Aide}}{}%
+      \PfCFactoNE&=\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{\PfCEcrireFacteur{#3}{Kk}}}_{k}\times\underbrace{\Fdash{\PfCEcrireFacteur{#4}{Ka}}}_{a}\PfCFactoSymbole\underbrace{\Fdash{\PfCEcrireFacteur{#3}{Kk}}}_{k}\times\underbrace{\Fdash{\PfCEcrireFacteur{#5}{Kb}}}_{b}}{\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#4}{Ka}\PfCFactoSymbole\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#5}{Kb}}\setKV[Facto]{Aide=false}\\
+      \PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\left[\PfCEcrireFacteur{#4}{Ka}\PfCFactoSymbole\PfCEcrireFacteur{#5}{Kb}\right]\\
+      \PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ka}\xintifboolexpr{\PfCRetiensSigneFacteurDeux==1}{\xintifboolexpr{\TestCASB<0}{}{+}\print{Kb}}{\xintifboolexpr{\TestCASB<0}{+}{}\print{Ko}}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\\
+      \PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}%
+                   \ifboolKV[Facto]{Finale}{\\\PfCFactoNE&=\useKV[Facto]{Resultat}}{\ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{Kk}\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{Ke:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}}{}}%
+    \end{align*}
+  }
+  \fi
+}%
+
+\NewDocumentCommand\Factorisationold{sommm}{%
+  \directlua{dofile('poly_render_fix.lua')}
+  \useKVdefault[Facto]%
+  \setKV[Facto]{#2}%
+  \colorlet{Csymbole}{\useKV[Facto]{Couleur}}%
+  \IfBooleanTF{#1}{%
+    \xdef\PfCFactoSymbole{-}%
+  }{%
+    \xdef\PfCFactoSymbole{+}%
+  }%
+  \xdef\PfCFactoNE{\useKV[Facto]{NomExpression}}%
+  \ifx\bla#5\bla%
+  % Cas a^2-b^2
+  \begin{CAS}
+    % La variable
+    vars('\useKV[Facto]{Lettre}')
+    % Les facteurs
+    a=#3
+    b=#4
+    % Les dérivées pour savoir si ce sont des facteurs littéraux ou pas.
+    PfCDDn=DD(a,\useKV[Facto]{Lettre}):autosimplify()
+    PfCDDm=DD(b,\useKV[Facto]{Lettre}):autosimplify()
+    % opposé
+    o=topoly(-b)
+    % 
+    c=(#3)^2
+    d=(#4)^2
+    e=(#3)-(#4)
+    f=(#3)+(#4)
+  \end{CAS}
+  \setsepchar{,}\ignoreemptyitems
+  \readlist\ListeElementDeriveeA{\fetch{PfCDDn}}
+  \readlist\ListeElementDeriveeB{\fetch{PfCDDm}}
+  \reademptyitems
+  \xdef\TestCASA{\ListeElementDeriveeA[1]}
+  \xdef\TestCASB{\ListeElementDeriveeB[1]}
+  \ifboolKV[Facto]{Details}{%Version monome mais pas deux nombres
+    \begin{align*}
+      \PfCFactoNE&=\print{c:expand()}-\print{d:expand()}\\
+      \PfCFactoNE&=\ifboolKV[Facto]{Aide}{\xintifboolexpr{\TestCASA>1}{(\,}{}{\underbrace{\Fdash{$\print{a}$}}_{A}}\xintifboolexpr{\TestCASA>1}{\,)}{}^{\,2}-\xintifboolexpr{\TestCASB>1}{(\,}{}{\underbrace{\Fdash{$\print{b}$}}_{B}}\xintifboolexpr{\TestCASB>1}{\,)}{}^{\,2}}{\print{c}-\print{d}}\\
+      \PfCFactoNE&=(\print{e})\times(\print{f})%
+                   \ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=(\print{e})(\print{f})}{}%
+    \end{align*}
+  }{%Avec au moins un des facteurs polynomes
+    Ici
+    \begin{align*}
+      \ifboolKV[Facto]{Aide}{\IfDecimal{#3}{\PfCFactoNE&=\print{c}-\print{d}}{\IfDecimal{#4}{\PfCFactoNE&=\print{c}-\print{d}}{\PfCFactoNE&={\underbrace{\Fdash{$(\print{a})$}}_{A}}^{\,2}-{\underbrace{\Fdash{$(\print{b})$}}_{B}}^{\,2}}}}{\PfCFactoNE&=\print{c}-\print{d}}\\
+      \IfDecimal{#3}{\PfCFactoNE\uppercase{&}=\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$\phantom{(}\print{a}\phantom{)}$}}_{A}}^{\,2}}{\print{a}^2}-\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$(\print{b})$}}_{B}}^{\,2}}{\print{d}}\\}{\IfDecimal{#4}{\PfCFactoNE\uppercase{&}=\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$(\print{a})$}}_{A}}^{\,2}}{\print{c}}-\ifboolKV[Facto]{Aide}{{\underbrace{\Fdash{$\phantom{(}\print{b}\phantom{)}$}}_{B}}^{\,2}}{\print{b}^2}\\}{}}
+      \PfCFactoNE&=\left[\IfDecimal{#3}{\print{a}}{(\print{a})}-\IfDecimal{#4}{\print{b}}{(\print{b})}\right]\times\left[\IfDecimal{#3}{\print{a}}{(\print{a})}+\IfDecimal{#4}{\print{b}}{(\print{b})}\right]\\
+      \PfCFactoNE&=\left[\print{a}\xintifboolexpr{\TestCASB<0}{+}{}\print{o}\right]\times\left[\print{a}%
+                   \xintifboolexpr{\TestCASB<0}{\StrChar{\print{b}}{1}[\PfCTestCaracUn]\StrCompare*{\PfCTestCaracUn}{-}[\PfCTestCaracRetour]\xintifboolexpr{\PfCTestCaracRetour==0}{}{+}}{+}\print{b}\right]\\
+      \PfCFactoNE&=\left[\print{e:expand():topolynomial()}\right]\times\left[\print{f:expand():topolynomial()}\right]%
+                   \ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\left[\print{e:expand():topolynomial()}\right]\left[\print{f:expand():topolynomial()}\right]}{}%
+    \end{align*}
+  }
+  \else%k*a+-k*b=k(a+-b)
+  \begin{CAS}
+    % La variable
+    vars('\useKV[Facto]{Lettre}'\ifboolKV[Facto]{VariableSup}{%
+      ,'\useKV[Facto]{AutreVariable}'
+    }{})
+    % Les facteurs
+    k=#3
+    a=#4
+    b=#5
+    ka=k*a
+    kb=k*b
+    % Les dérivées pour savoir si ce sont des facteurs littéraux ou pas.
+    PfCDDn=DD(a,\useKV[Facto]{Lettre}):autosimplify()
+    PfCDDm=DD(b,\useKV[Facto]{Lettre}):autosimplify()
+    % opposé
+    o=topoly(-b)
+    e=(#4)\PfCFactoSymbole(#5)
+  \end{CAS}
+  \setsepchar{,}\ignoreemptyitems
+  \readlist\ListeElementDeriveeA{\fetch{PfCDDn}}
+  \readlist\ListeElementDeriveeB{\fetch{PfCDDm}}
+  \reademptyitems
+  \xdef\TestCAS{\ListeElementDeriveeA[1]}
+  \xdef\TestCASB{\ListeElementDeriveeB[1]}
+  \ifboolKV[Facto]{Details}{%Version monome mais pas des nombres
+    \begin{align*}
+      \PfCFactoNE&=\print{ka:expand()}\PfCFactoSymbole\print{kb:expand()}\\
+      \PfCFactoNE&=\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{k}\phantom{)}$}}_{k}}{\print{k}}\times\xintifboolexpr{\TestCAS<0}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$(\print{a}$}}_{a}}{(\print{a})}}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{a}\phantom{)}$}}_{a}}{\print{a}}}\PfCFactoSymbole\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{k}\phantom{)}$}}_{k}}{\print{k}}\times\xintifboolexpr{\TestCASB<0}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$(\print{b}$}}_{b}}{(\print{b})}}{\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{$\phantom{(}\print{b}\phantom{)}$}}_{b}}{\print{b}}}\\
+      \PfCFactoNE&=\print{k}\times(\print{a\PfCFactoSymbole b})%
+                   \ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\print{k}(\print{a\PfCFactoSymbole b})}{}%
+    \end{align*}
+  }{%Avec au moins un des facteurs polynomes
+    \StrCompare{\PfCFactoSymbole}{-}[\PfCRetiensSigneFacteurDeux]
+    \begin{align*}
+      \ifboolKV[Facto]{Aide}{\PfCFactoNE&=\setKV[Facto]{Aide=false}\PfCEcrireFacteur{#3}{k}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#4}{a}\PfCFactoSymbole\PfCEcrireFacteur{#3}{k}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#5}{b}\\\setKV[Facto]{Aide}}{}%
+      \PfCFactoNE&=\ifboolKV[Facto]{Aide}{\underbrace{\Fdash{\PfCEcrireFacteur{#3}{k}}}_{k}\times\underbrace{\Fdash{\PfCEcrireFacteur{#4}{a}}}_{a}\PfCFactoSymbole\underbrace{\Fdash{\PfCEcrireFacteur{#3}{k}}}_{k}\times\underbrace{\Fdash{\PfCEcrireFacteur{#5}{b}}}_{b}}{\PfCEcrireFacteur{#3}{k}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#4}{a}\PfCFactoSymbole\PfCEcrireFacteur{#3}{k}\ifboolKV[Facto]{AideMul}{\times}{}\PfCEcrireFacteur{#5}{b}}\\
+      \PfCFactoNE&=\PfCEcrireFacteur{#3}{k}\times\left[\PfCEcrireFacteur{#4}{a}\PfCFactoSymbole\PfCEcrireFacteur{#5}{b}\right]\\
+      \PfCFactoNE&=\PfCEcrireFacteur{#3}{k}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{a}\xintifboolexpr{\PfCRetiensSigneFacteurDeux==1}{\xintifboolexpr{\TestCASB<0}{}{+}\print{b}}{\xintifboolexpr{\TestCASB<0}{+}{}\print{o}}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}\\
+      \PfCFactoNE&=\PfCEcrireFacteur{#3}{k}\times\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{e:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}%
+                   \ifboolKV[Facto]{Formel}{\\\PfCFactoNE&=\PfCEcrireFacteur{#3}{k}\ifboolKV[Facto]{ParenthesesFin}{\left(}{\left[}\print{e:expand():topolynomial()}\ifboolKV[Facto]{ParenthesesFin}{\right)}{\right]}}{}%
+    \end{align*}
+  }
+  \fi
+}%
+
+
+


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCFactorisation.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeuRangement.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeuRangement.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeuRangement.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -0,0 +1,104 @@
+\setKVdefault[JeuRgt]{Creation=false,Deno=12,Graines=false,Largeur=15pt,Hauteur=20pt,Negatif=false,Decimaux=false,Solution=false}
+\defKV[JeuRgt]{Graine=\setKV[JeuRgt]{Graines}}%
+
+\newlength{\PfCJeuRgtH}
+
+\NewDocumentCommand\DefiRangement{omm}{%
+  \useKVdefault[JeuRgt]%
+  \setKV[JeuRgt]{#1}%
+  \setlength{\PfCJeuRgtH}{\useKV[JeuRgt]{Hauteur}+\tabcolsep}%
+  \ifboolKV[JeuRgt]{Graines}{\PfCGraineAlea{\useKV[JeuRgt]{Graine}}}{}%
+  % On décompose la phrase
+  \xdef\PfCFooDepart{}%
+  \StrLen{#2}[\LongueurMot]%
+  \xintFor* ##1 in{\xintSeq{1}{\LongueurMot}}\do{%
+    \StrChar{#2}{##1}[\LettreMot]%
+    \xdef\PfCFooDepart{\PfCFooDepart\LettreMot/}%
+  }%
+  \setsepchar[*]{/}\reademptyitems%
+  \readlist*\ListeDesLettres{\PfCFooDepart}%
+%  La liste des Lettres est \showitems\ListeDesLettres[]%
+  % Liste des nombres
+  \ifboolKV[JeuRgt]{Creation}{%
+    \xdef\ListeDesChoix{}%
+    \ifboolKV[JeuRgt]{Negatif}{%
+      \xdef\ListeDesChoix{-1}%
+      \xintFor* ##1 in{\xintSeq{2}{50}}\do{%
+        \xdef\ListeDesChoix{\ListeDesChoix,-##1}%
+      }%
+      \xintFor* ##1 in{\xintSeq{2}{50}}\do{%
+        \xdef\ListeDesChoix{\ListeDesChoix,##1}%
+      }%
+    }{%
+      \xintFor* ##1 in{\xintSeq{2}{100}}\do{%
+        \xdef\ListeDesChoix{\ListeDesChoix,##1}%
+      }%
+    }%
+    \MelangeListe{\ListeDesChoix}{\LongueurMot}%
+    % Liste des nombres \faa et maintenant rangée
+    \Rangement[Seul]{\faa}% \PfCListeRgtRecup
+    \setsepchar{,}%
+    % Liste des nombres
+    \readlist*\ListeDesNombres{\PfCListeRgtRecup}
+  }{%
+    \setsepchar{,}%
+    % Liste des nombres
+    \readlist*\ListeDesNombres{#3}
+  }%
+  % \\La liste des nombres est \showitems\ListeDesNombres[]
+  % On crée la liste des compteurs mélangés
+  \xdef\PfCFooListe{}%
+  \xintFor* ##1 in{\xintSeq{1}{\LongueurMot}}\do{%
+    \xdef\PfCFooListe{\PfCFooListe ##1,}
+  }%
+  % On mélange la liste des compteurs
+  \MelangeListe{\PfCFooListe}{\LongueurMot}
+  % On obtient la liste demandée
+  \setsepchar{,}\ignoreemptyitems%
+  \readlist*\ListeCompteursMelanges{\faa}
+  \reademptyitems
+  % \\La liste des compteurs mélangés est \showitems\ListeCompteursMelanges[]
+  % Les associations
+  % \foreachitem\Lettre\in\ListeCompteursMelanges{%
+  % \xdef\Compteur{\ListeCompteursMelanges[\Lettrecnt]}
+  % \ListeDesLettres[\Compteur] -- \ListeDesNombres[\Compteur]\\
+  % }%
+  %   \begin{center}
+  \begin{NiceTabular}{*{\LongueurMot}{m{\useKV[JeuRgt]{Largeur}}}}[vlines]%
+    \hline
+    \rule{0pt}{\PfCJeuRgtH}\xintFor* ##1 in{\xintSeq{1}{\LongueurMot}}\do{%
+      \xintifForFirst{}{&}\Block{}{\xdef\Compteur{\ListeCompteursMelanges[##1]}\ListeDesLettres[\Compteur]}%
+    }%
+    \\
+    \hline
+    \rule{0pt}{\PfCJeuRgtH}\xintFor* ##1 in{\xintSeq{1}{\LongueurMot}}\do{%
+      \xintifForFirst{}{&}\Block{}{%
+        \xdef\Compteur{\ListeCompteursMelanges[##1]}%
+        \ifboolKV[JeuRgt]{Creation}{%
+          \ifboolKV[JeuRgt]{Decimaux}{\num{\fpeval{\ListeDesNombres[\Compteur]/\useKV[JeuRgt]{Deno}}}}{\Simplification{\ListeDesNombres[\Compteur]}{\useKV[JeuRgt]{Deno}}}}{%
+          \ListeDesNombres[\Compteur]%
+        }%
+      }
+    }%
+    \\
+    \ifboolKV[JeuRgt]{Solution}{%
+      \hline
+      \rule{0pt}{\PfCJeuRgtH}\xintFor* ##1 in{\xintSeq{1}{\LongueurMot}}\do{%
+        \xintifForFirst{}{&}\Block{}{\ListeDesLettres[##1]}%
+      }%
+      \\
+      \hline
+      \rule{0pt}{\PfCJeuRgtH}\xintFor* ##1 in{\xintSeq{1}{\LongueurMot}}\do{%
+        \xintifForFirst{}{&}\Block{}{%
+          \ifboolKV[JeuRgt]{Creation}{%
+            \ifboolKV[JeuRgt]{Decimaux}{\num{\fpeval{\ListeDesNombres[##1]/\useKV[JeuRgt]{Deno}}}}{\Simplification{\ListeDesNombres[##1]}{\useKV[JeuRgt]{Deno}}}}{%
+            \ListeDesNombres[##1]%
+          }%
+        }%
+      }%
+      \\
+    }{}%
+    \hline
+  \end{NiceTabular}
+  % \end{center}
+}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCJeuRangement.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCNotionFonction.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCNotionFonction.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCNotionFonction.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -1,7 +1,3 @@
-
-
-
-
 %%%
 % Fonction
 %%%
@@ -574,7 +570,7 @@
       \hline%
       \useKV[ClesFonction]{Variable}\xintFor* ##1 in {\xintSeq {1}{\ListeFonctionlen}}\do{&\num{\ListeFonction[##1]}}\\
       \hline%
-      \useKV[ClesFonction]{Nom}(\useKV[ClesFonction]{Variable})\xintFor* ##1 in {\xintSeq {1}{\ListeFonctionlen}}\do{&  \StrSubstitute{\useKV[ClesFonction]{Calcul}}{\useKV[ClesFonction]{Variable}}{(\ListeFonction[##1])}[\tempab]\num{\fpeval{\tempab}}}%
+      \useKV[ClesFonction]{Nom}(\useKV[ClesFonction]{Variable})\xintFor* ##1 in {\xintSeq {1}{\ListeFonctionlen}}\do{&\ifboolKV[ClesFonction]{Vide}{}{\StrSubstitute{\useKV[ClesFonction]{Calcul}}{\useKV[ClesFonction]{Variable}}{(\ListeFonction[##1])}[\tempab]\num{\fpeval{\tempab}}}}%
       \\\hline
     \end{array}%
   \]%

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagore.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagore.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagore.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -270,6 +270,48 @@
 \newcommand\RedactionCalculsReciPythagore{}%
 \newcommand\RedactionConclusionReciPythagore{}%
 
+\NewDocumentCommand\CalculsPythagore{o m m m m}{
+  \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
+    \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+    \begin{align*}
+      \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+      \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+      \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+      \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+      \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+      \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                       \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+      }
+    \end{align*}
+  }{%\else
+    \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
+    \ifboolKV[ClesPythagore]{Soustraction}{%
+      \begin{align*}
+        \NomA\NomB^2&=\NomA\NomC^2-\NomB\NomC^2\\
+        \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}-\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+        \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+        \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+        \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+        \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                         \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+        }
+      \end{align*}
+    }{%
+      \begin{align*}
+        \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+        \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+        \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+        \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+        \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+        \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+        \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}%
+                                                         \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+        }
+      \end{align*}
+    }%
+  }%\fi%
+}
+
 % \newcommand\Pythagore[5][]{%
 \NewDocumentCommand\Pythagore{o m m m m}{%
   % #1 Param\`etres sous forme de cl\'es
@@ -277,8 +319,8 @@
   % #3 Premi\`ere longueur
   % #4 Deuxi\`eme longueur
   % #5 Troisi\`eme longueur (\'eventuellement vide)
-  \useKVdefault[ClesPythagore]%obligatoire car la macro n'est pas dans un groupe.
-  \setKV[ClesPythagore]{#1}%On lit les arguments optionnels
+  \useKVdefault[ClesPythagore]%
+  \setKV[ClesPythagore]{#1}%
   \DeclareSIUnit{\PfCPythaUnit}{\useKV[ClesPythagore]{Unite}}%
   \ifboolKV[ClesPythagore]{Reciproque}{%
     % On retient les noms des sommets
@@ -407,7 +449,7 @@
     \xdef\NomSommetC{\NomC}%
     % On trace une figure ou pas ?
     \ifboolKV[ClesPythagore]{FigureSeule}{%
-      \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
+      \xintifboolexpr{#3<#4 || #3==#4}{%
         \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
       }{%
         \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
@@ -414,7 +456,7 @@
       }%
       \MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}
     }{%
-      \ifboolKV[ClesPythagore]{Figure}{%Utilisation obligatoire de l'option --shell-escape de la compilation
+      \ifboolKV[ClesPythagore]{Figure}{%
         \begin{multicols}{2}%
           {\em La figure est donn\'ee \`a titre indicatif.}%
           \[\MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}\]
@@ -430,33 +472,8 @@
               \ifboolKV[ClesPythagore]{Egalite}{Comme le triangle $#2$ est rectangle en $\NomB$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee :}{Dans le triangle $#2$ rectangle en $\NomB$, le th\'eor\`eme de Pythagore permet d'\'ecrire :%
               }%
             }
-            \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
-              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
-              \begin{align*}
-                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-              \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-              \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-                                                               \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
-                }%
-              \end{align*}
-            }{%\else%
-              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
-              \begin{align*}
-                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
-                }%
-              \end{align*}
-            }%\fi%
-          }
+            \CalculsPythagore[#1]{#2}{#3}{#4}{}
+          }%
         \end{multicols}
       }{%
         % On d\'emarre la r\'esolution
@@ -469,45 +486,7 @@
           }{%
             \ifboolKV[ClesPythagore]{Perso}{\RedactionPythagore}{\ifboolKV[ClesPythagore]{Egalite}{Comme le triangle $#2$ est rectangle en $\NomB$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee :}{Dans le triangle $#2$ rectangle en $\NomB$, le th\'eor\`eme de Pythagore permet d'\'ecrire :%
               }}%
-            \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
-              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
-              \begin{align*}
-                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
-                }
-              \end{align*}
-            }{%\else
-              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
-              \ifboolKV[ClesPythagore]{Soustraction}{%
-                \begin{align*}
-                  \NomA\NomB^2&=\NomA\NomC^2-\NomB\NomC^2\\
-                  \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}-\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-                  \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                  \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-                  \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-                  \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
-                                                                   \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
-                  }
-                \end{align*}
-              }{%
-                \begin{align*}
-                  \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
-                  \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
-                  \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                  \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
-                  \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
-                  \ifboolKV[ClesPythagore]{AvantRacine}{}{%
-                  \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}%
-                                                                   \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
-                  }
-                \end{align*}
-              }%
-            }%\fi%
+            \CalculsPythagore[#1]{#2}{#3}{#4}{}
           }%
         }%
       }%

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagoreold.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagoreold.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagoreold.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -0,0 +1,516 @@
+%%%
+% Le th\'eor\`eme de Pythagore
+%%%
+\setKVdefault[ClesPythagore]{Exact=false,AvantRacine=false,Racine=false,Entier=false,Egalite=false,Precision=2,Soustraction=false,Figure=false,FigureSeule=false,Angle=0,Echelle=1cm,Reciproque=false,ReciColonnes=false,Faible=false,Unite=cm,EnchaineA=false,EnchaineB=false,EnchaineC=false,ValeurA=0,ValeurB=0,ValeurC=0,Perso=false,AllPerso=false,SansMots=false}
+
+% On d\'efinit les figures \`a utiliser
+\def\MPFigurePytha#1#2#3#4#5#6{%
+  % #1 Premier sommet
+  % #2 Sommet de l'angle droit
+  % #3 troisi\`eme sommet
+  % #4 1ere longueur
+  % #5 2eme longueur
+  % #6 angle de rotation de la figure
+  \ifluatex
+   \mplibforcehmode
+  \begin{mplibcode}
+    u:=\useKV[ClesPythagore]{Echelle};
+    pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
+    O=u*(2.5,2.5);
+    path cc;
+    cc=(fullcircle scaled 4u) shifted O;
+    % On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
+    A=point(0.9*length cc) of cc;
+    B=A rotatedabout(O,-120);
+    C=2[A,O];
+    % On tourne pour \'eventuellement moins de lassitude :)
+    A:=A rotatedabout(O,#6);
+    B:=B rotatedabout(O,#6);
+    C:=C rotatedabout(O,#6);
+    % On d\'efinit l'angle droit
+    D-B=7*unitvector(C-B);
+    F-B=7*unitvector(A-B);
+    E-D=F-B;
+    draw A{dir(angle(B-A)+5)}..B{dir(angle(B-A)+5)};
+    draw B{dir(angle(C-B)+5)}..C{dir(angle(C-B)+5)};
+    draw C{dir(angle(A-C)+5)}..A{dir(angle(A-C)+5)};
+    draw D--E--F;
+    numeric decalage;
+    decalage=3mm;
+    if (#4<#5) or (#4=#5) :
+    if ypart(B)>ypart(O) :
+        label(btex \num{#4} etex,1/2[C,B]-decalage*(unitvector(A-B)));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+     else:
+        label(btex \num{#4} etex,1/2[C,B]-decalage*(unitvector(A-B)));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+     fi
+    else:
+      if ypart(B)>ypart(O) :
+        label(btex \num{#4} etex,1/2[C,A]-decalage*(unitvector(C-A) rotated 90));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+        else:
+        label(btex \num{#4} etex,1/2[A,C]+decalage*(unitvector(A-C)
+        rotated 90));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+      fi;
+    fi;
+    label(btex #3 etex,1.2[O,A]);
+    label(btex #2 etex,1.2[O,B]);
+    label(btex #1 etex,1.2[O,C]);
+  \end{mplibcode}
+  \else
+  \begin{mpost}[mpsettings={u:=\useKV[ClesPythagore]{Echelle};}]
+    pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
+    O=u*(2.5,2.5);
+    path cc;
+    cc=(fullcircle scaled 4u) shifted O;
+    % On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
+    A=point(0.9*length cc) of cc;
+    B=A rotatedabout(O,-120);
+    C=2[A,O];
+    % On tourne pour \'eventuellement moins de lassitude :)
+    A:=A rotatedabout(O,#6);
+    B:=B rotatedabout(O,#6);
+    C:=C rotatedabout(O,#6);
+    % On d\'efinit l'angle droit
+    D-B=7*unitvector(C-B);
+    F-B=7*unitvector(A-B);
+    E-D=F-B;
+    draw A{dir(angle(B-A)+5)}..B{dir(angle(B-A)+5)};
+    draw B{dir(angle(C-B)+5)}..C{dir(angle(C-B)+5)};
+    draw C{dir(angle(A-C)+5)}..A{dir(angle(A-C)+5)};    
+    draw D--E--F;
+    decalage=3mm;
+    if (#4<#5) or (#4=#5) :
+    if ypart(B)>ypart(O) :
+        label(btex \num{#4} etex,1/2[C,B]-decalage*(unitvector(A-B)));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+     else:
+        label(btex \num{#4} etex,1/2[C,B]-decalage*(unitvector(A-B)));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+     fi
+    else:
+      if ypart(B)>ypart(O) :
+      label(btex \num{#4} etex,1/2[C,A]-decalage*(unitvector(C-A) rotated 90));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+        else:
+        label(btex \num{#4} etex,1/2[A,C]+decalage*(unitvector(A-C)
+        rotated 90));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+      fi;
+    fi;
+    label(btex #3 etex,1.2[O,A]);
+    label(btex #2 etex,1.2[O,B]);
+    label(btex #1 etex,1.2[O,C]);
+  \end{mpost}
+  \fi
+}
+
+\def\MPFigureReciPytha#1#2#3#4#5#6#7{%
+  % #1 Premier sommet
+    % #2 Sommet de l'angle droit
+    % #3 troisi\`eme sommet
+    % #4 1ere longueur
+    % #5 2eme longueur
+    % #6 3eme longueur
+    % #7 angle de rotation de la figure
+  \ifluatex
+   \mplibforcehmode
+  \begin{mplibcode}
+    u:=\useKV[ClesPythagore]{Echelle};
+    pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
+    O=u*(2.5,2.5);
+    path cc;
+    cc=(fullcircle scaled 4u) shifted O;
+    % On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
+    A=point(0.8*length cc) of cc;
+    B=A rotatedabout(O,-100);
+    C=2[A,O];
+    % On tourne pour \'eventuellement moins de lassitude :)
+    A:=A rotatedabout(O,#7);
+    B:=B rotatedabout(O,#7);
+    C:=C rotatedabout(O,#7);
+    draw A{dir(angle(B-A)+5)}..B{dir(angle(B-A)+5)};
+    draw B{dir(angle(C-B)+5)}..C{dir(angle(C-B)+5)};
+    draw C{dir(angle(A-C)+5)}..A{dir(angle(A-C)+5)};    
+    decalage=3mm;
+    if ypart(B)>ypart(O) :
+    label(btex \num{#4} etex,1/2[C,A]-decalage*(unitvector(C-A) rotated 90));
+    label(btex \num{#5} etex,1/2[C,B]-decalage*(unitvector(C-B)));
+    label(btex \num{#6} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+    else:
+    label(btex \num{#4} etex,1/2[A,C]+decalage*(unitvector(A-C) rotated 90));
+    label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+    label(btex \num{#6} etex,1/2[C,B]-decalage*(unitvector(A-B)));
+    fi;
+    label(btex #1 etex,1.2[O,A]);
+    label(btex #2 etex,1.2[O,B]);
+    label(btex #3 etex,1.2[O,C]);
+  \end{mplibcode}
+  \else
+  \begin{mpost}[mpsettings={u:=\useKV[ClesPythagore]{Echelle};}]
+    pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
+    O=u*(2.5,2.5);
+    path cc;
+    cc=(fullcircle scaled 4u) shifted O;
+    % On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
+    A=point(0.8*length cc) of cc;
+    B=A rotatedabout(O,-100);
+    C=2[A,O];
+    % On tourne pour \'eventuellement moins de lassitude :)
+    A:=A rotatedabout(O,#7);
+    B:=B rotatedabout(O,#7);
+    C:=C rotatedabout(O,#7);
+    draw A{dir(angle(B-A)+5)}..B{dir(angle(B-A)+5)};
+    draw B{dir(angle(C-B)+5)}..C{dir(angle(C-B)+5)};
+    draw C{dir(angle(A-C)+5)}..A{dir(angle(A-C)+5)};    
+    decalage=3mm;
+    if ypart(B)>ypart(O) :
+    label(LATEX("\num{"&decimal(#4)&"}") rotated angle(C-A),1/2[C,A]-decalage*(unitvector(C-A) rotated 90));
+    label(LATEX("\num{"&decimal(#5)&"}") rotated(angle(C-B)),1/2[C,B]-decalage*(unitvector(C-B)));
+    label(LATEX("\num{"&decimal(#6)&"}") rotated(angle(B-A)),1/2[A,B]-decalage*(unitvector(C-B)));
+    else:
+    label(LATEX("\num{"&decimal(#4)&"}") rotated angle(A-C),1/2[A,C]+decalage*(unitvector(A-C) rotated 90));
+    label(LATEX("\num{"&decimal(#5)&"}") rotated(angle(A-B)),1/2[A,B]-decalage*(unitvector(C-B)));
+    label(LATEX("\num{"&decimal(#6)&"}") rotated angle(C-B),1/2[C,B]-decalage*(unitvector(A-B)));
+    fi;
+    label(btex #1 etex,1.2[O,A]);
+    label(btex #2 etex,1.2[O,B]);
+    label(btex #3 etex,1.2[O,C]);
+  \end{mpost}
+  \fi
+}
+
+\def\MPFigurePythaSansMots#1#2#3#4#5#6{%
+  % #1 Premier sommet
+  % #2 Sommet de l'angle droit
+  % #3 troisi\`eme sommet
+  % #4 1ere longueur
+  % #5 2eme longueur
+  % #6 angle de rotation de la figure
+  \ifluatex
+   \mplibforcehmode
+  \begin{mplibcode}
+    u:=\useKV[ClesPythagore]{Echelle};
+    pair A,B,C,O,D,E,F,L[],M[],N[];%B est le sommet de l'angle droit
+    O=u*(2.5,2.5);
+    path cc;
+    cc=(fullcircle scaled 4u) shifted O;
+    % On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
+    A=point(0.9*length cc) of cc;
+    B=A rotatedabout(O,-120);
+    C=2[A,O];
+    % On tourne pour \'eventuellement moins de lassitude :)
+    A:=A rotatedabout(O,#6);
+    B:=B rotatedabout(O,#6);
+    C:=C rotatedabout(O,#6);
+    % On d\'efinit l'angle droit
+    D-B=7*unitvector(C-B);
+    F-B=7*unitvector(A-B);
+    E-D=F-B;
+    trace polygone(A,B,C);
+    draw D--E--F;
+    L1=rotation(B,A,90);
+    L2-L1=B-A;
+    trace chemin(A,L1,L2,B);
+    M1=rotation(C,B,90);
+    M2-M1=C-B;
+    trace chemin(B,M1,M2,C);
+    N1=rotation(A,C,90);
+    N2-N1=A-C;
+    trace chemin(C,N1,N2,A);    
+    numeric decalage;
+    decalage=3mm;
+    if (#4<#5) or (#4=#5) :
+    if ypart(B)>ypart(O) :
+        label(btex \num{#4} etex,1/2[C,B]+decalage*(unitvector(A-B)));
+        label(btex \num{#5} etex,1/2[A,B]+decalage*(unitvector(C-B)));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#5}\times\num{#5}$\\$\num{\fpeval{#5*#5}}$\\\end{tabular}"),iso(A,L2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#4}\times\num{#4}$\\$\num{\fpeval{#4*#4}}$\\\end{tabular}"),iso(B,M2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{\fpeval{#4*#4}}+\num{\fpeval{#5*#5}}$\\$\num{\fpeval{#4*#4+#5*#5}}$\\\end{tabular}"),iso(C,N2));
+     else:
+        label(btex \num{#4} etex,1/2[C,B]+decalage*(unitvector(A-B)));
+        label(btex \num{#5} etex,1/2[A,B]+decalage*(unitvector(C-B)));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#5}\times\num{#5}$\\$\num{\fpeval{#5*#5}}$\\\end{tabular}"),iso(A,L2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#4}\times\num{#4}$\\$\num{\fpeval{#4*#4}}$\\\end{tabular}"),iso(B,M2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{\fpeval{#4*#4}}+\num{\fpeval{#5*#5}}$\\$\num{\fpeval{#4*#4+#5*#5}}$\\\end{tabular}"),iso(C,N2));
+        drawarrow 2/10[iso(A,L2),iso(C,N2)]--8/10[iso(A,L2),iso(C,N2)];
+        drawarrow 2/10[iso(B,M2),iso(C,N2)]--8/10[iso(B,M2),iso(C,N2)];
+     fi
+    else:
+      if ypart(B)>ypart(O) :
+        label(btex \num{#4} etex,1/2[C,A]-decalage*(unitvector(C-A) rotated 90));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#5}\times\num{#5}$\\$\num{\fpeval{#5*#5}}$\\\end{tabular}"),iso(A,L2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#4}\times\num{#4}$\\$\num{\fpeval{#4*#4}}$\\\end{tabular}"),iso(C,N2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{\fpeval{#4*#4}}-\num{\fpeval{#5*#5}}$\\$\num{\fpeval{#4*#4-#5*#5}}$\\\end{tabular}"),iso(B,M2));
+        drawarrow 2/10[iso(A,L2),iso(B,M2)]--8/10[iso(A,L2),iso(B,M2)];
+        drawarrow 2/10[iso(C,N2),iso(B,M2)]--8/10[iso(C,N2),iso(B,M2)];
+        else:
+        label(btex \num{#4} etex,1/2[A,C]+decalage*(unitvector(A-C) rotated 90));
+        label(btex \num{#5} etex,1/2[A,B]-decalage*(unitvector(C-B)));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#5}\times\num{#5}$\\$\num{\fpeval{#5*#5}}$\\\end{tabular}"),iso(A,L2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{#4}\times\num{#4}$\\$\num{\fpeval{#4*#4}}$\\\end{tabular}"),iso(C,N2));
+        label(TEX("\begin{tabular}{c}Aire\\$\num{\fpeval{#4*#4}}-\num{\fpeval{#5*#5}}$\\$\num{\fpeval{#4*#4-#5*#5}}$\\\end{tabular}"),iso(B,M2));
+        drawarrow 2/10[iso(A,L2),iso(B,M2)]--8/10[iso(A,L2),iso(B,M2)];
+        drawarrow 2/10[iso(C,N2),iso(B,M2)]--8/10[iso(C,N2),iso(B,M2)];
+      fi;
+    fi;
+    label(btex #3 etex,1.2[O,A]);
+    label(btex #2 etex,1.2[O,B]);
+    label(btex #1 etex,1.2[O,C]);
+  \end{mplibcode}
+  \fi
+}
+
+\newcommand\RedactionPythagore{}%
+\newcommand\RedactionReciPythagore{}%
+\newcommand\RedactionCalculsPythagore{}%
+\newcommand\RedactionCalculsReciPythagore{}%
+\newcommand\RedactionConclusionReciPythagore{}%
+
+% \newcommand\Pythagore[5][]{%
+\NewDocumentCommand\Pythagore{o m m m m}{%
+  % #1 Param\`etres sous forme de cl\'es
+  % #2 Nom "complet" du triangle : ABC par exemple
+  % #3 Premi\`ere longueur
+  % #4 Deuxi\`eme longueur
+  % #5 Troisi\`eme longueur (\'eventuellement vide)
+  \useKVdefault[ClesPythagore]%
+  \setKV[ClesPythagore]{#1}%
+  \DeclareSIUnit{\PfCPythaUnit}{\useKV[ClesPythagore]{Unite}}%
+  \ifboolKV[ClesPythagore]{Reciproque}{%
+    % On retient les noms des sommets
+    \StrMid{#2}{1}{1}[\NomA]%
+    \StrMid{#2}{2}{2}[\NomB]%
+    \StrMid{#2}{3}{3}[\NomC]%
+    \xdef\NomTriangle{\NomA\NomB\NomC}%
+    % on stocke les valeurs donn\'ees
+    \opcopy{#3}{A1}%
+    \opcopy{#4}{A2}%
+    \opcopy{#5}{A3}%
+    \xdef\GrandCote{#3}%
+    \xdef\PetitCote{#4}%
+    \xdef\MoyenCote{#5}%
+    % On trace une figure ou pas ?
+    \ifboolKV[ClesPythagore]{FigureSeule}{%
+      \MPFigureReciPytha{\NomA}{\NomB}{\NomC}{#3}{#4}{#5}{\useKV[ClesPythagore]{Angle}}%
+    }{%
+      \ifboolKV[ClesPythagore]{Figure}{%Utilisation obligatoire de l'option --shell-escape de la compilation
+        \begin{multicols}{2}
+          {\em La figure est donn\'ee \`a titre indicatif.}%
+          \[\MPFigureReciPytha{\NomA}{\NomB}{\NomC}{#3}{#4}{#5}{\useKV[ClesPythagore]{Angle}}\]%
+          \par\columnbreak\par%
+          \ifboolKV[ClesPythagore]{AllPerso}{%
+            \RedactionReciPythagore%
+            \RedactionCalculsReciPythagore%
+            \RedactionConclusionReciPythagore%
+          }{%
+            % on r\'edige
+            \ifboolKV[ClesPythagore]{Perso}{%
+              \RedactionReciPythagore%
+            }{%
+              Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
+            }
+            \ifboolKV[ClesPythagore]{ReciColonnes}{%
+              \[
+                \begin{array}{cccc|cccc}
+                  &&\NomA\NomC^2&&&\NomA\NomB^2&+&\NomB\NomC^2\\
+                  &&\opexport{A1}{\Aun}\num{\Aun}^2&&&\opexport{A2}{\Adeux}\num{\Adeux}^2&+&\opexport{A3}{\Atrois}\num{\Atrois}^2\\
+                  &&\opmul*{A1}{A1}{a1}&&&\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}&+&\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}\\
+                  &&\opexport{a1}{\Aun}\num{\Aun}&&&\multicolumn{3}{c}{\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}}\\
+                \end{array}
+              \]
+            }{%
+              \[\left.
+                  \begin{array}{l}
+                    \NomA\NomC^2=\opexport{A1}{\Aun}\num{\Aun}^2=\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}\\
+                    \\
+                    \NomA\NomB^2+\NomB\NomC^2=\opexport{A2}{\Adeux}\num{\Adeux}^2+\opexport{A3}{\Atrois}\num{\Atrois}^2=\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}+\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}=\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}\\
+                  \end{array}
+                \right\}\opcmp{a1}{a4}\ifopeq\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2\fi\opcmp{a1}{a4}\ifopneq\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2\fi
+              \]
+            }
+            \ifboolKV[ClesPythagore]{Egalite}{%
+              \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee. Donc le triangle $#2$ est rectangle en $\NomB$.\fi%
+              \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore n'est pas v\'erifi\'ee. Donc le triangle $#2$ n'est pas rectangle.\fi%
+            }{%
+              \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors le triangle $#2$ est rectangle
+              en $\NomB$ d'apr\`es la r\'eciproque du th\'eor\`eme de Pythagore.\fi%
+              \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors le
+              triangle $#2$ n'est pas rectangle\ifboolKV[ClesPythagore]{Faible}{.}{ d'apr\`es la contrapos\'ee du th\'eor\`eme de Pythagore.}\fi%
+            }
+          }
+        \end{multicols}
+      }{%
+        \ifboolKV[ClesPythagore]{AllPerso}{%
+          \RedactionReciPythagore%
+          \RedactionCalculsReciPythagore%
+          \RedactionConclusionReciPythagore%
+        }{%
+          \ifboolKV[ClesPythagore]{Perso}{\RedactionReciPythagore}{%
+            Dans le triangle $#2$, $[\NomA\NomC]$ est le plus grand c\^ot\'e.%
+          }
+          \ifboolKV[ClesPythagore]{ReciColonnes}{%
+            \[
+              \begin{array}{cccc|cccc}
+                &&\NomA\NomC^2&&&\NomA\NomB^2&+&\NomB\NomC^2\\
+                &&\opexport{A1}{\Aun}\num{\Aun}^2&&&\opexport{A2}{\Adeux}\num{\Adeux}^2&+&\opexport{A3}{\Atrois}\num{\Atrois}^2\\
+                &&\opmul*{A1}{A1}{a1}&&&\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}&+&\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}\\
+                &&\opexport{a1}{\Aun}\num{\Aun}&&&\multicolumn{3}{c}{\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}}\\
+              \end{array}
+            \]
+          }{%
+            \[\left.
+                \begin{array}{l}
+                  \NomA\NomC^2=\opexport{A1}{\Aun}\num{\Aun}^2=\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}\\
+                  \\
+                  \NomA\NomB^2+\NomB\NomC^2=\opexport{A2}{\Adeux}\num{\Adeux}^2+\opexport{A3}{\Atrois}\num{\Atrois}^2=\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}+\opmul*{A3}{A3}{a3}\opexport{a3}{\Atrois}\num{\Atrois}=\opadd*{a2}{a3}{a4}\opexport{a4}{\Aquatre}\num{\Aquatre}\\
+                \end{array}
+              \right\}\opcmp{a1}{a4}\ifopeq\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2\fi\opcmp{a1}{a4}\ifopneq\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2\fi
+            \]
+          }%
+          \ifboolKV[ClesPythagore]{Egalite}{%
+            \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee. Donc le triangle $#2$ est rectangle en $\NomB$.\fi%
+            \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors l'\'egalit\'e de Pythagore n'est pas v\'erifi\'ee. Donc le triangle $#2$ n'est pas rectangle.\fi%
+          }{%
+            \opcmp{a1}{a4}\ifopeq Comme $\NomA\NomC^2=\NomA\NomB^2+\NomB\NomC^2$, alors le triangle $#2$ est rectangle
+            en $\NomB$ d'apr\`es la r\'eciproque du th\'eor\`eme de Pythagore.\fi%
+            \opcmp{a1}{a4}\ifopneq Comme $\NomA\NomC^2\not=\NomA\NomB^2+\NomB\NomC^2$, alors le
+            triangle $#2$ n'est pas rectangle\ifboolKV[ClesPythagore]{Faible}{.}{ d'apr\`es la contrapos\'ee du th\'eor\`eme de Pythagore.}\fi%
+          }%
+        }%
+      }%
+    }%
+  }{%
+    % [xlop] param\`etres de calcul
+    \opcopy{#3}{A1}%
+    \opcopy{#4}{A2}%
+    \opcopy{\useKV[ClesPythagore]{Precision}}{pres}%
+    \xintifboolexpr{#3<#4 || #3==#4}{
+      \xdef\PetitCote{#3}%
+      \xdef\MoyenCote{#4}%
+      \xdef\GrandCote{}%
+    }{%
+      \xdef\GrandCote{#3}%
+      \xdef\MoyenCote{#4}%
+      \xdef\PetitCote{}% Pour la personnalisation
+    }
+    % On retient les noms des sommets
+    \StrMid{#2}{1}{1}[\NomA]%
+    \StrMid{#2}{2}{2}[\NomB]%
+    \StrMid{#2}{3}{3}[\NomC]%
+    \xdef\NomTriangle{\NomA\NomB\NomC}%
+    \xdef\NomAngleDroit{\NomB}%
+    \xdef\NomSommetA{\NomA}%
+    \xdef\NomSommetC{\NomC}%
+    % On trace une figure ou pas ?
+    \ifboolKV[ClesPythagore]{FigureSeule}{%
+      \xintifboolexpr{#3<#4 || #3==#4}{%
+        \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+      }{%
+        \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
+      }%
+      \MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}
+    }{%
+      \ifboolKV[ClesPythagore]{Figure}{%
+        \begin{multicols}{2}%
+          {\em La figure est donn\'ee \`a titre indicatif.}%
+          \[\MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}\]
+          \par\columnbreak\par%
+          % On d\'emarre la r\'esolution
+          \ifboolKV[ClesPythagore]{AllPerso}{%
+            \RedactionPythagore%
+            \RedactionCalculsPythagore%
+          }{%
+            \ifboolKV[ClesPythagore]{Perso}{%
+              \RedactionCalculsPythagore%
+            }{%
+              \ifboolKV[ClesPythagore]{Egalite}{Comme le triangle $#2$ est rectangle en $\NomB$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee :}{Dans le triangle $#2$ rectangle en $\NomB$, le th\'eor\`eme de Pythagore permet d'\'ecrire :%
+              }%
+            }
+            \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
+              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+              \begin{align*}
+                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+              \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+              \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                               \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+                }%
+              \end{align*}
+            }{%\else%
+              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
+              \begin{align*}
+                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+                }%
+              \end{align*}
+            }%\fi%
+          }
+        \end{multicols}
+      }{%
+        % On d\'emarre la r\'esolution
+        \ifboolKV[ClesPythagore]{SansMots}{%
+         \MPFigurePythaSansMots{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}%
+        }{%
+          \ifboolKV[ClesPythagore]{AllPerso}{%
+            \RedactionPythagore%
+            \RedactionCalculsPythagore%
+          }{%
+            \ifboolKV[ClesPythagore]{Perso}{\RedactionPythagore}{\ifboolKV[ClesPythagore]{Egalite}{Comme le triangle $#2$ est rectangle en $\NomB$, alors l'\'egalit\'e de Pythagore est v\'erifi\'ee :}{Dans le triangle $#2$ rectangle en $\NomB$, le th\'eor\`eme de Pythagore permet d'\'ecrire :%
+              }}%
+            \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
+              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+              \begin{align*}
+                \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                \NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                \NomA\NomC^2&=\opadd*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomC&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                                 \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomC&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomC&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+                }
+              \end{align*}
+            }{%\else
+              \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
+              \ifboolKV[ClesPythagore]{Soustraction}{%
+                \begin{align*}
+                  \NomA\NomB^2&=\NomA\NomC^2-\NomB\NomC^2\\
+                  \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}-\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                  \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                  \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                  \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                  \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}
+                                                                   \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+                  }
+                \end{align*}
+              }{%
+                \begin{align*}
+                  \NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
+                  \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
+                  \ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}&=\NomA\NomB^2+\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                  \NomA\NomB^2&=\ifboolKV[ClesPythagore]{EnchaineC}{\opcopy{\useKV[ClesPythagore]{ValeurC}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opmul*{A1}{A1}{a1}\opexport{a1}{\Aun}\num{\Aun}}-\ifboolKV[ClesPythagore]{EnchaineB}{\opexport{a2}{\Adeux}\num{\Adeux}}{\opmul*{A2}{A2}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}\\
+                  \NomA\NomB^2&=\opsub*{a1}{a2}{a3}\opexport{a3}{\Atrois}\num{\Atrois}%\\
+                  \ifboolKV[ClesPythagore]{AvantRacine}{}{%
+                  \ifboolKV[ClesPythagore]{Entier}{}{\\\NomA\NomB&=\sqrt{\opexport{a3}{\Atrois}\num{\Atrois}}}%
+                                                                   \ifboolKV[ClesPythagore]{Racine}{}{\\\ifboolKV[ClesPythagore]{Exact}{\NomA\NomB&=\opsqrt[maxdivstep=3]{a3}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}{\NomA\NomB&\approx\opsqrt[maxdivstep=5]{a3}{a4}\opround{a4}{pres}{a4}\opunzero{a4}\opexport{a4}{\Aquatre}\SI{\Aquatre}{\PfCPythaUnit}}}%\\
+                  }
+                \end{align*}
+              }%
+            }%\fi%
+          }%
+        }%
+      }%
+    }%
+  }%
+}%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCPythagoreold.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCRangementNombres.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCRangementNombres.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCRangementNombres.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -1,7 +1,7 @@
 %%%
 % Rangement des nombres
 %%%
-\setKVdefault[ClesRgt]{Croissant,Decroissant=false,Strict,Fraction=false,Details=false}
+\setKVdefault[ClesRgt]{Croissant,Decroissant=false,Strict,Fraction=false,Details=false,Seul=false}
 
 \dtlexpandnewvalue%
 \DTLgnewdb{mtnumedb}%
@@ -53,7 +53,12 @@
       \itemtomacro\ListeRgt[\xcnt]\y%
       \DTLnewdbentry{mtRGTdb}{numeric}{\y}%
     }%
-%    % 
+%    %
+    \ifboolKV[ClesRgt]{Seul}{%
+    \xdef\PfCListeRgtRecup{}%
+      \dtlsort{numeric}{mtRGTdb}{\dtlicompare}%
+      \DTLforeach{mtRGTdb}{\numeroDonnee=numeric}{\xdef\PfCListeRgtRecup{\PfCListeRgtRecup \numeroDonnee\DTLiflastrow{}{,}}}%
+    }{%
     \ifboolKV[ClesRgt]{Decroissant}{%
       % On trie la liste
       \dtlsort{numeric=descending}{mtRGTdb}{\dtlicompare}%
@@ -64,4 +69,5 @@
       \ensuremath{\DTLforeach{mtRGTdb}{\numeroDonnee=numeric}{\num{\numeroDonnee}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
     }%
   }%
+}%
 }%
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCReperage.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCReperage.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCReperage.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -1,7 +1,7 @@
 %%%
 % Reperage
 %%%
-\setKVdefault[ClesReperage]{Unitex=1,Pasx=1,Unitey=1,Pasy=1,Unitez=1,Pasz=1,DemiDroite=false,Droite=false,Plan=false,Trace=false,ListeSegment={},Espace=false,Sphere=false,AnglePhi=30,CouleurLa=white,CouleurLon=Tomato,AffichageNom=false,AffichageGrad=false,AffichageAbs=0,AffichageCoord=false,LectureCoord=false,ValeurUnitex=1,ValeurUnitey=1,ValeurOrigine=0,NomOrigine=O,EchelleEspace=50,CouleurCoord=black,Thermometre=false,Mercure=false,CouleurMercure=black,Celsius,Kelvin=false,Farenheit=false,ValeurMin=-4000,ValeurMax=4000,Etages=4,Code=false}
+\setKVdefault[ClesReperage]{Unitex=1,Pasx=1,Unitey=1,Pasy=1,Unitez=1,Pasz=1,DemiDroite=false,Droite=false,Plan=false,Trace=false,ListeSegment={},Espace=false,Sphere=false,AnglePhi=30,CouleurLa=white,CouleurLon=Tomato,AffichageNom=false,AffichageGrad=false,AffichageAbs=0,AffichageCoord=false,LectureCoord=false,ValeurUnitex=1,ValeurUnitey=1,ValeurOrigine=0,NomOrigine=O,EchelleEspace=50,CouleurCoord=black,Thermometre=false,Mercure=false,CouleurMercure=black,Celsius,Kelvin=false,Farenheit=false,ValeurMin=-4000,ValeurMax=4000,Etages=4,Code=false,Globe=false,Rho=1500,Phi=22,Theta=10,CouleurE=orange,CouleurG=green,Axes=false,TypeProj="persp"}
 \defKV[ClesReperage]{Traces=\setKV[ClesReperage]{Code}}
 % ValeurOrigine permet de faire des morceaux de demi-droite gradu\'ee en passant par droite :)
 
@@ -20,27 +20,214 @@
 % Pour construire le rep\`ere de l'espace
 \def\buildespace{%
   \toklistepointespace{}%
-  \ifboolKV[ClesReperage]{Sphere}{%
+  \ifboolKV[ClesReperage]{Globe}{%
     \foreachitem\compteur\in\ListePointEspace{\expandafter\Updatetoksrepere\compteur\nil}%
-    \[\MPEspaceSphere{\the\toklistepointrepere}{\useKV[ClesReperage]{EchelleEspace}}\]
+    \[\MPGlobe{\the\toklistepointrepere}{\useKV[ClesReperage]{EchelleEspace}}\]
   }{%
-    \foreachitem\compteur\in\ListePointEspace{\expandafter\Updatetoksespace\compteur\nil}%
-    \ifboolKV[ClesReperage]{AffichageNom}{%
-      \ifboolKV[ClesReperage]{AffichageCoord}{%
-        \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{3}{\useKV[ClesReperage]{EchelleEspace}}\]%
-      }{%
-        \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{2}{\useKV[ClesReperage]{EchelleEspace}}\]%
-      }%
+    \ifboolKV[ClesReperage]{Sphere}{%
+      \foreachitem\compteur\in\ListePointEspace{\expandafter\Updatetoksrepere\compteur\nil}%
+      \[\MPEspaceSphere{\the\toklistepointrepere}{\useKV[ClesReperage]{EchelleEspace}}\]
     }{%
-      \ifboolKV[ClesReperage]{AffichageCoord}{%
-        \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{1}{\useKV[ClesReperage]{EchelleEspace}}\]%
+      \foreachitem\compteur\in\ListePointEspace{\expandafter\Updatetoksespace\compteur\nil}%
+      \ifboolKV[ClesReperage]{AffichageNom}{%
+        \ifboolKV[ClesReperage]{AffichageCoord}{%
+          \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{3}{\useKV[ClesReperage]{EchelleEspace}}\]%
+        }{%
+          \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{2}{\useKV[ClesReperage]{EchelleEspace}}\]%
+        }%
       }{%
-        \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{0}{\useKV[ClesReperage]{EchelleEspace}}\]%
+        \ifboolKV[ClesReperage]{AffichageCoord}{%
+          \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{1}{\useKV[ClesReperage]{EchelleEspace}}\]%
+        }{%
+          \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{0}{\useKV[ClesReperage]{EchelleEspace}}\]%
+        }%
       }%
     }%
   }%
 }%
 
+\def\MPGlobe#1#2{%
+  \ifluatex
+  \mplibforcehmode
+  \begin{mplibcode}
+    input PfCSolid;
+    % Pour convertir les (Long,lat) données en degrés en (Long,lat) données en radians
+    vardef ConvDeg(expr fa,fl)=
+    Famille((fa*pi/180),(fl*pi/180))
+    enddef;
+    %Initialisation
+    PfCRho=\useKV[ClesReperage]{Rho};
+    PfCPhi=\useKV[ClesReperage]{Phi};
+    PfCTheta=\useKV[ClesReperage]{Theta};
+    color CouleurE,CouleurG;
+    CouleurE=\useKV[ClesReperage]{CouleurE};
+    CouleurG=\useKV[ClesReperage]{CouleurG};
+    boolean AffichageNom,Axes;
+    AffichageNom=\useKV[ClesReperage]{AffichageNom};
+    Axes=\useKV[ClesReperage]{Axes};
+    Initialisation(PfCRho,PfCTheta,PfCPhi,#2);
+    eclairage:=false;
+    nb:=18;%
+    subh:=36;%
+    %angx:=-23.5;%anglerotationx;
+    TR:=(0,0,0);
+    Ferme2:=true;
+    typerepre:=\useKV[ClesReperage]{TypeProj};
+    if typerepre="persp":
+    ObjetSphereNew2("R=2");
+    ObjetEquateur3("R=2");
+    ObjetGreenwich4("R=2");
+    elseif typerepre="proj":
+    ObjetSpherePfC2("R=20");
+    ObjetEquateur3("R=20");
+    ObjetGreenwich4("R=20");
+    else:
+    ObjetSphereCabinet2("R=5");
+    ObjetEquateur3("R=5");
+    ObjetGreenwich4("R=5");
+    fi;
+     AffichagePfC2;
+%    AffichageObjet2;
+    if \useKV[ClesReperage]{Axes}:
+    drawoptions(withpen pencircle scaled 1.05 withcolor CouleurE);
+    AffichageEquateur3;
+    drawoptions(withpen pencircle scaled 1 withcolor CouleurG);
+    AffichageGreenwich4;
+    drawoptions();
+    fi;
+    % Label
+%    labeloffset:=labeloffset*2;
+%    label.urt(btex Nord etex,Projette(Image(ConvDeg(90,0))));%(0,0,2))));
+%    label.llft(btex Sud etex,Projette(Image(ConvDeg(-90,0))));%(0,0,-2))));
+%    label.lft(btex Ouest etex,Projette(Image(ConvDeg(0,-90))));%(0,-2,0))));
+%    label.rt(btex Est etex,Projette(Image(ConvDeg(0,90))));%(0,2,0))));
+%    labeloffset:=labeloffset/2;
+    dotlabel.llft(btex \tiny\ang{0} etex,Projette(Image(ConvDeg(0,0))));
+    dotlabel.llft(btex \tiny\ang{10} etex,Projette(Image(ConvDeg(10,0))));
+    dotlabel.llft(btex \tiny\ang{10} etex,Projette(Image(ConvDeg(0,10))));
+    color M[],N[];
+    vardef toto(text t)=
+    n:=1;
+    for p_=t:
+    if (n mod 3)=1:
+    k:=p_;
+    fi;
+    if (n mod 3)=2:
+    l:=p_;
+    fi;
+    if (n mod 3)=0:
+      M[n]=Image(ConvDeg(l,k));
+      if l>0:
+      if k>0:
+      N[n]=Image(ConvDeg(l+3,k+3));
+      else:
+      N[n]=Image(ConvDeg(l+3,k-3));
+      fi;
+      else:
+      if k>0:
+      N[n]=Image(ConvDeg(l-3,k+3));
+      else:
+      N[n]=Image(ConvDeg(l-3,k-3));
+      fi;
+      fi;
+      label(TEX(p_),Projette(N[n]));
+      dotlabel.urt("",Projette(M[n]));
+      fi;
+      n:=n+1;
+      endfor;
+      enddef;
+      if AffichageNom:
+      toto(#1);
+      fi;
+%      label.top(TEX(decimal(redpart(Oeil))&","&decimal(greenpart(Oeil))&","&decimal(bluepart(Oeil))),Projette(Image(ConvDeg(90,0)))+(0,3cm));%&),(0,1cm));
+%      TraceAxes;
+%      label.top(btex Oeil etex,Projette(Image(Oeil)));
+%     label.top(TEX("Oeil="&decimal(greenpart(Oeil))),(0,2cm));
+%      label.top(TEX("Oeil="&decimal(bluepart(Oeil))),(0,3cm));
+    \end{mplibcode}
+    \else
+    \begin{mpost}[mpsettings={PfCRho=\useKV[ClesReperage]{Rho};PfCPhi=\useKV[ClesReperage]{Phi};PfCTheta=\useKV[ClesReperage]{Theta};color CouleurE,CouleurG;CouleurE=\useKV[ClesReperage]{CouleurE};CouleurG=\useKV[ClesReperage]{CouleurG};boolean AffichageNom,Axes;AffichageNom=\useKV[ClesReperage]{AffichageNom};Axes=\useKV[ClesReperage]{Axes};}]
+      input PfCSolid;
+      % 
+    % Pour convertir les (Long,lat) données en degrés en (Long,lat) données en radians
+    vardef ConvDeg(expr fa,fl)=
+    Famille((fa*pi/180),(fl*pi/180))
+    enddef;
+    %Initialisation
+    Initialisation(PfCRho,PfCTheta,PfCPhi,#2);
+    nb:=18;%
+    subh:=36;%
+    %angx:=-23.5;%anglerotationx;
+    TR:=(0,0,0);
+    Ferme2:=true;
+    typerepre:=\useKV[ClesReperage]{TypeProj};
+    if typerepre="proj":
+    ObjetSphereNew2("R=10");
+    ObjetEquateur3("R=10");
+    ObjetGreenwich4("R=10");
+    else:
+    ObjetSphereNew2("R=2");
+    ObjetEquateur3("R=2");
+    ObjetGreenwich4("R=2");
+    fi;
+    AffichagePfC2;
+    if Axes:
+    drawoptions(withpen pencircle scaled 1.05 withcolor CouleurE);
+    ObjetEquateur3("R=2");
+    AffichageEquateur3;
+    drawoptions(withpen pencircle scaled 1 withcolor CouleurG);
+    ObjetGreenwich4("R=2");
+    AffichageGreenwich4;
+    drawoptions();
+    fi;
+    % Label
+%    labeloffset:=labeloffset*2;
+%    label.urt(btex Nord etex,Projette(Image(ConvDeg(90,0))));%(0,0,2))));
+%    label.llft(btex Sud etex,Projette(Image(ConvDeg(-90,0))));%(0,0,-2))));
+%    label.lft(btex Ouest etex,Projette(Image(ConvDeg(0,-90))));%(0,-2,0))));
+%    label.rt(btex Est etex,Projette(Image(ConvDeg(0,90))));%(0,2,0))));
+%    labeloffset:=labeloffset/2;
+    dotlabel.llft(btex \tiny\ang{0} etex,Projette(Image(ConvDeg(0,0))));
+    dotlabel.llft(btex \tiny\ang{10} etex,Projette(Image(ConvDeg(10,0))));
+    dotlabel.llft(btex \tiny\ang{10} etex,Projette(Image(ConvDeg(0,10))));
+    color M[],N[];
+    vardef toto(text t)=
+    n:=1;
+    for p_=t:
+    if (n mod 3)=1:
+    k:=p_;
+    fi;
+    if (n mod 3)=2:
+    l:=p_;
+    fi;
+    if (n mod 3)=0:
+      M[n]=Image(ConvDeg(l,k));
+      if l>0:
+      if k>0:
+      N[n]=Image(ConvDeg(l+3,k+3));
+      else:
+      N[n]=Image(ConvDeg(l+3,k-3));
+      fi;
+      else:
+      if k>0:
+      N[n]=Image(ConvDeg(l-3,k+3));
+      else:
+      N[n]=Image(ConvDeg(l-3,k-3));
+      fi;
+      fi;
+      label(TEX(p_),Projette(N[n]));
+      dotlabel.urt("",Projette(M[n]));
+      fi;
+      n:=n+1;
+      endfor;
+      enddef;
+      if AffichageNom:
+      toto(#1);
+      fi;
+    \end{mpost}
+    \fi
+}%
+
 \def\MPEspaceSphere#1#2{%
   \ifluatex
   \begin{mplibcode}
@@ -62,7 +249,7 @@
     trace (subpath((0.75+anglephi/360)*length Equateur,(1.25+anglephi/360)*length Equateur) of Equateur) withcolor 0.7white;
     path greenwich;
     greenwich=cercles(O,C,O,C,Z);
-    trace subpath(3*length greenwich/4,5*length greenwich/4) of greenwich  withcolor 0.7white;
+    trace subpath(3*length greenwich/4,5*length greenwich/4) of greenwich  withcolor 0.2white;
     clip currentpicture to cercles(O,A,O,A,Z);
     trace chemin(C,O,Z) dashed evenly withcolor 0.85white;
     trace chemin(O,2[Z,O])  dashed evenly withcolor 0.85white;

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresentationGraphique.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresentationGraphique.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCRepresentationGraphique.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -321,6 +321,7 @@
     label.llft(btex 0 etex,u*Origine);
     drawoptions();
     if Vide:
+    clip currentpicture to polygone(u*(xmin,ymin),u*(xmax,ymin),u*(xmax,ymax),u*(xmin,ymax));
     else:
     draw courbe1(borneinf,bornesup,nbpointsCourbe)(#2) withpen (pencircle scaled Epaisseur) withcolor colortrace;
     % labelisation

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCResoudreEquation.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCResoudreEquation.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCResoudreEquation.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -47,9 +47,9 @@
 \setcounter{Nbequa}{0}
 
 %CT
-\newdimen\fdashwidth    \fdashwidth  = 0.8pt % \'epaisseur traits
-\newdimen\fdashlength   \fdashlength = 0.5mm % longueur des pointill\'es et s\'eparation entre pointill\'es
-\newdimen\fdashsep      \fdashsep    = 3pt % s\'eparateur entre contenu et traits
+\newdimen\fdashwidth\fdashwidth  = 0.8pt % \'epaisseur traits
+\newdimen\fdashlength\fdashlength = 0.5mm % longueur des pointill\'es et s\'eparation entre pointill\'es
+\newdimen\fdashsep\fdashsep    = 3pt % s\'eparateur entre contenu et traits
 
 \def\fdash#1{%
   \leavevmode\begingroup%
@@ -57,19 +57,19 @@
   \def\hdash{\vrule height\fdashwidth width\fdashlength\relax}%
   \def\vdash{\hrule height\fdashlength width\fdashwidth\relax}%
   \def\dashblank{\kern\fdashlength}%
-  \ifdim\fdashsep>0pt
+  \ifdim\fdashsep>0pt%
   \setbox0\hbox{\vrule width0pt height\dimexpr\ht0+\fdashsep depth\dimexpr\dp0+\fdashsep\kern\fdashsep\unhbox0 \kern\fdashsep}%
-  \fi
+  \fi%
   \edef\hdash{\hbox to\the\wd0{\noexpand\color{Csymbole}\hdash\kern.5\fdashlength\xleaders\hbox{\hdash\dashblank}\hfil\hdash}}%
   \edef\vdash{\vbox to\the\dimexpr\ht0+\dp0+2\fdashwidth{\noexpand\color{Csymbole}\vdash\kern.5\fdashlength\xleaders\vbox{\vdash\dashblank}\vfil\vdash}}%
   \hbox{%
-    \vdash
+    \vdash%
     \vtop{\vbox{\offinterlineskip\hdash\hbox{\unhbox0 }\hdash}}%
     \vdash}%
-  \endgroup
-}
+  \endgroup%
+}%
 % fin CT
-\def\Fdash#1{\raisebox{-2\fdashsep+\fdashwidth}{\fdash{#1}}}
+\def\Fdash#1{\raisebox{-2\fdashsep+\fdashwidth}{\fdash{#1}}}%
 
 %Une simplification de a/b est possible ou non ?
 \newboolean{Simplification}

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCSimplifierFraction.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCSimplifierFraction.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCSimplifierFraction.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -127,7 +127,6 @@
 \newcommand\DiviseurCommun[2]{%
   % #1 : le premier nombre entier
   % #2 : le deuxi\`eme nombre entier
- % nombre 1 vaut #1 - Nombre 2 vaut #2
   \anpdc=#1%
   \cnpdc=#2%
   \bnpdc=2\relax%
@@ -153,19 +152,36 @@
 \newcommand\LongueSimplification[2]{%
   \xdef\NumerateurDiv{#1}%
   \xdef\DenominateurDiv{#2}%
-  \DiviseurCommun{#1}{#2}%
-  \ensuremath{%
-    \whiledo{\DivCom>1}{%
-      \frac{\num{\fpeval{\NumerateurDiv/\the\DivCom}}\times\num{\the\DivCom}}{\num{\fpeval{\DenominateurDiv/\the\DivCom}}\times\num{\the\DivCom}}=\frac{\num{\fpeval{\NumerateurDiv/\DivCom}}}{\num{\fpeval{\DenominateurDiv/\DivCom}}}%
-      \xdef\NumerateurDiv{\fpeval{\NumerateurDiv/\DivCom}}%
-      \xdef\DenominateurDiv{\fpeval{\DenominateurDiv/\DivCom}}%
-      \DiviseurCommun{\NumerateurDiv}{\DenominateurDiv}%
-      \xintifboolexpr{\DivCom>1}{=}{}%
+  \ifboolKV[ClesSimplification]{Impose}{%
+    \DivCom=\useKV[ClesSimplification]{Nombre}%
+  }{%
+    \DiviseurCommun{#1}{#2}%
+  }%
+  \ifboolKV[ClesSimplification]{Debut}{%
+    \ensuremath{%
+      \whiledo{\DivCom>1}{%
+        \frac{\mathcolor{PfCSimpliCol}{\num{\the\DivCom}}\times\num{\fpeval{\NumerateurDiv/\the\DivCom}}}{\mathcolor{PfCSimpliCol}{\num{\the\DivCom}}\times\num{\fpeval{\DenominateurDiv/\the\DivCom}}}=\frac{\num{\fpeval{\NumerateurDiv/\DivCom}}}{\num{\fpeval{\DenominateurDiv/\DivCom}}}%
+        \xdef\NumerateurDiv{\fpeval{\NumerateurDiv/\DivCom}}%
+        \xdef\DenominateurDiv{\fpeval{\DenominateurDiv/\DivCom}}%
+        \DiviseurCommun{\NumerateurDiv}{\DenominateurDiv}%
+        \xintifboolexpr{\DivCom>1}{=}{}%
+      }%
     }%
+  }{%
+    \ensuremath{%
+      \whiledo{\DivCom>1}{%
+        \frac{\num{\fpeval{\NumerateurDiv/\the\DivCom}}\times\mathcolor{PfCSimpliCol}{\num{\the\DivCom}}}{\num{\fpeval{\DenominateurDiv/\the\DivCom}}\times\mathcolor{PfCSimpliCol}{\num{\the\DivCom}}}=\frac{\num{\fpeval{\NumerateurDiv/\DivCom}}}{\num{\fpeval{\DenominateurDiv/\DivCom}}}%
+        \xdef\NumerateurDiv{\fpeval{\NumerateurDiv/\DivCom}}%
+        \xdef\DenominateurDiv{\fpeval{\DenominateurDiv/\DivCom}}%
+        \DiviseurCommun{\NumerateurDiv}{\DenominateurDiv}%
+        \xintifboolexpr{\DivCom>1}{=}{}%
+      }%
+    }%
   }%
 }%
 
-\setKVdefault[ClesSimplification]{Details=false,All=false,Longue=false,Fleches=false,Contraire=0}
+\setKVdefault[ClesSimplification]{Details=false,All=false,Longue=false,Fleches=false,Contraire=0,Couleur=black,Debut=false,Impose=false}
+\defKV[ClesSimplification]{Nombre=\setKV[ClesSimplification]{Impose}}
 
 \newcounter{NbFrac}%
 \setcounter{NbFrac}{0}%
@@ -200,6 +216,7 @@
       }%
     }{%
       \ifboolKV[ClesSimplification]{Longue}{%
+        \colorlet{PfCSimpliCol}{\useKV[ClesSimplification]{Couleur}}%
         \LongueSimplification{#2}{#3}%
       }{%
         \ifboolKV[ClesSimplification]{Details}{\SSimpli{#2}{#3}}{\ifboolKV[ClesSimplification]{All}{\ensuremath{\SSimpli{#2}{#3}=\SSimplifie{#2}{#3}}}{\SSimplifie{#2}{#3}}}%

Modified: trunk/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -664,9 +664,9 @@
       unitey:=\useKV[ClesStat]{Unitey}*cm;
       xpartorigine:=\useKV[ClesStat]{Origine};
       AngleRotation=\useKV[ClesStat]{AngleRotationAbscisse};
-      boolean Rotation;
+      boolean Rotation,Lecture;
       Rotation=\useKV[ClesStat]{AbscisseRotation};
-      boolean Lecture;
+%      boolean Lecture;
       Lecture:=\useKV[ClesStat]{Lecture};
       boolean LectureFine;
       LectureFine:=\useKV[ClesStat]{LectureFine};
@@ -682,9 +682,8 @@
       boolean Tiret;
       Tiret=\useKV[ClesStat]{Tiret};
       color CoulDefaut;
-      CoulDefaut=\useKV[ClesStat]{CouleurDefaut};}
-    Depart=\useKV[ClesStat]{Depart};
-    ]
+      CoulDefaut=\useKV[ClesStat]{CouleurDefaut};
+      Depart=\useKV[ClesStat]{Depart};}]
     maxx:=0;
     maxy:=0;
     % on r\'ecup\`ere les couleurs

Added: trunk/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex	2023-04-15 20:49:32 UTC (rev 66856)
@@ -0,0 +1,273 @@
+\newlength\PfCTrioHauteur%
+\newcounter{PfCTrioLettre}%
+
+\setKVdefault[Trio]{Largeur=15pt,Graines=false,Repere=false,Cibles=false,Ligne=1,Colonne=1,Vide=false,VideRepere=false}%
+\defKV[Trio]{Graine=\setKV[Trio]{Graines}}%
+\defKV[Trio]{Cible=\setKV[Trio]{Cibles}}%
+
+\NewDocumentCommand\TrioCalculs{mmm}{%
+  Les combinaisons Trio de #1, #2 et #3 sont :%
+  \begin{enumerate}%
+  \item $#1\times#2+#3=\fpeval{#1*#2+#3}$%
+  \item $#1\times#2-#3=\fpeval{#1*#2-#3}$%
+  \item $#2\times#3+#1=\fpeval{#2*#3+#1}$%
+  \item $#2\times#3-#1=\fpeval{#2*#3-#1}$%
+  \item $#3\times#1+#2=\fpeval{#3*#1+#2}$%
+  \item $#3\times#1-#2=\fpeval{#3*#1-#2}$%
+  \end{enumerate}%
+}%
+
+\NewDocumentCommand\Trio{o}{%
+  \setcounter{PfCTrioLettre}{0}
+  \useKVdefault[Trio]%
+  \setKV[Trio]{#1}%
+  \ifboolKV[Trio]{Graines}{\PfCGraineAlea{\useKV[Trio]{Graine}}}{}%
+  \ifboolKV[Trio]{Repere}{\xdef\PfCTrioNbCases{8}}{\xdef\PfCTrioNbCases{7}}%
+  % On définit la liste de nombres
+  \xdef\PfCTrioFoo{1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,9,9,9,9}%
+  \MelangeListe{\PfCTrioFoo}{49}%
+  \setsepchar{,}\ignoreemptyitems%
+  \readlist*\PfCTrioMelange{\faa}%
+  \reademptyitems%
+  \setlength{\PfCTrioHauteur}{\useKV[Trio]{Largeur}+\tabcolsep}%
+  \begin{NiceTabular}{*{\PfCTrioNbCases}{m{\useKV[Trio]{Largeur}}}}[hvlines]%
+    \CodeBefore%
+    \ifboolKV[Trio]{Cibles}{%
+      \ifboolKV[Trio]{Repere}{%
+        \xdef\PfCTrioAjout{1}%
+      }{%
+        \xdef\PfCTrioAjout{0}
+      }%
+      % Calculs des horizontaux
+      \xintFor* ##2 in{\xintSeq{1}{7}}\do{%
+        \xintFor* ##1 in{\xintSeq{1}{5}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##2-1)+##1}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##2-1)+##1+1}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##2-1)+##1+2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{\tikz\draw[fill=Cornsilk,line width=2pt] (\fpeval{##2+\PfCTrioAjout}-|\fpeval{##1+\PfCTrioAjout}) rectangle (\fpeval{##2+1+\PfCTrioAjout}-|\fpeval{##1+3+\PfCTrioAjout});\xintBreakFor}{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+      % Calculs des verticaux
+      \xintFor* ##2 in{\xintSeq{1}{7}}\do{%
+        \xintFor* ##1 in{\xintSeq{1}{5}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##1-1)+##2}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##1)+##2}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##1+1)+##2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{\tikz\draw[fill=LightSteelBlue,line width=2pt] (\fpeval{##1+\PfCTrioAjout}-|\fpeval{##2+\PfCTrioAjout}) rectangle (\fpeval{##1+3+\PfCTrioAjout}-|\fpeval{##2+1+\PfCTrioAjout});\xintBreakFor}{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+      % Calculs des diag positives (descendantes)
+      \xintFor* ##2 in{\xintSeq{1}{5}}\do{%
+        \xintFor* ##1 in{\xintSeq{1}{5}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##2-1)+##1}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##2)+##1+1}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##2+1)+##1+2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+            \tikz\draw[fill=MistyRose,line width=2pt] (\fpeval{##2+\PfCTrioAjout}-|\fpeval{##1+\PfCTrioAjout}) rectangle (\fpeval{##2+1+\PfCTrioAjout}-|\fpeval{##1+1+\PfCTrioAjout});%
+            \tikz\draw[fill=MistyRose,line width=2pt] (\fpeval{##2+1+\PfCTrioAjout}-|\fpeval{##1+1+\PfCTrioAjout}) rectangle (\fpeval{##2+2+\PfCTrioAjout}-|\fpeval{##1+2+\PfCTrioAjout});%
+            \tikz\draw[fill=MistyRose,line width=2pt] (\fpeval{##2+2+\PfCTrioAjout}-|\fpeval{##1+2+\PfCTrioAjout}) rectangle (\fpeval{##2+3+\PfCTrioAjout}-|\fpeval{##1+3+\PfCTrioAjout});%
+            \xintBreakFor}{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+      % Calculs des diagonale négatives (montantes)
+      \xintFor* ##2 in{\xintSeq{1}{5}}\do{%
+        \xintFor* ##1 in{\xintSeq{2}{6}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##1)+##2}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##1-1)+##2+1}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##1-2)+##2+2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+            \tikz\draw[fill=LavenderBlush,line width=2pt] (\fpeval{##1+\PfCTrioAjout+1}-|\fpeval{##2+\PfCTrioAjout}) rectangle (\fpeval{##1+2+\PfCTrioAjout}-|\fpeval{##2+1+\PfCTrioAjout});%
+            \tikz\draw[fill=LavenderBlush,line width=2pt] (\fpeval{##1+\PfCTrioAjout}-|\fpeval{##2+1+\PfCTrioAjout}) rectangle (\fpeval{##1+1+\PfCTrioAjout}-|\fpeval{##2+2+\PfCTrioAjout});%
+            \tikz\draw[fill=LavenderBlush,line width=2pt] (\fpeval{##1-1+\PfCTrioAjout}-|\fpeval{##2+2+\PfCTrioAjout}) rectangle (\fpeval{##1+\PfCTrioAjout}-|\fpeval{##2+3+\PfCTrioAjout});%
+            \xintBreakFor%
+          }{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+    }{}%
+    \Body
+    \ifboolKV[Trio]{Repere}{%
+      \rule{0pt}{\PfCTrioHauteur}\Block[fill=gray!15]{}{}\xintFor* ##1in{\xintSeq{1}{7}}\do{%
+        &\Block[fill=gray!15]{}{\stepcounter{PfCTrioLettre}\Alph{PfCTrioLettre}}%
+        }\\
+    }{}%
+    \xintFor* ##1 in{\xintSeq{1}{7}}\do{%
+      \rule{0pt}{\PfCTrioHauteur}%
+      \ifboolKV[Trio]{Repere}{\Block[fill=gray!15]{}{##1}}{}%
+      \ifboolKV[Trio]{Repere}{&}{}\xintFor* ##2 in{\xintSeq{1}{7}}\do{%
+        \xintifForFirst{}{&}\Block{}{\PfCTrioMelange[\fpeval{7*(##1-1)+##2}]}%
+      }\\
+    }%
+  \end{NiceTabular}%
+}%
+
+\NewDocumentCommand\TrioCourt{o}{%
+  \useKVdefault[Trio]%
+  \setKV[Trio]{#1}%
+  \setcounter{PfCTrioLettre}{\useKV[Trio]{Colonne}-1}%
+  \ifboolKV[Trio]{Repere}{\xdef\PfCTrioNbCases{4}}{\xdef\PfCTrioNbCases{3}}%
+  \setlength{\PfCTrioHauteur}{\useKV[Trio]{Largeur}+\tabcolsep}%
+  \begin{NiceTabular}{*{\PfCTrioNbCases}{m{\useKV[Trio]{Largeur}}}}[hvlines]%
+    \CodeBefore%
+    \ifboolKV[Trio]{Cibles}{%
+      \ifboolKV[Trio]{Repere}{%
+        \xdef\PfCTrioAjout{1}%
+      }{%
+        \xdef\PfCTrioAjout{0}
+      }%
+      % Calculs des horizontaux
+      \xintFor* ##2 in{\xintSeq{\fpeval{\useKV[Trio]{Ligne}}}{\fpeval{\useKV[Trio]{Ligne}+2}}}\do{%
+        \xintFor* ##1 in{\xintSeq{\fpeval{\useKV[Trio]{Colonne}}}{\fpeval{\useKV[Trio]{Colonne}}}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##2-1)+##1}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##2-1)+##1+1}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##2-1)+##1+2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{\tikz\draw[fill=Cornsilk,line width=2pt] (\fpeval{##2+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##2+1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+3+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});\xintBreakFor}{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+      % Calculs des verticaux
+      \xintFor* ##2 in{\xintSeq{\fpeval{\useKV[Trio]{Colonne}}}{\fpeval{\useKV[Trio]{Colonne}+2}}}\do{%
+        \xintFor* ##1 in{\xintSeq{\useKV[Trio]{Ligne}}{\useKV[Trio]{Ligne}}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##1-1)+##2}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##1)+##2}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##1+1)+##2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            || \fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{\tikz\draw[fill=LightSteelBlue,line width=2pt] (\fpeval{##1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##1+3+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});\xintBreakFor}{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+      % Calculs des diag positives (descendantes)
+      \xintFor* ##2 in{\xintSeq{\useKV[Trio]{Ligne}}{\useKV[Trio]{Ligne}}}\do{%
+        \xintFor* ##1 in{\xintSeq{\useKV[Trio]{Colonne}}{\useKV[Trio]{Colonne}}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##2-1)+##1}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##2)+##1+1}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##2+1)+##1+2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+            \tikz\draw[fill=MistyRose,line width=2pt] (\fpeval{##2+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##2+1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});%
+            \tikz\draw[fill=MistyRose,line width=2pt] (\fpeval{##2+1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##2+2+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+2+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});%
+            \tikz\draw[fill=MistyRose,line width=2pt] (\fpeval{##2+2+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+2+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##2+3+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##1+3+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});%
+            \xintBreakFor}{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+      % Calculs des diagonale négatives (montantes)
+      \xintFor* ##2 in{\xintSeq{\useKV[Trio]{Colonne}}{\useKV[Trio]{Colonne}}}\do{%
+        \xintFor* ##1 in{\xintSeq{\fpeval{\useKV[Trio]{Ligne}}}{\fpeval{\useKV[Trio]{Ligne}}}}\do{%
+          \xdef\PfCTrioNombreA{\PfCTrioMelange[\fpeval{7*(##1+1)+##2}]}%
+          \xdef\PfCTrioNombreB{\PfCTrioMelange[\fpeval{7*(##1)+##2+1}]}%
+          \xdef\PfCTrioNombreC{\PfCTrioMelange[\fpeval{7*(##1-1)+##2+2}]}%
+          \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+            ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+            \tikz\draw[fill=LavenderBlush,line width=2pt] (\fpeval{##1+2+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##1+3+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});%
+            \tikz\draw[fill=LavenderBlush,line width=2pt] (\fpeval{##1+1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+1+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##1+2+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+2+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});%
+            \tikz\draw[fill=LavenderBlush,line width=2pt] (\fpeval{##1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+2+\PfCTrioAjout-\useKV[Trio]{Colonne}+1}) rectangle (\fpeval{##1+1+\PfCTrioAjout-\useKV[Trio]{Ligne}+1}-|\fpeval{##2+3+\PfCTrioAjout-\useKV[Trio]{Colonne}+1});%
+            \xintBreakFor%
+          }{}%
+        }%
+        \xintifboolexpr{\fpeval{\PfCTrioNombreA*\PfCTrioNombreB+\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreA*\PfCTrioNombreB-\PfCTrioNombreC}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC+\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreB*\PfCTrioNombreC-\PfCTrioNombreA}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA+\PfCTrioNombreB}==\useKV[Trio]{Cible}%
+          ||\fpeval{\PfCTrioNombreC*\PfCTrioNombreA-\PfCTrioNombreB}==\useKV[Trio]{Cible}}{%
+          \xintBreakFor}{}%
+      }%
+    }{}%
+    \Body
+    \ifboolKV[Trio]{Repere}{%
+      \rule{0pt}{\PfCTrioHauteur}\Block[fill=gray!15]{}{}\xintFor* ##1in{\xintSeq{1}{3}}\do{%
+        &\Block[fill=gray!15]{}{\ifboolKV[Trio]{VideRepere}{}{\stepcounter{PfCTrioLettre}\Alph{PfCTrioLettre}}}%
+      }\\%
+    }{}%
+    \xintFor* ##1 in{\xintSeq{\fpeval{\useKV[Trio]{Ligne}}}{\fpeval{\useKV[Trio]{Ligne}+2}}}\do{%%
+      \rule{0pt}{\PfCTrioHauteur}%
+      \ifboolKV[Trio]{Repere}{\Block[fill=gray!15]{}{\ifboolKV[Trio]{VideRepere}{}{##1}}}{}%
+      \ifboolKV[Trio]{Repere}{&}{}\xintFor* ##2 in{\xintSeq{\fpeval{\useKV[Trio]{Colonne}}}{\fpeval{\useKV[Trio]{Colonne}+2}}}\do{%
+        \xintifForFirst{}{&}\Block{}{\ifboolKV[Trio]{Vide}{}{\PfCTrioMelange[\fpeval{7*(##1-1)+##2}]}}%
+      }\\
+    }%
+  \end{NiceTabular}%
+}%
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2023-04-15 20:48:48 UTC (rev 66855)
+++ trunk/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty	2023-04-15 20:49:32 UTC (rev 66856)
@@ -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/03/24}%
+\def\filedate{2023/04/15}%
 \let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-g}%
+\def\fileversion{0.99-z-i}%
 \let\PfCfileversion\fileversion%
 \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
 
@@ -570,6 +570,9 @@
 }%\raisebox
 }
 
+\input{PfCJeuRangement}
+\input{PfCTrio}
+\input{PfCCalculsFractions}
 \input{PfCDecDeci}
 \input{PfCKakurasu}
 \input{PfCMidpoint}
@@ -638,6 +641,7 @@
 \input{PfCSommeAngles}
 \input{PfCPythagore}
 \input{PfCDistributivite}
+\input{PfCFactorisation}
 \input{PfCDecomposerNombrePremier}
 \input{PfCSimplifierFraction}
 \input{PfCThales}



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