summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-05-15 19:14:20 +0000
committerKarl Berry <karl@freefriends.org>2024-05-15 19:14:20 +0000
commit8d697d19e71082982168b486e77423d1b2db21f6 (patch)
treebadb41644e97b14e8114e22bde0d34ae6f6dcb6a
parent0a47f393e41f85c025951b57bc192814b69b6498 (diff)
profcollege (15may24)
git-svn-id: svn://tug.org/texlive/trunk@71268 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdfbin10283638 -> 10304192 bytes
-rw-r--r--Master/texmf-dist/doc/latex/profcollege/profcollege-doc.zip (renamed from Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip)bin5696000 -> 5699676 bytes
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCArbreChiffre.tex200
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex11
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCEcrireunQCM.tex10
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCPatronPaves.tex34
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCVisualisationMulDeci.tex135
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/ProfCollegeT.sty974
8 files changed, 1356 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf b/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
index d71cc56e940..1a049ae58c7 100644
--- a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
+++ b/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip b/Master/texmf-dist/doc/latex/profcollege/profcollege-doc.zip
index d1c1c1ac304..032730d7ca9 100644
--- a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip
+++ b/Master/texmf-dist/doc/latex/profcollege/profcollege-doc.zip
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCArbreChiffre.tex b/Master/texmf-dist/tex/latex/profcollege/PfCArbreChiffre.tex
new file mode 100644
index 00000000000..f724c16fda8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCArbreChiffre.tex
@@ -0,0 +1,200 @@
+%%%
+% ArbreChiffre
+%%%
+% https://tex.stackexchange.com/questions/112975/how-to-print-the-permutation-of-s-u-v-a-t-with-latex
+
+\def\recurse#1#2#3#4\endmarker{%
+ \dopermute{#1#3}#2#4\endmarker
+ \ifx\relax#4\relax\else % add a \par before \else if there are more than 8 items
+ \recurse{#1}{#2#3}#4\endmarker
+ \fi}
+\def\dopermute#1#2#3\endmarker{%
+ \ifx\relax#3\relax
+ #1#2,%
+ \else
+ \dopermute{#1#2}#3\endmarker
+ \recurse{#1}{#2}#3\endmarker
+ \fi}
+
+\newcommand*\permute[1]{\dopermute{}#1\endmarker}
+
+\newtoks\toklistepermute%
+
+\def\UpdatetoksArbre#1\nil{\addtotok\toklistepermute{"#1",}}%
+
+\setKVdefault[ArbreChiffre]{Fixe=false,EcartV=0.5}%
+\defKV[ArbreChiffre]{Chiffre=\setKV[ArbreChiffre]{Fixe}}%
+
+\NewDocumentCommand\ArbreChiffre{om}{%
+ \useKVdefault[ArbreChiffre]%
+ \setKV[ArbreChiffre]{#1}%
+ \toklistepermute{}%
+ \xdef\Foo{\permute{#2}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist\ListePermutations{\Foo}%
+ \reademptyitems%
+ %
+ \foreachitem\compteur\in\ListePermutations{\expandafter\UpdatetoksArbre\compteur\nil}%
+ \BuildArbreChiffre{\the\toklistepermute}%
+}%
+
+\NewDocumentCommand\BuildArbreChiffre{m}{%
+ \ifluatex
+ \mplibforcehmode
+ \mplibnumbersystem{double}
+ \begin{mplibcode}
+ boolean Fixe;
+ Fixe=\useKV[ArbreChiffre]{Fixe};
+ string NombreFixe;
+ if Fixe:
+ NombreFixe=\useKV[ArbreChiffre]{Chiffre};
+ else:
+ NombreFixe="-1";
+ fi;
+
+ string LesPermu[];
+
+ vardef LongueurArbre(text t)=
+ ec:=0;
+ for p_=t:
+ LesPermu[ec]=p_;
+ longA:=length p_;
+ ec:=ec+1;
+ endfor;
+ enddef;
+
+ LongueurArbre(#1);
+
+ ecartV=\useKV[ArbreChiffre]{EcartV}*1cm;
+ ecartH=1cm;
+
+ k:=longA;
+
+ vardef Factorielle(expr nb)=
+ save Fact;
+ numeric Fact;
+ if nb<2:
+ Fact=1;
+ else:
+ Fact=nb;
+ for m=nb-1 downto 2:
+ Fact:=Fact*m;
+ endfor;
+ fi;
+ Fact
+ enddef;
+
+ pair A[][];%1 colonne 2 ligne
+
+ vardef Lecture(text t)=
+ for p_=t:
+ n:=n+1;
+ if Fixe:
+ if k>2:
+ if (n mod Factorielle(k-1))=1:
+ A[k][decalv]=pointdepart+(0,ecartV*decalv*Factorielle(k-1));
+ if NombreFixe=substring(0,1) of p_:
+ label(TEX(substring(longA-k,longA-k+1) of p_),A[k][decalv]);
+ fi;
+ decalv:=decalv-1;
+ fi;
+ else:
+ A[k][decalv]=pointdepart+(0,ecartV*decalv);
+ if NombreFixe=substring(0,1) of p_:
+ label(TEX(substring(longA-k,longA-k+1) of p_),A[k][decalv]);
+ fi;
+ decalv:=decalv-1;
+ fi;
+ else:%Pas Fixe
+ if k>2:
+ if (n mod Factorielle(k-1))=1:
+ A[k][decalv]=pointdepart+(0,ecartV*decalv*Factorielle(k-1));
+ label(TEX(substring(longA-k,longA-k+1) of p_),A[k][decalv]);
+ decalv:=decalv-1;
+ fi;
+ else:
+ A[k][decalv]=pointdepart+(0,ecartV*decalv);
+ label(TEX(substring(longA-k,longA-k+1) of p_),A[k][decalv]);
+ decalv:=decalv-1;
+ fi;
+ fi;
+ endfor;
+ enddef;
+
+ pair pointdepart;
+ pointdepart=(0,0);
+
+ forever:
+ n:=0;
+ decalv:=0;
+ Lecture(#1);
+ k:=k-1;
+ if k>1:
+ if k>2:
+ pointdepart:=if k mod 2=0:pointdepart+(ecartH,1.5*Factorielle(k-1)*ecartV); else:pointdepart+(ecartH,Factorielle(k-1)*ecartV); fi;
+ else:
+ pointdepart:=if k mod 2=0:pointdepart+(ecartH,Factorielle(k-1)*ecartV-0.5*ecartV); else:pointdepart+(ecartH,Factorielle(k-1)*ecartV+0.5*ecartV); fi;
+ fi;
+ else:
+ pointdepart:=pointdepart+(ecartH,0);
+ fi;
+ exitif k=0;
+ endfor;
+
+% drawoptions(withcolor red);
+ if Fixe:
+ for k=longA downto 3:
+ for l=0 downto (-Factorielle(longA)/Factorielle(k-1))+1:
+ if (substring(0,1) of LesPermu[abs(l)*Factorielle(k-1)+1])=NombreFixe:
+ for p=0 upto k-2:
+ drawarrow (A[k][l]--A[k-1][(k-1)*l-p]) cutbefore cercles(A[k][l],2mm) cutafter cercles(A[k-1][(k-1)*l-p],2mm);
+ endfor;
+ fi;
+ endfor;
+ endfor;
+ else:
+ for k=longA downto 3:
+ for l=0 downto (-Factorielle(longA)/Factorielle(k-1))+1:
+ for p=0 upto k-2:
+ drawarrow (A[k][l]--A[k-1][(k-1)*l-p]) cutbefore cercles(A[k][l],2mm) cutafter cercles(A[k-1][(k-1)*l-p],2mm);
+ endfor;
+ endfor;
+ endfor;
+ fi;
+% drawoptions();
+
+ % affichage du dernier cran.
+ for k=2 downto 2:
+ l:=1;
+ for p_=#1:
+ l:=l-1;
+ if Fixe:
+ if substring(0,1) of p_=NombreFixe:
+drawarrow (A[k][l]--A[k-1][l]) cutbefore cercles(A[k][l],2mm) cutafter cercles(A[k-1][l],2mm);
+ fi;
+ else:
+ drawarrow (A[k][l]--A[k-1][l]) cutbefore cercles(A[k][l],2mm) cutafter cercles(A[k-1][l],2mm);
+ fi;
+ endfor;
+ endfor;
+
+ %Affichage final du nombre
+ l:=1;
+ for p_=#1:
+ l:=l-1;
+ A[0][l]-A[1][l]=(ecartH,0);
+ if Fixe:
+ if substring(0,1) of p_=NombreFixe:
+ label.rt(TEX("\num{"&p_&"}"),A[0][l]);
+ drawarrow (A[1][l]--A[0][l]) cutbefore cercles(A[1][l],2mm) dashed evenly;
+ fi;
+ else:
+ label.rt(TEX("\num{"&p_&"}"),A[0][l]);
+ drawarrow (A[1][l]--A[0][l]) cutbefore cercles(A[1][l],2mm) dashed evenly;
+ fi;
+ endfor;
+
+ \end{mplibcode}
+ \mplibnumbersystem{scaled}
+ \fi
+}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex b/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
index bf9b9e0cdef..1e2075d91af 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
@@ -417,11 +417,16 @@
\ifboolKV[Cards]{Jointes}{\setlength{\largeurcards}{\largeurcarte}}{}%
\ifboolKV[Cards]{Jointes}{\setlength{\hauteurcards}{\hauteurcarte}}{}%
% décalage entre les cartes ou pas
- \ifnum\PfCNbCartesLarg>1\relax
- \setlength{\margeh}{\fpeval{(\paperwidth-\PfCNbCartesLarg*\largeurcards)/(\PfCNbCartesLarg-1)}pt}%
+ \ifnum\PfCNbCartesLarg>2\relax
+ \setlength{\margeh}{\fpeval{(\paperwidth-\PfCNbCartesLarg*\largeurcards)/(\PfCNbCartesLarg-1)}pt}%
+ % \setlength{\margeh}{0pt}
+ \else
+ \setlength{\margeh}{\fpeval{(\paperwidth-\PfCNbCartesLarg*\largeurcards)/(\PfCNbCartesLarg+1)}pt}%
\fi
- \ifnum\PfCNbCartesHaut>1\relax
+ \ifnum\PfCNbCartesHaut>2\relax
\setlength{\margev}{\fpeval{(\paperheight-\PfCNbCartesHaut*\hauteurcards)/(\PfCNbCartesHaut-1)}pt}%
+ \else
+ \setlength{\margev}{\fpeval{(\paperheight-\PfCNbCartesHaut*\hauteurcards)/(\PfCNbCartesHaut+1)}pt}%
\fi
%
\setlength{\hauteurtitre}{\fpeval{\useKV[Cards]{HauteurTheme}}pt}%
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCEcrireunQCM.tex b/Master/texmf-dist/tex/latex/profcollege/PfCEcrireunQCM.tex
index 3d7a324b732..6fc7a945935 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCEcrireunQCM.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCEcrireunQCM.tex
@@ -12,7 +12,7 @@
\setcounter{TotalQCMSeul}{0}%
\setcounter{TotalQCMSeulSol}{0}%
%
-\setKVdefault[QCMSeul]{Melange=false,Solution=false,EnColonne=false}%
+\setKVdefault[QCMSeul]{Melange=false,Solution=false,EnColonne=false,LabelLettre=false}%
\defKV[QCMSeul]{Colonnes=\setKV[QCMSeul]{EnColonne}}%
%
\NewDocumentCommand\PfCQCMSChoixLabelSol{m}{%
@@ -71,7 +71,11 @@
% On écrit
\ListeQCM[1]%
\ifboolKV[QCMSeul]{EnColonne}{\begin{multicols}{\useKV[QCMSeul]{Colonnes}}}{}%
- \begin{itemize}[label=$\square$]
+ \ifboolKV[QCMSeul]{LabelLettre}{
+ \begin{enumerate}[label=\Alph{*}/]
+ }{
+ \begin{enumerate}[label=$\square$]
+ }
\xintFor* ##1 in{\xintSeq{2}{\fpeval{\ListeQCMlen-1}}}\do{%
\xdef\Titi{\ListeEnumerate[\fpeval{##1-1}]}
\ifboolKV[QCMSeul]{Solution}{%
@@ -80,7 +84,7 @@
\item \ListeQCM[\fpeval{\Titi+1}]
}%
}%
- \end{itemize}
+ \end{enumerate}
\ifboolKV[QCMSeul]{EnColonne}{\end{multicols}}{}%
}%
%
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCPatronPaves.tex b/Master/texmf-dist/tex/latex/profcollege/PfCPatronPaves.tex
index 2be0a20bd03..c66c5e1d2cd 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCPatronPaves.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCPatronPaves.tex
@@ -1,3 +1,6 @@
+%%%
+% Patrons de pavés droits et cubes
+%%%
\setKVdefault[ClesPatron]{Cube,Arete=1cm,ListeCouleurs={white},Pave=false,Largeur=2cm,Hauteur=1.5cm,Profondeur=1cm,Codes=false}%
\defKV[ClesPatron]{Traces=\setKV[ClesPatron]{Codes}}%
@@ -126,13 +129,35 @@
boolean Codes;
Codes=\useKV[ClesPatron]{Codes};
numeric DecalCol[];
+ %
vardef LectureLargeur(text t)=
for p_=t:
Long:=length p_;
endfor;
for k=1 upto Long-1:
for p_=t:
- if substring(k,k+1) of p_="l":
+ if substring(k,k+1) of p_="o":
+ if k=1:
+ if (substring(0,1) of p_="h") and (substring(1,2) of p_="p"):
+ DecalCol[k]:=Largeur;
+ fi;
+ if (substring(0,1) of p_="h") and (substring(1,2) of p_="l"):
+ DecalCol[k]:=Profondeur;
+ fi;
+ if (substring(0,1) of p_="p") and (substring(1,2) of p_="h"):
+ DecalCol[k]:=Largeur;
+ fi;
+ if (substring(0,1) of p_="p") and (substring(1,2) of p_="l"):
+ DecalCol[k]:=Hauteur;
+ fi;
+ if (substring(0,1) of p_="l") and (substring(1,2) of p_="h"):
+ DecalCol[k]:=Profondeur;
+ fi;
+ if (substring(0,1) of p_="l") and (substring(1,2) of p_="p"):
+ DecalCol[k]:=Hauteur;
+ fi;
+ fi;
+ elseif substring(k,k+1) of p_="l":
DecalCol[k]:=Largeur;
elseif substring(k,k+1) of p_="h":
DecalCol[k]:=Hauteur;
@@ -142,6 +167,7 @@
endfor;
endfor;
enddef;
+ %
vardef Patron(text t)=
path PathPave;
nblignes:=-1;
@@ -159,7 +185,11 @@
fi;
nblignes:=nblignes-YEchelle;
for k=1 upto Long-1:
- if substring(k,k+1) of p_="l":
+ if substring(k,k+1) of p_="o":
+ if k=1:
+ PathPave:=(unitsquare scaled 0);
+ fi;
+ elseif substring(k,k+1) of p_="l":
nbcol:=nbcol+1;
PathPave:=(unitsquare xscaled Largeur yscaled YEchelle) shifted ((nbcolonnes,nblignes));
nbfaces:=nbfaces+1;
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCVisualisationMulDeci.tex b/Master/texmf-dist/tex/latex/profcollege/PfCVisualisationMulDeci.tex
new file mode 100644
index 00000000000..54a1a079cc6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCVisualisationMulDeci.tex
@@ -0,0 +1,135 @@
+%%%
+% Visualisation Multiplication Décimaux
+%%%
+\setKVdefault[VisMulDec]{Couleur=Orange,CouleurUnite=DarkGreen,Dixiemes=false,Unite=2}%
+
+\newtoks\toksvismuldec%
+\def\UpdatetoksVisMulDec#1\nil{\addtotok\toksvismuldec{"#1",#1,}}%
+
+\NewDocumentCommand\VisualisationMulDecimaux{om}{%
+ \useKVdefault[VisMulDec]%
+ \setKV[VisMulDec]{#1}%
+ \setsepchar{x}\ignoreemptyitems%
+ \readlist*\PfCVisMulDec{#2}%
+ \toksvismuldec{}%
+ \foreachitem\compteur\in\PfCVisMulDec{\expandafter\UpdatetoksVisMulDec\compteur\nil}%
+ \BuildVisMulDec{\the\toksvismuldec}%
+ \reademptyitems%
+}%
+
+\NewDocumentCommand\BuildVisMulDec{m}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ string Nombres[];
+ numeric Decimaux[];
+ color Coul[];
+ boolean Dixiemes;
+
+ Unite=\useKV[VisMulDec]{Unite}*cm;
+ Coul1=\useKV[VisMulDec]{Couleur};
+ Coul2=\useKV[VisMulDec]{CouleurUnite};
+ Coul3=0.7[Coul2,white];
+
+ Dixiemes=\useKV[VisMulDec]{Dixiemes};
+
+ vardef RecupererDonnees(text t)=
+ nbs:=0;
+ nbd:=0;
+ for p_=t:
+ if string p_:
+ nbs:=nbs+1;
+ Nombres[nbs]=p_;
+ else:
+ nbd:=nbd+1;
+ Decimaux[nbd]=p_;
+ fi;
+ endfor;
+ enddef;
+
+ RecupererDonnees(#1);
+
+ pair A,B,C,D;
+ A=(0,0);
+ B-A=Unite*(Decimaux[1],0);
+ D-A=Unite*(0,Decimaux[2]);
+ C-D=B-A;
+ fill polygone(A,Unite*(1,0),Unite*(1,1),Unite*(0,1)) withcolor Coul3;
+ drawoptions(withcolor Coul1);
+ pasx=0.1;
+ pasy=0.1;
+ if (Dixiemes and ((Decimaux[1]*10) mod 10=0)):
+ pasy:=1;
+ fi;
+ if (Dixiemes and ((Decimaux[2]*10) mod 10=0)):
+ pasx:=1;
+ fi;
+ for k=0 step pasx until Decimaux[1]:
+ trace (A--(Unite*(0,Decimaux[2]))) shifted(k*Unite*(1,0));
+ endfor;
+ for k=0 step pasy until Decimaux[2]:
+ trace (A--(Unite*(Decimaux[1],0))) shifted(k*Unite*(0,1));
+ endfor;
+ drawoptions(withpen pencircle scaled 1.2 withcolor Coul2);
+ for k=0 upto Decimaux[1]:
+ trace (A--(Unite*(0,Decimaux[2]))) shifted(k*Unite*(1,0));
+ endfor;
+ for k=0 upto Decimaux[2]:
+ trace (A--(Unite*(Decimaux[1],0))) shifted(k*Unite*(0,1));
+ endfor;
+ drawoptions();
+ trace cotation(A,B,-5mm,-3mm,TEX("\num{"&Nombres[1]&"}"));
+ trace cotation(A,D,5mm,5mm,TEX("\num{"&Nombres[2]&"}") rotated -90);
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={string Nombres[];numeric Decimaux[];color Coul[];boolean Dixiemes;Unite=\useKV[VisMulDec]{Unite}*cm;Coul1=\useKV[VisMulDec]{Couleur};Coul2=\useKV[VisMulDec]{CouleurUnite};Coul3=0.7[Coul2,white];Dixiemes=\useKV[VisMulDec]{Dixiemes};}]
+ vardef RecupererDonnees(text t)=
+ nbs:=0;
+ nbd:=0;
+ for p_=t:
+ if string p_:
+ nbs:=nbs+1;
+ Nombres[nbs]=p_;
+ else:
+ nbd:=nbd+1;
+ Decimaux[nbd]=p_;
+ fi;
+ endfor;
+ enddef;
+
+ RecupererDonnees(#1);
+
+ pair A,B,C,D;
+ A=(0,0);
+ B-A=Unite*(Decimaux[1],0);
+ D-A=Unite*(0,Decimaux[2]);
+ C-D=B-A;
+ fill polygone(A,Unite*(1,0),Unite*(1,1),Unite*(0,1)) withcolor Coul3;
+ drawoptions(withcolor Coul1);
+ pasx=0.1;
+ pasy=0.1;
+ if (Dixiemes and ((Decimaux[1]*10) mod 10=0)):
+ pasy:=1;
+ fi;
+ if (Dixiemes and ((Decimaux[2]*10) mod 10=0)):
+ pasx:=1;
+ fi;
+ for k=0 step pasx until Decimaux[1]:
+ trace (A--(Unite*(0,Decimaux[2]))) shifted(k*Unite*(1,0));
+ endfor;
+ for k=0 step pasy until Decimaux[2]:
+ trace (A--(Unite*(Decimaux[1],0))) shifted(k*Unite*(0,1));
+ endfor;
+ drawoptions(withpen pencircle scaled 1.2 withcolor Coul2);
+ for k=0 upto Decimaux[1]:
+ trace (A--(Unite*(0,Decimaux[2]))) shifted(k*Unite*(1,0));
+ endfor;
+ for k=0 upto Decimaux[2]:
+ trace (A--(Unite*(Decimaux[1],0))) shifted(k*Unite*(0,1));
+ endfor;
+ drawoptions();
+ trace cotation(A,B,-5mm,-3mm,LATEX("\num{"&Nombres[1]&"}"));
+ trace cotation(A,D,5mm,5mm,LATEX("\num{"&Nombres[2]&"}") rotated -90);
+ \end{mpost}
+ \fi
+}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/profcollege/ProfCollegeT.sty b/Master/texmf-dist/tex/latex/profcollege/ProfCollegeT.sty
new file mode 100644
index 00000000000..47646fd5a39
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/profcollege/ProfCollegeT.sty
@@ -0,0 +1,974 @@
+% Author : Christophe Poulain
+% licence : Released under the LaTeX Project Public License v1.3c
+% or later, see http://www.latex-project.org/lppl.txtf
+\NeedsTeXFormat{LaTeX2e}%
+\def\filedate{2024/05/15}%
+\let\PfCfiledate\filedate%
+\def\fileversion{0.99-A-e}%
+\let\PfCfileversion\fileversion%
+\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
+
+\RequirePackage{verbatim}%
+
+\RequirePackage{mathtools}%
+
+\newif\if@shellescape \@shellescapetrue%
+\newif\if@amssymb \@amssymbtrue%
+%
+\newif\if@Euro \@Eurotrue
+\newif\if@CFA \@CFAfalse
+\newif\if@CFP \@CFPfalse
+\newif\if@CHF \@CHFfalse
+\newif\if@US \@USfalse
+\newif\if@UK \@UKfalse
+
+\DeclareOption{CFA}{\@Eurofalse\@CFAtrue}%
+\DeclareOption{CFP}{\@Eurofalse\@CFPtrue}%
+\DeclareOption{CHF}{\@Eurofalse\@CHFtrue}%
+\DeclareOption{UK}{\@Eurofalse\@UKtrue}%
+\DeclareOption{US}{\@Eurofalse\@UStrue}%
+%
+\DeclareOption{nonshellescape}{\@shellescapefalse}%
+\DeclareOption{nonamssymb}{\@amssymbfalse}%
+\ProcessOptions\relax%
+
+\if@amssymb%
+\RequirePackage{amssymb}%
+\fi%
+
+% mathématiques
+\RequirePackage{siunitx}%
+\sisetup{%
+ locale=FR,mode = match,
+ propagate-math-font = true,%
+ reset-math-version = false, reset-text-family = false,%
+ reset-text-series = false, reset-text-shape = false,%
+ text-family-to-math = true, text-series-to-math = true,%
+ output-decimal-marker={,},%
+ group-minimum-digits=4,%
+ quantity-product={~}%
+}%
+\DeclareSIUnit{\kmh}{\km\per\hour}%
+\newcommand\speed[1]{\SI{#1}{\kmh}}%
+\newcommand\Speed[1]{\SI[per-mode=symbol]{#1}{\kmh}}%
+
+\DeclareSIUnit{\are}{a}%
+\DeclareSIUnit{\annee}{an}%
+\DeclareSIUnit{\mois}{mois}%
+\DeclareSIUnit{\jour}{j}%
+\DeclareSIUnit{\quintal}{q}%
+\DeclareSIUnit{\octet}{o}%
+\DeclareSIUnit{\fahrenheit}{\text{\textdegree}F}%
+\DeclareSIUnit{\EuRo}{€}%
+\DeclareSIUnit{\Dollar}{\$}%
+\DeclareSIUnit{\LivreSterling}{£}%
+\DeclareSIUnit{\PfCCFA}{F.C.F.A.}%
+\DeclareSIUnit{\PfCCFP}{F.C.F.P.}%
+\DeclareSIUnit{\PfCCHF}{CHF}%
+
+%
+\if@CFA%
+ \DeclareSIUnit{\DeviseDefaut}{F.C.F.A.}%
+\fi%
+\if@CFP%
+ \DeclareSIUnit{\DeviseDefaut}{F.C.F.P.}%
+\fi%
+\if@CHF%
+ \DeclareSIUnit{\DeviseDefaut}{CHF}%
+\fi%
+\if@Euro%
+ \DeclareSIUnit{\DeviseDefaut}{€}%
+\fi%
+\if@US%
+ \DeclareSIUnit{\DeviseDefaut}{\Dollar}%
+\fi%
+\if@UK%
+ \DeclareSIUnit{\DeviseDefaut}{\LivreSterling}%
+\fi%
+
+
+\RequirePackage[table,svgnames]{xcolor}%Gestion des couleurs
+%\PassOptionsToPackage{table,svgnames}{xcolor}
+\RequirePackage{xstring}%Gestion de chaines de caractères
+\RequirePackage{simplekv}%Gestion de paramètres sous forme de clés
+\RequirePackage{ifthen}%
+\RequirePackage{modulus}%Pour certains calculs arithmétiques.
+\RequirePackage{xinttools}%Pour la création dynamique d'un tableau
+
+\RequirePackage{iftex}%
+
+\ifluatex%
+\RequirePackage{luacas}%
+\RequirePackage{luamplib}%
+\mplibtextextlabel{enable}%à partir de la v2.25 de mplibcode
+\everymplib{input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur; beginfig(1);}%
+\everyendmplib{endfig;}%
+\else%
+\if@shellescape%
+\RequirePackage[shellescape,latex]{gmp}%inclusion de figures metapost "à la volée"%
+\else%
+%
+\RequirePackage[latex]{gmp}%inclusion de figures metapost "à la volée"%
+\fi%
+\gmpoptions{everymp={prologues:=3; input PfCLaTeX; input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur;}}%
+\usempxclass{article}%
+\usempxpackage{ProfCollege}%
+\usempxpackage[utf8]{inputenc}%
+\usempxpackage[T1]{fontenc}%
+\usempxpackage{fourier}%
+\usempxpackage[french]{babel}%
+\usempxpackage{pifont}%
+\fi%
+
+\RequirePackage{xintexpr}%
+\RequirePackage{listofitems}%
+\RequirePackage{datatool}%
+\RequirePackage{multido}%
+
+\RequirePackage{xlop}%
+
+\RequirePackage{tcolorbox}%
+\tcbuselibrary{breakable,external,fitting,hooks,magazine,poster,raster,skins,theorems,listings,listingsutf8}
+
+\RequirePackage{tikz}%
+% https://tex.stackexchange.com/questions/349259/curved-arrow-describing-a-step-in-a-equation-derivation
+%https://tex.stackexchange.com/questions/58656/best-way-to-draw-a-chevron-diagram-using-tikz
+\usetikzlibrary{calc,shapes,arrows,tikzmark,chains,positioning,shapes.symbols,babel,fit,backgrounds}%
+
+%\RequirePackage{suffix}%pour la commande étoilée
+
+\RequirePackage{multicol}%
+
+\RequirePackage{hhline}%
+
+\RequirePackage{stackengine}%
+\RequirePackage[thicklines]{cancel}%
+
+\RequirePackage{fontawesome5}%
+\RequirePackage{pifont}%Pour la commande \Autonomie
+\RequirePackage{nicematrix}%
+\NiceMatrixOptions{allow-duplicate-names}%
+
+\let\myoldmulticolumn\multicolumn%
+\AtBeginEnvironment{tabular}{\let\multicolumn\myoldmulticolumn}%
+
+%\RequirePackage{multirow}%
+\RequirePackage{longtable}
+
+\RequirePackage{fmtcount}%
+\FCloadlang{french}%
+
+% https://stackoverflow.com/questions/3391103/how-to-make-the-grayed-round-box-using-tiks
+%\RequirePackage{environ}%
+
+%%%%% Quelques besoins particuliers
+
+\def\bla{}%JCC :) Pour les tests sur arguments vides
+
+% Pb ProfCollege<->Chinois soulev\'e par Denis
+% Solution by egreg :)
+\newcommand\getstrut[1]{%
+ \the\expandafter#1\expanded{\strutbox}%
+}%
+
+% Colorer uniquement la barre de soulignement
+% https://tex.stackexchange.com/questions/9466/color-underline-a-formula/153884
+\def\mathunderline#1#2{\color{#1}\underline{{\color{black}#2}}\color{black}}%
+
+% Ecrire des lignes d'équations
+\catcode`\@=11%
+\def\Eqalign#1{\null\,\vcenter{\openup\jot\m@th\ialign{%
+ \strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil%
+ &&\quad\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$%
+ \hfil\crcr #1\crcr}}\,}%
+\catcode`\@=12%
+
+%%%
+% Commandes "utiles"
+%%%
+\NewDocumentCommand\NumMA{m}{%
+ \xintifboolexpr{#1<0}{%
+ (\num{#1})%
+ }{%
+ \num{#1}%
+ }%
+}%
+
+\NewDocumentCommand\NumS{m}{%
+ \xintifboolexpr{#1==0}{}{\xintifboolexpr{#1>0}{+\num{#1}}{\num{#1}}}
+}%
+
+\newcounter{Marque}
+
+\NewDocumentCommand\AffichageTab{O{x}mmm}{%
+ \ifnum#2=0\relax%
+ \ifnum#3=0\relax%
+ \ifnum#4=0\relax%
+ \else%
+ #4%
+ \fi%
+ \else%
+ #3*#1%
+ \ifnum#4=0\relax%
+ \else%
+ \ifnum#4<0\relax%
+ #4%
+ \else%
+ +#4%
+ \fi%
+ \fi%
+ \fi%
+ \else%
+ #2*#1*#1%
+ \ifnum#3=0\relax%
+ \ifnum#4=0\relax%
+ \else%
+ \ifnum#4<0%
+ #4%
+ \else%
+ +#4%
+ \fi%
+ \fi%
+ \else%
+ \ifnum#3<0%
+ #3*#1%
+ \else%
+ +#3*#1%
+ \fi%
+ \ifnum#4=0\relax%
+ \else%
+ \ifnum#4<0%
+ #4%
+ \else%
+ +#4%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+}%
+%encadrer avec des "sommets arrondis"
+%\newsavebox{\logobox}%
+
+\newcommand\Logo[2]{%
+\setbox1=\hbox{\includegraphics[scale=#2]{#1}}%
+\begin{tikzpicture}%
+\clip[rounded corners=5mm] (0,0) rectangle (\wd1,\ht1);%
+\node[xshift=0.5\wd1, yshift=0.5\ht1, inner xsep=0pt, inner ysep=0pt] (box) {%
+\includegraphics[scale=#2]{#1}%
+};%
+\end{tikzpicture}%
+}%
+
+\newcommand\LogoTW[2]{%
+\setbox1=\hbox{\includegraphics[scale=#2]{#1}}%
+\begin{tikzpicture}%
+ \clip (0,0) circle (4mm);%
+ \draw (0,0) circle (4mm);%
+ \node[xshift=0mm, yshift=0mm, inner xsep=0pt, inner ysep=0pt] (0,0) {%
+ \includegraphics[scale=#2]{#1}%
+ };%
+\end{tikzpicture}%
+}%
+
+\makeatletter
+\def\Suspensionfill{%
+\leavevmode
+\cleaders \hb@xt@\LongBoitePoint{\ldotp}\hfill
+\kern\z@}
+\makeatother
+
+\newlength{\LongBoitePoint}
+
+\NewDocumentCommand\PointsSuspension{m}{%
+ \setbox2=\hbox{\ldotp}%
+ \setlength{\LongBoitePoint}{\wd2}%
+ \ifx\bla#1\bla%
+ \Suspensionfill%
+ \else%
+ \setbox1=\hbox{#1}%
+ \StrLen{#1}[\LongueurPoints]%
+ \ifmmode%
+ \mathinner{%
+ \xintFor* ##1 in {\xintSeq{1}{\LongueurPoints}}\do{%
+ \ldotp%
+ }%
+ }%
+ \else%
+ \xintFor* ##1 in {\xintSeq{1}{\fpeval{round(\wd1/\wd2)}}}\do{%
+ \ldotp%
+ }%
+ \fi%
+ \fi%
+}%
+
+\makeatletter%
+\NewDocumentCommand\Dotfill{}{%
+\leavevmode%
+\cleaders\hb@xt@.44em{\hss\xleaders\hrule width0.33em\hss}\hfill%
+\kern\z@}%
+
+\NewDocumentCommand\PfCdotover{}{\leavevmode\cleaders\hb@xt@ .22em{\hss $\cdot$\hss}\hfill\kern\z@}%
+\makeatother%
+
+\NewDocumentCommand\pointilles{o}{%
+ \IfNoValueTF{#1}{\Dotfill}{\makebox[#1]{\Dotfill}}%
+}%
+
+\NewDocumentCommand\PfCNbLignesRestantes{}{%
+ \edef\measurepage{\dimexpr\pagegoal-\pagetotal\relax}%
+ \xintifboolexpr{\fpeval{\the\measurepage}>\fpeval{\the\textheight}}{%
+ \edef\measurepage{\dimexpr\textheight\relax}%
+ }{}%
+ \xdef\PfCResteLignes{\fpeval{trunc((\the\measurepage)/(\baselineskip),0)}}%
+}%
+
+\NewDocumentCommand\PfCLignesFinales{}{%
+ \PfCNbLignesRestantes%
+ \xintFor* ##1 in {\xintSeq {1}{\PfCResteLignes}}\do{%
+ \pointilles\par%
+ }%
+}%
+
+\NewDocumentCommand\Lignespointilles{m}{%
+ \ifx\bla#1\bla%
+ \par\PfCLignesFinales%
+ \else%
+ \xintifboolexpr{\fpeval{#1}>1}{%
+ \xintFor* ##1 in {\xintSeq {1}{#1}}\do{%
+ \pointilles\par%
+ }%
+ }{}%
+ \fi
+}%
+
+%https://tex.stackexchange.com/questions/128991/frac-or-inference-rule-with-dotted-line
+\newcommand\PfCfrac[2]{%
+\ooalign{$\genfrac{}{}{0pt}{0}{#1}{#2}$\cr\PfCdotover\cr}%
+}%
+
+\NewDocumentCommand\MultiCol{O{}+m+m}{%
+ \setsepchar[*]{/}%
+ \readlist*\ListeNombreCol{#2}%
+ \setsepchar[*]{§}%
+ \readlist*\ListeContenuCol{#3}%
+ \xintFor* ##1 in {\xintSeq{1}{\ListeNombreCollen}}\do{%
+ \itemtomacro\ListeContenuCol[##1]\PfMTexte
+ \begin{minipage}[#1]{\ListeNombreCol[##1]\linewidth}%
+ \PfMTexte
+ \end{minipage}%
+ \xintifboolexpr{##1<\ListeNombreCollen}{\hfill\vrule width \columnseprule\hfill}{}%
+ }%
+}%
+
+\newcount\PfCrappeljour%
+
+\newcommand\Demain{%
+ \PfCrappeljour=\day\relax%
+ \advance\day by 1\relax%
+ \ifnum\month=1\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=2\relax%
+ \ifnum\day>28\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=3\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=4\relax%
+ \ifnum\day>30\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=5\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=6\relax%
+ \ifnum\day>30\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=7\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=8\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=9\relax%
+ \ifnum\day>30\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=10\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=11\relax%
+ \ifnum\day>30\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \ifnum\month=12\relax%
+ \ifnum\day>31\relax%
+ \day=\numexpr1\relax%
+ \advance\month by 1\relax%
+ \today\relax%
+ \advance\month by -1\relax%
+ \else%
+ \today\relax%
+ \fi%
+ \fi%
+ \day=\the\PfCrappeljour\relax%
+}
+
+\NewDocumentCommand\MelangeLettres{smm}{%
+ % #2 Nombre d'éléments à conserver
+ % #3 Nom de la commande qui reçoit la liste.
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeInter{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}%
+ \xdef\faa{}% Liste construite
+ \xdef\fii{}% Liste détruite
+ \IfBooleanTF{#1}{%
+ \xintFor* ##1 in {\xintSeq{1}{#2}}\do{%
+ \xintifboolexpr{\ListeInterlen>1}{%
+ \xdef\Alea{\fpeval{randint(\ListeInterlen)}}%
+ \xdef\faa{\faa\ListeInter[\Alea],}%
+ \xdef\fii{}%
+ \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{%
+ \xintifboolexpr{##2 == \Alea}{%
+ }{%
+ \xdef\fii{\fii \ListeInter[##2],}%
+ }%
+ }%
+ }{%
+ \xdef\faa{\faa\ListeInter[1]}%
+ }%
+ \readlist*\ListeInter{\fii}%
+ }%
+ }{%
+ \xintFor* ##1 in {\xintSeq{1}{#2}}\do{%
+ \xintifboolexpr{\ListeInterlen>1}{%
+ \xdef\Alea{\fpeval{randint(\ListeInterlen)}}%
+ \xdef\faa{\faa\ListeInter[\Alea]}%
+ \xdef\fii{}%
+ \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{%
+ \xintifboolexpr{##2 == \Alea}{%
+ }{%
+ \xdef\fii{\fii \ListeInter[##2],}%
+ }%
+ }%
+ }{%
+ \xdef\faa{\faa\ListeInter[1]}%
+ }%
+ \readlist*\ListeInter{\fii}%
+ }%
+ }%
+ \xdef#3{\faa}%
+}%
+
+\NewDocumentCommand\MelangeListe{smm}{%
+ \IfBooleanTF{#1}{%
+ %Si on cherche un seul élément, on peut l'utiliser directement
+ \MelangeListeOne{#2}{#3}%
+ }{%
+ \MelangeListeNoOne{#2}{#3}%
+ }%
+}
+
+\NewDocumentCommand\MelangeListeOne{mm}{%
+ % #1 Liste à mélanger
+ % #2 Nombre d'éléments à conserver
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeInter{#1}%
+ \xdef\faa{}% Liste construite
+ \xdef\fii{}% Liste détruite
+ % on crée les #2 premieres solutions.
+ \xintFor* ##1 in {\xintSeq{1}{#2}}\do{%
+ \xintifboolexpr{\ListeInterlen>1}{%
+ \xdef\Alea{\fpeval{randint(\ListeInterlen)}}%
+ \ifnum\fpeval{##1}=1\relax
+ \xdef\faa{\ListeInter[\Alea]}%
+ \else
+ \xdef\faa{\faa,\ListeInter[\Alea]}%
+ \fi
+ \xdef\fii{}%
+ \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{%
+ \xintifboolexpr{##2 == \Alea}{%
+ }{%
+ \xdef\fii{\fii \ListeInter[##2],}%
+ }%
+ }%
+ }{%
+ \xdef\faa{\faa,\ListeInter[1]}%
+ }%
+ \readlist*\ListeInter{\fii}%
+ }%
+ \reademptyitems%
+}%
+
+\NewDocumentCommand\MelangeListeNoOne{mm}{%
+ % #1 Liste à mélanger
+ % #2 Nombre d'éléments à conserver
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeInter{#1}%
+ \xdef\faa{}% Liste construite
+ \xdef\fii{}% Liste détruite
+ % on crée les #2 premieres solutions.
+ \xintFor* ##1 in {\xintSeq{1}{#2}}\do{%
+ \xintifboolexpr{\ListeInterlen>1}{%
+ \xdef\Alea{\fpeval{randint(\ListeInterlen)}}%
+ \xdef\faa{\faa \ListeInter[\Alea],}%
+ \xdef\fii{}%
+ \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{%
+ \xintifboolexpr{##2 == \Alea}{%
+ }{%
+ \xdef\fii{\fii \ListeInter[##2],}%
+ }%
+ }%
+ }{%
+ \xdef\faa{\faa \ListeInter[1]}%
+ }%
+ \readlist*\ListeInter{\fii}%
+ }%
+ \reademptyitems%
+}%
+
+\newcommand\MelangeListeNewTwo[2]{%
+ % #1 Liste à mélanger
+ % #2 Nombre d'éléments à conserver
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeInter{#1}%
+% \xdef\faa{}% Liste construite
+ \xdef\fii{}% Liste détruite
+ % on crée les #2 premieres solutions.
+ \xintFor* ##1 in {\xintSeq{1}{#2}}\do{%
+ \xintifboolexpr{\ListeInterlen>1}{%
+ \xdef\Alea{\fpeval{randint(\ListeInterlen)}}%
+ \ifnum\fpeval{##1}=1\relax
+ \xdef\faa{\ListeInter[\Alea]}%
+ \else
+ \xdef\faa{\faa,\ListeInter[\Alea]}%
+ \fi
+ \xdef\fii{}%
+ \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{%
+ \xintifboolexpr{##2 == \Alea}{%
+ }{%
+ \xdef\fii{\fii \ListeInter[##2],}%
+ }%
+ }%
+ }{%
+ \xdef\faa{\faa \ListeInter[1]}%
+ }%
+ \readlist*\ListeInter{\fii}%
+ }%
+ \reademptyitems%
+}%
+
+%%%
+% Smiley
+%%% https://tex.stackexchange.com/questions/3695/smileys-in-latex/227226
+\tikzset{face/.style={shape=circle,minimum size=4ex,shading=radial,outer sep=0pt, inner color=white!50!yellow,outer color= yellow!70!orange}}
+
+\newcommand\emoticon[2][]{%
+\scalebox{.5}{\begin{tikzpicture}
+\node[face,#1,draw,thick] (emoticon) {};
+%% The eyes are fixed.
+\draw[fill=white] (-1ex,0ex) ..controls (-0.5ex,0.2ex)and(0.5ex,0.2ex)..(1ex,0.0ex) ..controls ( 1.5ex,1.5ex)and( 0.2ex,1.7ex)..(0ex,0.4ex) ..controls (-0.2ex,1.7ex)and(-1.5ex,1.5ex)..(-1ex,0ex)--cycle;
+#2%
+\end{tikzpicture}}%
+}
+
+\newcommand\pupils{
+%% standard pupils
+\fill[shift={(0.5ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);}
+
+\def\RKsmallsmile{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex);
+}%\emoticon
+}
+
+\def\RKsmile{%
+\emoticon{%
+\pupils
+\draw[thick] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKbigsmile{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-1.5ex,-0.5ex)..controls (-0.7ex,-1.7ex)and(0.7ex,-1.7ex)..(1.5ex,-0.5ex);
+}%\emoticon
+}
+
+\def\RKsad{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKneutral{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-0.5ex,-1ex)--(0.5ex,-1ex);
+}%\emoticon
+}
+
+\def\RKconfused{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-1ex,-0.75ex)--(1ex,-1.25ex);
+}%\emoticon
+}
+
+\def\RKsexy{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[very thick,red,line cap=round] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+%% eyelashes
+\draw (0.60ex,1.20ex)--(0.60ex,1.60ex)
+ (0.85ex,1.25ex)--(0.95ex,1.45ex)
+ (1.00ex,1.00ex)--(1.20ex,1.10ex)
+ (0.35ex,1.15ex)--(0.25ex,1.35ex)
+ (-0.60ex,1.20ex)--(-0.60ex,1.60ex)
+ (-0.85ex,1.25ex)--(-0.95ex,1.45ex)
+ (-1.00ex,1.00ex)--(-1.20ex,1.10ex)
+ (-0.35ex,1.15ex)--(-0.25ex,1.35ex);
+}%\emoticon
+}
+
+\def\RKangry{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);
+%% eyebrows
+\draw[thick] (0.2ex,1.15ex)--(0.5ex,1.6ex)(-0.2ex,1.15ex)--(-0.5ex,1.6ex);
+}%\emoticon
+}
+
+\def\RKlookup{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,1.05ex)},rotate= 80] (0,0) ellipse (0.2ex and 0.2ex);
+\fill[shift={(-0.5ex,1.05ex)},rotate=100] (0,0) ellipse (0.2ex and 0.2ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKlookdown{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.3ex)},rotate= 80] (0,0) ellipse (0.2ex and 0.2ex);
+\fill[shift={(-0.5ex,0.3ex)},rotate=100] (0,0) ellipse (0.2ex and 0.2ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKlookleft{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.25ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.95ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKlookright{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.95ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.25ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1.0ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKblush{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex);
+%% blush
+\shade[shading=radial,inner color=white!50!red,outer color= yellow!80!orange] ( 1ex,-0.5ex) circle (0.4ex);
+\shade[shading=radial,inner color=white!50!red,outer color= yellow!80!orange] (-1ex,-0.5ex) circle (0.4ex);
+}%\emoticon
+}
+
+\def\RKalmostcrying{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=105] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate= 75] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls
+(-0.5ex,-0.8ex)and(0.5ex,-0.8ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKmartian{%
+\emoticon[inner color=white!50!green,outer color=green!70!red]{%
+\pupils
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls
+(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKdevilish{%
+\raisebox{-0.6ex}[0ex][0ex]{%
+\emoticon[inner color=white!50!red,outer color= red!70!red!90!black]{%
+\pupils
+%% mouth
+\draw[thick,line cap=round] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+%% tail
+\draw[line width=0.45ex,-stealth,black] (emoticon.330)--++(330:0.01ex)..controls (3ex,-3ex)and(3.5ex,1ex)..(4.25ex,-3ex);
+\draw[line width=0.27ex,-stealth,red!90!black] (emoticon.330)--++(330:0.01ex)..controls (3ex,-3ex)and(3.5ex,1ex)..(4.22ex,-2.8ex);
+%% horns
+\draw[fill] (emoticon.80)..controls ( 0.6ex,2.4ex)..( 1ex,2.5ex)..controls ( 0.8ex,2.3ex)..(emoticon.70);
+\draw[fill] (emoticon.100)..controls (-0.6ex,2.4ex)..(-1ex,2.5ex)..controls (-0.8ex,2.3ex)..(emoticon.110);
+\draw[thick] (0,0) circle (2ex);
+}%\emoticon
+}%\raisebox
+}%
+
+\setsepchar[*]{,*/}\ignoreemptyitems
+\readlist*\ListeMateriaux{aluminium/'/2.7,chêne/e~/0.69,bouleau/e~/0.65,sapin/e~/0.45,polystyrène/e~/1.04,porcelaine/la/2.5,acier/'/7.85,cuivre/e~/8.92,fer/e~/7.86,or/'/19.3,argent/'/10.5,bronze/e~/8.4,plomb/e~/11.35,marbre/e~/2.75,laiton/e~/7.3,titane/e~/4.5,PVC/e~/1.38}
+\setsepchar{,}\reademptyitems
+
+%Internationalisation
+\def\PfCSymbolTimes{\times}%
+\def\PfCSymbolDiv{\div}%
+
+\input{PfCVisualisationMulDeci}
+\input{PfCArbreChiffre}
+\input{PfCAssemblagesSolides}
+\input{PfCTicketCaisse}
+\input{PfCRecyclage}
+\input{PfCDontCountDots}
+\input{PfCConversion}
+\input{PfCCritere}
+\input{PfCLego}
+\input{PfCJeton}
+\input{PfCDessinAlgo}
+\input{PfCBonbon}
+\input{PfCPattern}
+\input{PfCNumerationsAnciennes}
+\input{PfCSerpent}
+\input{PfCFractionNombre}
+\input{PfCAllumettes}
+\input{PfCFractionAireCarre.tex}
+\input{PfCMulJal}
+\input{PfCCibleQOp}
+\input{PfCFubuki}
+\input{PfCMulJap}
+\input{PfCCryptarithme}
+\input{PfCDefiCalc}
+\input{PfCMulArt}
+\input{PfCGrimuku}
+\input{PfCHorloge}
+\input{PfCCible}
+\input{PfCMulPiecesPuzzle}
+\input{PfCPyraVoca}
+\input{PfCAutomatismes}
+\input{PfCNumberHive}
+\input{PfCPatronPaves}
+\input{PfCEratosthene}
+\input{PfCDobble}
+\input{PfCPavage}
+\input{PfCNonogramme}
+\input{PfCJeuRangement}
+\input{PfCTrio}
+\input{PfCCalculsFractions}
+\input{PfCDecDeci}
+\input{PfCKakurasu}
+\input{PfCMidpoint}
+\input{PfCGrades}
+\input{PfCSquaro}
+\input{PfCGaram}
+\input{PfCFutoshiki}
+\input{PfCRondeInfernale}
+\input{PfCHiddenMessage}
+\input{PfCPuzzleSommePyramide}
+\input{PfCCalisson}
+\input{PfCTectonic}
+\input{PfCEnigmeAire}
+\input{PfCBarresCalculs}
+\input{PfCSolides}
+\input{PfCVueCubes}
+\input{PfCRLE}
+\input{PfCEngrenagesBase}
+\input{PfCTortueBase}
+\input{PfCCompteBon}
+\input{PfCNombreAstral}
+\input{PfCMentalo}
+\input{PfCCalculsCroises}
+\input{PfCShikaku}
+\input{PfCKakuro}
+\input{PfCKenKen}
+\input{PfCPixelArt}
+\input{PfCYohaku}
+\input{PfCRose}
+\input{PfCPuissanceQuatre}
+\input{PfCBillard}
+\input{PfCRepresenterEntier}
+\input{PfCCAN}
+\input{PfCFrise}
+\input{PfCGeometrie}
+\input{PfCEnquete}
+\input{PfCModeleBarre}
+\input{PfCFicheMemo}
+\input{PfCOperationsTrou}
+\input{PfCCartographie}
+\input{PfCReseauxSociaux}
+\input{PfCBonSortie}
+\input{PfCEcritureLettres}
+\input{PfCDecompFracDeci}
+\input{PfCPyramideCalculs}
+\input{PfCTablesOperations}
+\input{PfCDefiTables}
+\input{PfCRangementNombres}
+\input{PfCMotsCodes}
+\input{PfCLabyrintheJeu}
+\input{PfCTriominos}
+\input{PfCLabyrintheNombre}
+\input{PfCMotsCroises}
+\input{PfCMotsEmpiles}
+\input{PfCColorilude}
+\input{PfCMosaique}
+\input{PfCQuiSuisJe}
+\input{PfCDessinGradue}
+\input{PfCAutonomie}
+\input{PfCCalculatrice}
+\input{PfCQuestionsFlash}
+\input{PfCRapido}
+\input{PfCRepresenterFraction}
+\input{PfCQuestionsRelier}
+\input{PfCEcrireunQCM}
+\input{PfCSommeAngles}
+\input{PfCPythagore}
+\input{PfCDistributivite}
+\input{PfCFactorisation}
+\input{PfCDecomposerNombrePremier}
+\input{PfCSimplifierFraction}
+\input{PfCThales}
+\input{PfCTrigonometrie}
+\input{PfCStatistiques}
+\input{PfCDiagrammeRadar}
+\input{PfCBarreNiveaux}
+\input{PfCResoudreEquation}
+\input{PfCPropor}
+\input{PfCPourcentage}
+\input{PfCDessinerRatio}
+\input{PfCCartesMentales}
+\input{PfCProprietesDroites}
+\input{PfCFonctionAffine}
+\input{PfCNotionFonction}
+\input{PfCRepresentationGraphique}
+\input{PfCRappelsFormules}
+\input{PfCProbabilites}
+\input{PfCReperage}
+
+%%%
+% Puissances
+%%%
+\newcommand\Puissances[2]{%
+ \ensuremath{%
+ \xintifboolexpr{#2==0}{1}{\xintifboolexpr{#2>0}{\xdef\TotalP{\fpeval{#2-1}}#1\xintFor* ##1 in{\xintSeq{1}{\TotalP}}\do{\times#1}}{\xdef\TotalP{\fpeval{-#2-1}}\frac{1}{#1\xintFor* ##1 in{\xintSeq{1}{\TotalP}}\do{\times#1}}}}%
+ }%
+}%
+
+\input{PfCEcritureUnites}
+\input{PfCTableauxUnites}
+\input{PfCCartesJeux}
+\input{PfCRepresenterTableur}
+\input{PfCDomino}
+\input{PfCProgrammeCalcul}
+\input{PfCPapiers}
+\input{PfCScratch} \ No newline at end of file