summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/profcollege
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-15 20:43:20 +0000
committerKarl Berry <karl@freefriends.org>2023-10-15 20:43:20 +0000
commitbac6720f2dc3e26cb100b8b9802d17d6f74e4236 (patch)
tree26f84d04fd6fd60e9ccb30e5dcddb4b86e8f58ea /Master/texmf-dist/tex/latex/profcollege
parent0132bd50a072b9fbaab24b792dba4a5d6bc82893 (diff)
profcollege (14oct23)
git-svn-id: svn://tug.org/texlive/trunk@68558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/profcollege')
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex1
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex37
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex40
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex6
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCLego.tex143
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex8
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex10
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex198
-rw-r--r--Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty6
9 files changed, 418 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex b/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
index 289cfeb33bc..b11a0c5289b 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCCartesJeux.tex
@@ -623,6 +623,7 @@
\end{MyboxTrivial}%
}{}%
}%
+ \setlength{\tabcolsep}{4\tabcolsep}%
}%
\NewDocumentCommand\CartesTrivialPersoold{}{%
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex b/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex
index 253f12533d5..41039e7ab6d 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex
@@ -704,6 +704,43 @@
}
}
+\NewDocumentCommand\PfCSommeChiffres{m}{%
+ \xdef\PfCSMSomme{0}%
+ \ensuremath{
+ \StrLen{#1}[\PfCSMLongueur]
+ \xintFor* ##1 in{\xintSeq{1}{\PfCSMLongueur}}\do{
+ \StrChar{#1}{##1}[\PfCSMChiffre]
+ \xdef\PfCSMSomme{\fpeval{\PfCSMSomme+\PfCSMChiffre}}
+ \num{\PfCSMChiffre}\xintifForLast{=}{+}
+ }
+ \num{\fpeval{\PfCSMSomme}}
+ }%
+}%
+
+\newcommand\ListeTousFacteursPremier[1]{%
+ %#1 : le nombre entier \`a tester
+ \ensuremath{%
+ \newcount\anpl\newcount\bnpl\newcount\cnpl%
+ \newcount\pilebl%
+ \anpl=#1\relax%
+ \bnpl=2\relax%
+ \pilebl=2\relax%
+ \xdef\PfCPileFacteurs{}%
+ \whiledo{\the\anpl > 1}{%
+ \modulo{\the\anpl}{\the\bnpl}
+ \ifnum\remainder=0\relax
+ \cnpl=\numexpr\anpl/\bnpl\relax
+ \xdef\PfCPileFacteurs{\PfCPileFacteurs\the\bnpl}%
+% \num{\the\bnpl}\ifnum\anpl>\bnpl\times\fi%
+ \anpl=\cnpl\relax
+ \else%
+ \bnpl=\numexpr\bnpl+1\relax%
+ \pilebl=\bnpl\relax%
+ \fi%
+ }%
+ }%
+}%
+
\newcommand\ListeDiviseur[1]{%#1 : le nombre entier \`a tester
\newcount\anp\newcount\bnp%
\anp=#1%
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex b/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex
new file mode 100644
index 00000000000..e3012070f27
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCJeton.tex
@@ -0,0 +1,40 @@
+%%%
+% Jeton
+%%%
+\setKVdefault[Jeton]{Diametre=5mm,Impression=false}%
+
+\NewDocumentCommand\Jeton{om}{%
+ \useKVdefault[Jeton]%
+ \setKV[Jeton]{#1}%
+ \ifluatex%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\PfCListeJeton{#2}%
+ \foreachitem\compteur\in\PfCListeJeton{\BuildJeton{\PfCListeJeton[\compteurcnt]}}%
+ \reademptyitems%
+ \fi%
+}%
+
+\NewDocumentCommand\BuildJeton{m}{%
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}
+ input fiziko;
+
+ boolean Impression;
+ Impression=\useKV[Jeton]{Impression};
+ numeric Diametre;
+ Diametre=\useKV[Jeton]{Diametre};
+ color Fond;
+ Fond= if Impression:white else:BurlyWood fi;
+
+ path p;
+ p:=fullcircle scaled Diametre;
+ fill p withcolor Fond;
+ JetonAngle:=45+uniformdeviate(30);
+ Intensite:=0.3+uniformdeviate(2)/10;
+ draw woodenThing(p,JetonAngle) withcolor Intensite*Fond;
+ draw p;
+ label(TEX("\bfseries "&decimal(#1)),(0,0));
+ \end{mplibcode}
+ \fi%
+}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex b/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex
index 9f2d7bf47a1..1f8d7f3f490 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCKakuro.tex
@@ -22,15 +22,15 @@
\readlist*\ListeKakuroNombres{\ListeAvantNombres}%
\savecomparemode%
\comparestrict%
- \begin{NiceTabular}{*{\useKV[Kakuro]{TLargeur}}{m{\useKV[Kakuro]{Largeur}}}}[hvlines]
+ \begin{NiceTabular}{*{\useKV[Kakuro]{TLargeur}}{m{\useKV[Kakuro]{Largeur}}}}[hvlines]%
\xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Kakuro]{THauteur}-1}}}\do{%
\xintFor* ##2 in {\xintSeq{1}{\useKV[Kakuro]{TLargeur}}}\do{%
\rule{0pt}{\PfCKakuro}%
- \StrCompare{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}{*}[\PfCTestBlack]
+ \StrCompare{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}{*}[\PfCTestBlack]%
\xintifboolexpr{\PfCTestBlack==0}{%
\Block[fill=black]{1-1}{}%
}{%
- \xintifboolexpr{\listlen\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2}]==2}{
+ \xintifboolexpr{\listlen\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2}]==2}{%
\Block[fill=\useKV[Kakuro]{CouleurCase}]{1-1}{\diagbox{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},2]}}%
}{%
\Block{1-1}{\ifboolKV[Kakuro]{Solution}{\Large\color{\useKV[Kakuro]{CouleurSolution}}\num{\ListeCasesKK[\fpeval{\useKV[Kakuro]{TLargeur}*##1+##2},1]}}{%
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex b/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex
new file mode 100644
index 00000000000..fb18636d628
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCLego.tex
@@ -0,0 +1,143 @@
+%%%
+% Lego
+%%%
+\setKVdefault[Lego]{Couleur=LightSteelBlue,Unite=8,Diviseur=2,Perso=false,Plaque=false}%
+\defKV[Lego]{ListePerso=\setKV[Lego]{Perso}\xdef\PfCFooLegoListePerso{#1}}%
+
+\NewDocumentCommand\ChoixCouleur{m}{%
+ \xdef\ListeCouleurs{Maroon,PeachPuff,Yellow,red,Gray,Crimson,Cornsilk,Purple,Cornsilk,Salmon}%
+ \readlist*\PfCListeCouleurs{\ListeCouleurs}%
+ \xintifboolexpr{\fpeval{#1+1}>\PfCListeCouleurslen}{\textbf{! Vous demandez trop de couleurs !}}{%
+ \MelangeListe{1,2,3,4,5,6,7,8,9,10}{\fpeval{#1+1}}%
+ \setsepchar{,}\ignoreemptyitems%
+ \readlist*\ListeRotation{\faa}%
+ \xintFor* ##2 in{\xintSeq{1}{#1}}\do{%
+ \xdef\RetiensCouleur{\ListeRotation[##2]}%
+ \xintifForFirst{\xdef\FooCouleur{\PfCListeCouleurs[\RetiensCouleur]}}{\xdef\FooCouleur{\FooCouleur,\PfCListeCouleurs[\RetiensCouleur]}}%
+ }%
+ }%
+}%
+
+\NewDocumentCommand\Lego{o}{%
+ \useKVdefault[Lego]%
+ \setKV[Lego]{#1}%
+ \xdef\PfCNbCouleurs{\fpeval{floor(\useKV[Lego]{Unite}/\useKV[Lego]{Diviseur})}}%
+ \ChoixCouleur{\PfCNbCouleurs}%
+ \ifboolKV[Lego]{Perso}{%
+ \BuildBarreLego{\FooCouleur}{\PfCFooLegoListePerso}%
+ }{%
+ \BuildBarreLego{\FooCouleur}{}%
+ }%
+}%
+
+\NewDocumentCommand\BuildBarreLego{mm}{%
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}
+ boolean Plaque;
+ Plaque=\useKV[Lego]{Plaque};
+
+ input PfCLego;
+ %
+ vardef ChoixCouleur(text t)=
+ color Brique[];
+ nbc:=0;
+ for p_=t:
+ Brique[nbc]=p_;
+ nbc:=nbc+1;
+ endfor;
+ enddef;
+ %
+ vardef ListePerso(text t)=
+ nbperso=0;
+ for p_=t:
+ Diviseurs[nbperso]=p_;
+ nbperso:=nbperso+1;
+ endfor;
+ enddef;
+ %
+ ChoixCouleur(#1);
+ %
+ Longueur=\useKV[Lego]{Unite};
+ Largeur=2;
+ Diviseur=\useKV[Lego]{Diviseur};
+ color BriqueUnite;
+ BriqueUnite=\useKV[Lego]{Couleur};
+ boolean Perso;
+ Perso=\useKV[Lego]{Perso};
+ %
+ euler(-45,0,0);
+ if Plaque:
+ lego_height_old:=lego_height;
+ lego_height:=lego_thickness;
+ TR:=(0,1,0);
+ Lego_box(2*Longueur,4*Largeur,Gold);
+ TR:=(0,0,0);
+ lego_height:=lego_height_old;
+ fi;
+ Lego_box(Longueur,Largeur,BriqueUnite);
+ if Perso:
+ Somme=0;
+ ListePerso(#2);
+ for k=0 upto (nbperso-1):
+ TR:=(0.5*(Longueur-Diviseurs[k]-Somme),2,0);
+ Lego_box(Diviseurs[k],2,Brique[k]);
+ Somme:=Somme+2*Diviseurs[k];
+ endfor;
+ else:
+ for k=0 upto ((Longueur div Diviseur)-1):
+ TR:=(0.5*(Longueur-Diviseur)-k*Diviseur,2,0);
+ Lego_box(Diviseur,2,Brique[k]);
+ endfor;
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}
+ input PfCLego;
+ %
+ vardef ChoixCouleur(text t)=
+ color Brique[];
+ nbc:=0;
+ for p_=t:
+ Brique[nbc]=p_;
+ nbc:=nbc+1;
+ endfor;
+ enddef;
+ %
+ vardef ListePerso(text t)=
+ nbperso=0;
+ for p_=t:
+ Diviseurs[nbperso]=p_;
+ nbperso:=nbperso+1;
+ endfor;
+ enddef;
+ %
+ ChoixCouleur(#1);
+ %
+ Longueur=\useKV[Lego]{Unite};
+ Largeur=2;
+ Diviseur=\useKV[Lego]{Diviseur};
+ color BriqueUnite;
+ BriqueUnite=\useKV[Lego]{Couleur};
+ boolean Perso;
+ Perso=\useKV[Lego]{Perso};
+ %
+ euler(-45,0,0);
+ Lego_box(Longueur,Largeur,BriqueUnite);
+ if Perso:
+ Somme=0;
+ ListePerso(#2);
+ for k=0 upto (nbperso-1):
+ TR:=(0.5*(Longueur-Diviseurs[k]-Somme),2,0);
+ Lego_box(Diviseurs[k],2,Brique[k]);
+ Somme:=Somme+2*Diviseurs[k];
+ endfor;
+ else:
+ for k=0 upto ((Longueur div Diviseur)-1):
+ TR:=(0.5*(Longueur-Diviseur)-k*Diviseur,2,0);
+ Lego_box(Diviseur,2,Brique[k]);
+ endfor;
+ fi;
+ \end{mpost}
+ \fi%
+}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex b/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex
index 634baa969e7..1c42d433a6a 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCMotsEmpiles.tex
@@ -5,7 +5,7 @@
\newcounter{CompteurMotEmpile}
-\newcommand\MotsEmpiles[2][]{%
+\NewDocumentCommand\MotsEmpiles{om}{%
\useKVdefault[ClesMotEmpile]%
\setKV[ClesMotEmpile]{#1}%
\setcounter{CompteurMotEmpile}{0}%
@@ -18,17 +18,17 @@
\xintifboolexpr{\ListeMotsEmpilesMax<\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}{\xdef\ListeMotsEmpilesMax{\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}}{}%
}%
\begin{NiceTabular}{c|*{\fpeval{\ListeMotsEmpilesMax}}{m{10pt}}}%
- \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&$\downarrow$\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
+ \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&\Block{}{$\downarrow$}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpileslen}}}\do{%
\rule[-1.2ex]{0pt}{3.8ex}\stepcounter{CompteurMotEmpile}\Alph{CompteurMotEmpile}&\Block{1-\fpeval{\ListeMotsEmpiles[##1,1]}}{}\xintFor* ##2 in {\xintSeq {1}{\fpeval{\ListeMotsEmpiles[##1,1]}}}\do{%
&
}%
\StrLen{\ListeMotsEmpiles[##1,2]}[\LongueurMot]%
\xintFor* ##3 in {\xintSeq {1}{\fpeval{\LongueurMot}}}\do{%
- \xintifForFirst{}{&}\Block[draw=black]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\centering\arraybackslash\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%%
+ \xintifForFirst{}{&}\Block[draw=black,b]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%
}%
\\
}%
- \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});
+ \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});%
\end{NiceTabular}%
}% \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex b/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex
index fd505aa3e0f..22ea0239356 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCRepresenterTableur.tex
@@ -28,7 +28,7 @@
\newlength\PfCTableurLargeurUn%
\newlength\PfCTableurLargeur%
-\RequirePackage{printlen}
+%\RequirePackage{printlen}
\newenvironment{Tableur}[1][]{%
\useKVdefault[Tableur]%
@@ -36,8 +36,8 @@
\setlength{\PfCTableurLargeurUn}{\fpeval{\useKV[Tableur]{LargeurUn}}pt}%
\setlength{\PfCTableurLargeur}{\fpeval{\useKV[Tableur]{Largeur}}pt}%
\ttfamily%
- \newcolumntype{Y}{>{\centering\arraybackslash}m{\PfCTableurLargeurUn}}%
- \newcolumntype{X}{>{\centering\arraybackslash}m{\PfCTableurLargeur}}%
+ \newcolumntype{A}{>{\centering\arraybackslash}m{\PfCTableurLargeurUn}}%
+ \newcolumntype{B}{>{\centering\arraybackslash}m{\PfCTableurLargeur}}%
\setlength{\PfCLongInter}{-40pt+\fpeval{\useKV[Tableur]{LargeurUn}}pt+\fpeval{(\useKV[Tableur]{Colonnes}-2)*\useKV[Tableur]{Largeur}}pt+\fpeval{2*\useKV[Tableur]{Colonnes}-6}\tabcolsep+\fpeval{\useKV[Tableur]{Colonnes}+2}\arrayrulewidth}%
\ifboolKV[Tableur]{Bandeau}{%
\begin{NiceTabular}{p{\PfCTableurLargeur}p{10pt}p{50pt}p{\PfCLongInter}}
@@ -56,7 +56,7 @@
\ifboolKV[Tableur]{Selection}{%
\xintifboolexpr{\cntlin>\useKV[Tableur]{Ligne} && \cntlin<\fpeval{\useKV[Tableur]{Ligne}+\useKV[Tableur]{PasL}+1}}{\textcolor{white}{\number\numexpr\cntlin-1\relax}}{\number\numexpr\cntlin-1\relax}%
}{\number\numexpr\cntlin-1\relax}\fi}%
- wc{20pt}Y*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{X}}[hvlines]%
+ wc{20pt}A*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{B}}[hvlines]%
\CodeBefore
% on colorie en gris toute la première ligne
\tikz\fill[gray!15](row-1-|col-1) rectangle (row-2-|last);%
@@ -101,4 +101,4 @@
\repeat%
\addtot@b{\\&}%
\collectcp@body}{\the\t@b}%
-\makeatother \ No newline at end of file
+\makeatother
diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex b/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex
index 0c870c52076..84d64c3f099 100644
--- a/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex
+++ b/Master/texmf-dist/tex/latex/profcollege/PfCTableauxUnites.tex
@@ -1,7 +1,7 @@
%%%
% Tableaux d'unit\'es
%%%
-\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false,CouleurGN=white,CadreGN=black,Tabcolsep=0.275\tabcolsep,Exterieur=false}%
+\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,CarreA=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,CubeA=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false,CouleurGN=white,CadreGN=black,Tabcolsep=0.275\tabcolsep,Exterieur=false}%
\defKV[ClesTableaux]{ColonnesSup=\setKV[ClesTableaux]{Exterieur}}%
%
\newcommand\PfCTBstrut{\rule[-1.2ex]{0pt}{3.8ex}}% Top and Bottom strut
@@ -9,23 +9,23 @@
\newcommand\PfCBstrut{\rule[-1.2ex]{0pt}{0ex}}% Bottom strut
\newlength\PfCTableauPuissances%
-\newlength\PfCCubeTabColSep
+\newlength\PfCCubeTabColSep%
-\def\PfCCG{centaines de milliards}
-\def\PfCDG{dizaines de milliards}
-\def\PfCUG{unit\'es de milliards}
-\def\PfCCM{centaines de millions}
-\def\PfCDM{dizaines de millions}
-\def\PfCUM{unit\'es de millions}
-\def\PfCCm{centaines de milliers}
-\def\PfCDm{dizaines de milliers}
-\def\PfCUm{unit\'es de milliers}
-\def\PfCC{centaines}
-\def\PfCD{dizaines}
-\def\PfCU{unit\'es}
-\def\PfCd{dixi\`emes}
-\def\PfCc{centi\'emes}
-\def\PfCm{milli\`emes}
+\def\PfCCG{centaines de milliards}%
+\def\PfCDG{dizaines de milliards}%
+\def\PfCUG{unit\'es de milliards}%
+\def\PfCCM{centaines de millions}%
+\def\PfCDM{dizaines de millions}%
+\def\PfCUM{unit\'es de millions}%
+\def\PfCCm{centaines de milliers}%
+\def\PfCDm{dizaines de milliers}%
+\def\PfCUm{unit\'es de milliers}%
+\def\PfCC{centaines}%
+\def\PfCD{dizaines}%
+\def\PfCU{unit\'es}%
+\def\PfCd{dixi\`emes}%
+\def\PfCc{centi\'emes}%
+\def\PfCm{milli\`emes}%
\newcommand\Tableau[2][]{%
\useKVdefault[ClesTableaux]%
@@ -43,6 +43,10 @@
\xdef\PfCTableauUnite{\cubic\meter}%
\xdef\PfCCoefConversion{1000}%
}{}%
+ \ifboolKV[ClesTableaux]{CubeA}{%
+ \xdef\PfCTableauUnite{\cubic\meter}%
+ \xdef\PfCCoefConversion{1000}%
+ }{}%
\ifboolKV[ClesTableaux]{Gramme}{%
\xdef\PfCTableauUnite{\gram}%
\xdef\PfCCoefConversion{10}%
@@ -1219,6 +1223,87 @@
\]%
}{}%
%
+ % Carré Eve
+ %
+ \ifboolKV[ClesTableaux]{CarreA}{%
+ \[\renewcommand{\arraystretch}{1.15}%
+ \begin{NiceTabular}{*{7}{wc{20pt}wc{20pt}}}%
+ \Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}\\
+ \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{km$^2$\PfCTBstrut}&
+ \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{hm$^2$\PfCTBstrut}&
+ \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{dam$^2$\PfCTBstrut}&
+ \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{m$^2$\PfCTBstrut}&
+ \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{dm$^2$\PfCTBstrut}&
+ \Block[borders={left,top}]{1-1}{}&\Block[borders=top]{1-1}{cm$^2$\PfCTBstrut}&
+ \Block[borders={left,top}]{1-1}{}&\Block[borders={top,right}]{1-1}{mm$^2$\PfCTBstrut}\\
+ \ifboolKV[ClesTableaux]{Are}{%
+ \Block[borders={left,right,bottom}]{1-2}{}&&\Block[draw=gray!50,borders={left,top,bottom}]{}{~}&\Block[borders={top,right,bottom}]{}{\scriptsize ha}&\Block[draw=gray!50,borders={left,top,bottom}]{}{~}&\Block[borders={top,right,bottom}]{}{\scriptsize a}&\Block[borders={left,right,bottom}]{1-2}{}&&\Block[borders={left,right,bottom}]{1-2}{}&&\Block[borders={left,right,bottom}]{1-2}{}&&\Block[borders={left,right,bottom}]{1-2}{}&\\
+ }{\hline}%
+ \xintFor* ##1 in {\xintSeq {1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
+ &&&&&&&&&&&&&\\
+ }%
+ \Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}%
+ &&\Block[]{1-2}{}\\
+ \CodeAfter
+ % on trace les lignes verticales
+ \xintifboolexpr{\useKV[ClesTableaux]{Are}}{%
+ \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+ \tikz\draw (4-|\fpeval{2*(##1-1)+1})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+1});
+ }%
+ \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+ \tikz\draw[gray!50] (4-|\fpeval{2*(##1-1)+2})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+2});
+ }%
+ }{%
+ \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+ \tikz\draw (3-|\fpeval{2*(##1-1)+1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+1});
+ }%
+ \xintifboolexpr{\useKV[ClesTableaux]{Colonnes}}{%
+ \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+ \tikz\draw[gray!50] (3-|\fpeval{2*(##1-1)+2})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{2*(##1-1)+2});
+ }%
+ }{}%
+ }%
+ % On place le nombre éventuel
+ \ifx\bla#2\bla%
+ \else%
+ \setsepchar[*]{,*/}
+ \readlist*\ListeNombreAPlacer{#2}%
+ \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{
+ \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]%
+ \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{%
+ \tikz\node at (\fpeval{##2+\ifboolKV[ClesTableaux]{Are}{3.5}{2.5}}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}};
+ }%
+ }
+ \fi%
+ % on trace les flèches
+ \ifboolKV[ClesTableaux]{Fleches}{\setKV[ClesTableaux]{FlechesH,FlechesB}}{}%
+ \ifboolKV[ClesTableaux]{Are}{\xdef\PfCTableauDepart{4}}{\xdef\PfCTableauDepart{3}}%
+ \ifboolKV[ClesTableaux]{FlechesH}{%
+ \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+ \tikz\draw[gray,->,>=latex,out=30,in=150] (1.5-|\fpeval{2*##1+0.5}) to node[above, midway]{\small$\times\num{100}$}(1.5-|\fpeval{2*(##1+1)+0.5});%
+ }%
+ }{}%
+ \ifboolKV[ClesTableaux]{FlechesB}{%
+ \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+ \tikz\draw[gray,->,>=latex,out=-150,in=-30] (\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{2*(##1+1)+0.5}) to node[below,midway]{\small$\div\num{100}$}(\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{2*##1+0.5});%
+ }%
+ }{}%
+ \useKV[ClesTableaux]{CodeAfter}%
+ \end{NiceTabular}
+ \]%
+ }{}%
+ %
%%% Prise en compte de la cl\'e Cube
%
\ifboolKV[ClesTableaux]{Cube}{%
@@ -1299,6 +1384,85 @@
\end{NiceTabular}
\]%
}{}%
+ %
+ %%% Prise en compte de la cl\'e CubeA (Idée d'Eve Chambon)
+ %
+ \ifboolKV[ClesTableaux]{CubeA}{%
+ \setlength{\PfCCubeTabColSep}{\useKV[ClesTableaux]{Tabcolsep}}
+ \[\renewcommand{\arraystretch}{1.15}%
+ \setlength{\tabcolsep}{\PfCCubeTabColSep}%
+ \begin{NiceTabular}{*{7}{wc{25pt}wc{25pt}wc{25pt}}}
+ \Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}\\
+ \Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{km$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{hm$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{dam$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{m$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{dm$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{cm$^3$\PfCTBstrut}&\Block[borders={left,top}]{1-1}{}&\Block[borders={top}]{1-1}{}&\Block[borders={top,right}]{1-1}{mm$^3$\PfCTBstrut}\\
+ \ifboolKV[ClesTableaux]{Capacite}{%
+ \Block[borders={left,right,bottom}]{1-3}{}&&&\Block[borders={right,bottom}]{1-3}{}&&&\Block[borders={right,bottom}]{1-3}{}&&&\Block[borders={right,bottom}]{1-3}{}&&&\Block[draw=gray!50,borders={top,left,bottom}]{}{\scriptsize hL}&\Block[draw=gray!50,borders={top,bottom}]{}{\scriptsize daL}&\Block[draw=gray!50,borders={top,right,bottom}]{}{\scriptsize L}&\Block[draw=gray!50,borders={top,left,bottom}]{}{\scriptsize dL}&\Block[draw=gray!50,borders={top,bottom}]{}{\scriptsize cL}&\Block[draw=gray!50,borders={top,right,bottom}]{}{\scriptsize mL}&\Block[borders={right,bottom}]{1-3}{}&&\\
+ }{\hline}%
+ \xintFor* ##1 in {\xintSeq{1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
+ &&&&&&&&&&&&&&&&&&&&\\
+ }%
+ \Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}\\
+ \CodeAfter
+ % on trace les lignes verticales
+ \xintifboolexpr{\useKV[ClesTableaux]{Capacite}}{%
+ \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+ \tikz\draw (4-|\fpeval{3*(##1-1)+1})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+1});
+ }%
+ \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+ \tikz\draw[gray!50] (4-|\fpeval{3*(##1-1)+2})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+2});
+ \tikz\draw[gray!50] (4-|\fpeval{3*##1})--(\fpeval{4+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*##1});
+ }%
+ }{%
+ \xintFor* ##1 in {\xintSeq{1}{8}}\do{%
+ \tikz\draw (3-|\fpeval{3*(##1-1)+1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+1});
+ }%
+ \xintifboolexpr{\useKV[ClesTableaux]{Colonnes}}{%
+ \xintFor* ##1 in {\xintSeq{1}{7}}\do{%
+ \tikz\draw[gray!50] (3-|\fpeval{3*(##1-1)+2})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+2});
+ \tikz\draw[gray!50] (3-|\fpeval{3*##1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*##1});
+ }%
+ }{}%
+ }%
+ % On place le nombre éventuel
+ \ifx\bla#2\bla%
+ \else%
+ \setsepchar[*]{,*/}
+ \readlist*\ListeNombreAPlacer{#2}%
+ \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{
+ \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]%
+ \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{%
+ \tikz\node at (\fpeval{##2+\ifboolKV[ClesTableaux]{Capacite}{3.5}{2.5}}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}};
+ }%
+ }%
+ \fi%
+ % on trace les flèches
+ \ifboolKV[ClesTableaux]{Fleches}{\setKV[ClesTableaux]{FlechesH,FlechesB}}{}%
+ \ifboolKV[ClesTableaux]{Capacite}{\xdef\PfCTableauDepart{4}}{\xdef\PfCTableauDepart{3}}%
+ \ifboolKV[ClesTableaux]{FlechesH}{%
+ \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+ \tikz\draw[gray,->,>=latex,out=30,in=150] (1.5-|\fpeval{3.5+3*(##1-1)}) to node[above, midway]{\small$\times\num{1000}$}(1.5-|\fpeval{3.5+3*##1});%
+ }%
+ }{}%
+ \ifboolKV[ClesTableaux]{FlechesB}{%
+ \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+ \tikz\draw[gray,->,>=latex,out=-150,in=-30] (\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{3.5+3*##1}) to node[below,midway]{\small$\div\num{1000}$}(\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{3.5+3*(##1-1)});%
+ }%
+ }{}%
+ \useKV[ClesTableaux]{CodeAfter}%
+ \end{NiceTabular}
+ \]%
+ }{}%
%
%%% Prise en compte de la cl\'e Litre
%
diff --git a/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty b/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
index cee8d5c58bb..9cf41f3817f 100644
--- a/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
+++ b/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty
@@ -2,9 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2023/10/08}%
+\def\filedate{2023/10/15}%
\let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-u}%
+\def\fileversion{0.99-z-v}%
\let\PfCfileversion\fileversion%
\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]%
@@ -599,6 +599,8 @@
}%\emoticon
}%\raisebox
}%
+\input{PfCLego}
+\input{PfCJeton}
\input{PfCDessinAlgo}
\input{PfCBonbon}
\input{PfCPattern}