summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/latex/ProfCollege.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-09-01 03:00:47 +0000
committerNorbert Preining <norbert@preining.info>2022-09-01 03:00:47 +0000
commit01683025083419ba101c2612ba7d243f87410bcf (patch)
tree8367e3fc8ad170abc83b58053b1aea54a3bacbbf /macros/latex/contrib/profcollege/latex/ProfCollege.sty
parentd1518bf9b322780506b9422250024028e402f0ec (diff)
CTAN sync 202209010300
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/ProfCollege.sty')
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty1112
1 files changed, 925 insertions, 187 deletions
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index 7277b9fc58..9636b935d4 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/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{2022/08/25}%
+\def\filedate{2022/08/30}%
\let\PfCfiledate\filedate%
-\def\fileversion{0.99-w}%
+\def\fileversion{0.99-y}%
\let\PfCfileversion\fileversion%
\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]
@@ -347,6 +347,306 @@
}
%%%
+% Shikaku
+%%%
+\newcounter{PfCShikakuNom}
+\setcounter{PfCShikakuNom}{0}
+
+\setKVdefault[Shikaku]{Couleur=Purple,Taille=4,Largeur=2em,Solution=false,CodeAfter={},Creation=false,TailleHor=10,TailleVer=10,TailleHorMax=5,TailleVerMax=5,Nom=Shikaku\PfCShikakuNom}
+
+\newlength\PfCShikakuh
+\newlength\PfCShikakuv
+
+\NewDocumentCommand\Shikaku{o m}{%
+ \stepcounter{PfCShikakuNom}%
+ \useKVdefault[Shikaku]%
+ \setKV[Shikaku]{#1}%
+ \ifboolKV[Shikaku]{Creation}{%
+ \ifluatex\else\PackageWarning{ProfCollege}{La création automatique de Shikaku n'est disponible qu'avec LuaLaTeX.}\fi%
+ \ifboolKV[Shikaku]{Solution}{%
+ \ShikakuCreationSolution%
+ }{%
+ \ShikakuCreation%
+ }%
+ }{%
+ \setlength{\PfCShikakuv}{\useKV[Shikaku]{Largeur}+\tabcolsep}%
+ \setlength{\PfCShikakuh}{\useKV[Shikaku]{Largeur}}%
+ \colorlet{PfCCouleurShikaku}{\useKV[Shikaku]{Couleur}}%
+ \setsepchar[*]{,*/}%
+ \readlist*\ListeCasesSKK{#2}%
+ \savecomparemode%
+ \comparestrict%
+ \begin{NiceTabular}{*{\useKV[Shikaku]{Taille}}{m{\PfCShikakuh}}}[hvlines]
+ \xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Shikaku]{Taille}-1}}}\do{%
+ \xintFor* ##2 in {\xintSeq{1}{\useKV[Shikaku]{Taille}}}\do{%
+ \rule{0pt}{\PfCShikakuv}%
+ \StrCompare{\ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},1]}{b}[\PfCTestb]%
+ \StrCompare{\ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},1]}{l}[\PfCTestl]%
+ \StrCompare{\ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},1]}{lb}[\PfCTestlb]%
+ \xintifboolexpr{\PfCTestb==0}{%
+ \ifboolKV[Shikaku]{Solution}{%
+ \Block[borders={bottom,tikz=PfCCouleurShikaku},line-width=2pt]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }{%
+ \Block[]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }%
+ }{% Testl
+ \xintifboolexpr{\PfCTestl==0}{%
+ \ifboolKV[Shikaku]{Solution}{%
+ \Block[borders={left,tikz=PfCCouleurShikaku},line-width=2pt]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }{%
+ \Block[]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }%
+ }{% Testlb
+ \xintifboolexpr{\PfCTestlb==0}{%
+ \ifboolKV[Shikaku]{Solution}{%
+ \Block[borders={left,bottom,tikz=PfCCouleurShikaku},line-width=2pt]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }{%
+ \Block[]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }%
+ }{%
+ \Block[]{1-1}{%
+ \ListeCasesSKK[\fpeval{\useKV[Shikaku]{Taille}*##1+##2},2]%
+ }%
+ }%
+ }%
+ }%
+ \xintifForLast{\\}{&}%
+ }%
+ }%
+ \CodeAfter%
+ \useKV[Shikaku]{CodeAfter}%
+ \ifboolKV[Shikaku]{Solution}{%
+ \tikz\draw[line width=2pt,PfCCouleurShikaku] (1-|1) rectangle (last-|last);%
+ }{}%
+ \end{NiceTabular}%
+ \restorecomparemode%
+ }%
+}%
+
+\NewDocumentCommand\ShikakuCreation{}{%
+ \ifluatex%
+ \mplibforcehmode
+ \xdef\PfCNomShikaku{\useKV[Shikaku]{Nom}}%
+ \begin{mplibcode}[\PfCNomShikaku]%
+ Taillehor=\useKV[Shikaku]{TailleHor};
+ Taillever=\useKV[Shikaku]{TailleVer};
+
+ TailleMaxh=\useKV[Shikaku]{TailleHorMax};
+ TailleMaxv=\useKV[Shikaku]{TailleVerMax};
+
+ u:=5mm;
+
+ path R[],S[],RIso[],SIso[];
+ numeric RAire[],SAire[];
+ numeric RHor[],RVer[],SHor[],SVer[],RAngle[],SAngle[];
+
+ vardef RetiensLesInfosGenerales(expr depart,Lhor,Lver)=
+ R[k]:=polygone(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver));
+ RIso[k]=iso(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver));
+ RHor[k]=Lhor;
+ RVer[k]=Lver;
+ RAire[k]=Lhor*Lver;
+ RAngle[k]=ANGLE;
+ enddef;
+
+ vardef RetiensLesInfosPourLaSuite(expr depart,Lhor,Lver)=
+ if Lver>0:
+ S[k]=polygone(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver));
+ SIso[k]=iso(depart,depart+u*(Lhor,0),depart+u*(Lhor,-Lver),depart+u*(0,-Lver));
+ SHor[k]=Lhor;
+ SVer[k]=Lver;
+ SAire[k]=Lhor*Lver;
+ SAngle[k]=ANGLE;
+ fi;
+ enddef;
+
+ vardef RectangleAuto(expr aa,bb)=
+ save $;
+ path $;
+ $=polygone(aa,aa+(xpart(bb-aa),0),bb,bb-(xpart(bb-aa),0));
+ $
+ enddef;
+
+ pair T[];
+
+ pair A[],B[];
+
+ A1=u*(0,Taillever);
+ A2-A1=u*(Taillehor,0);
+ A4=(0,0);
+ A3-A4=A2-A1;
+
+ nbh=Taillehor div TailleMaxh;
+ nbv=Taillever div TailleMaxv;
+
+ p:=0;
+ for l=0 upto nbv:
+ for k=0 upto nbh:
+ p:=p+1;
+ T[p]=A1+u*(k*TailleMaxh,-l*TailleMaxv);
+ if k<nbh:
+ Hor[p]=TailleMaxh;
+ else:
+ Hor[p]=Taillehor mod TailleMaxh;
+ fi;
+ if l<nbv:
+ Ver[p]=TailleMaxv;
+ else:
+ Ver[p]=Taillever mod TailleMaxv;
+ fi;
+ endfor;
+ endfor;
+
+ Total:=p;
+
+ vardef DecomposeUnRectangle(expr BASEA,THOR,TVER)=
+ TMAXV:=TVER;
+ pair BBASEA;
+ BTHOR:=THOR;
+ BTVER:=TVER;
+ BBASEA:=BASEA;
+ forever:
+ k:=k+1;
+ hor:=floor(1+uniformdeviate(BTHOR));
+ ver:=floor(1+uniformdeviate(BTVER));
+ RetiensLesInfosGenerales(BBASEA,hor,ver);
+ RetiensLesInfosPourLaSuite(BBASEA+u*(0,-ver),hor,TMAXV-ver);
+ BTHOR:=BTHOR-hor;
+ BTVER:=ver;
+ BBASEA:=BBASEA+u*(hor,0);
+ exitif BTHOR<1;
+ endfor;
+ enddef;
+
+ k=0;
+ for l=1 upto Total:
+ if uniformdeviate(1)>0.5:
+ Angle[l]=180;
+ ANGLE:=Angle[l];
+ else:
+ Angle[l]=0;
+ ANGLE:=Angle[l];
+ fi;
+ DecomposeUnRectangle(T[l],Hor[l],Ver[l]);
+ endfor;
+ Totalk=k;
+
+ picture RTEXT[],STEXT[];
+
+ drawoptions(withpen pencircle scaled 2);
+ for n=1 upto Totalk:
+ trace R[n] withcolor white;
+ RTEXT[n]=image(
+ label(decimal(RAire[n]),(0,0));
+ );
+ RTEXT[n]:=image(
+ trace rotation(RTEXT[n],center RTEXT[n],RAngle[n]) shifted ((point(0) of R[n]) shifted(u*(0.5+floor(uniformdeviate(RHor[n])),-0.5-floor(uniformdeviate(RVer[n])))));
+ );
+ trace RTEXT[n];
+ endfor;
+ for n=1 upto Totalk:
+ if unknown S[n]:
+ else:
+ trace S[n] withcolor white;
+ STEXT[n]=image(
+ label(decimal(SAire[n]),(0,0));
+ );
+ STEXT[n]:=image(
+ trace rotation(STEXT[n],center STEXT[n],SAngle[n]) shifted ((point(0) of S[n]) shifted(u*(0.5+floor(uniformdeviate(SHor[n])),-0.5-floor(uniformdeviate(SVer[n])))));
+ );
+ trace STEXT[n];
+ fi;
+ endfor;
+ clip currentpicture to polygone(A1,A2,A3,A4);
+
+ picture CasesAvant[],CasesApres[];
+ CasesAvant[0]=currentpicture;
+
+ currentpicture:=nullpicture;
+
+ drawoptions(withpen pencircle scaled 2);
+ for n=1 upto Totalk:
+ trace R[n];
+ trace RTEXT[n];
+ endfor;
+ for n=1 upto Totalk:
+ if unknown S[n]:
+ else:
+ trace S[n];
+ trace STEXT[n];
+ fi;
+ endfor;
+ clip currentpicture to polygone(A1,A2,A3,A4);
+ CasesApres[0]:=currentpicture;
+
+ currentpicture:=nullpicture;
+
+ for l=1 upto Total:
+ CasesAvant[l]=image(%
+ trace CasesAvant[0];
+ clip currentpicture to polygone(T[l],T[l]+u*(Hor[l],0),T[l]+u*(Hor[l],-Ver[l]),T[l]+u*(0,-Ver[l]));
+ );
+ currentpicture:=nullpicture;
+ CasesApres[l]=image(
+ trace CasesApres[0];
+ clip currentpicture to polygone(T[l],T[l]+u*(Hor[l],0),T[l]+u*(Hor[l],-Ver[l]),T[l]+u*(0,-Ver[l]));
+ );
+ currentpicture:=nullpicture;
+ endfor;
+
+ for l=1 upto Total:
+ trace rotation(CasesAvant[l],center CasesAvant[l],Angle[l]);
+ endfor;
+
+ drawoptions(withpen pencircle scaled 2);
+ trace RectangleAuto(A1,A3);
+ drawoptions();
+ for k=1 upto Taillehor-1:
+ trace (k/Taillehor)[A4,A3]--(k/Taillehor)[A1,A2];
+ endfor;
+
+ for k=1 upto Taillever-1:
+ trace (k/Taillever)[A4,A1]--(k/Taillever)[A3,A2];
+ endfor;
+ \end{mplibcode}
+ \fi%
+}%
+
+\NewDocumentCommand\ShikakuCreationSolution{}{%
+ \ifluatex%
+ \mplibforcehmode
+ \xdef\PfCNomShikaku{\useKV[Shikaku]{Nom}}%
+ \begin{mplibcode}[\PfCNomShikaku]%
+ for l=1 upto Total:
+ trace rotation(CasesApres[l],center CasesApres[l],Angle[l]);
+ endfor;
+ drawoptions(withpen pencircle scaled 2);
+ trace RectangleAuto(A1,A3);
+ drawoptions();
+ for k=1 upto Taillehor-1:
+ trace (k/Taillehor)[A4,A3]--(k/Taillehor)[A1,A2];
+ endfor;
+
+ for k=1 upto Taillever-1:
+ trace (k/Taillever)[A4,A1]--(k/Taillever)[A3,A2];
+ endfor;
+ \end{mplibcode}
+ \fi%
+}%
+
+%%%
% Kakuro
%%%
\setKVdefault[Kakuro]{CouleurCase=LightGray,Taille=5,Solution=false,Largeur=2em,Aide=false,CouleurSolution=Black}
@@ -626,7 +926,7 @@
%%%
% Yohaku
%%%
-\setKVdefault[Yohaku]{Taille=2,Largeur=1cm,Hauteur=1cm,Addition,Multiplication=false,Perso=false,Limite=50,Pair=false,Impair=false,Premier=false,Solution=false,Visible=false,Bordure=false,CouleurResultat=gray!15,Ligne=0,Colonne=0,PasL=0,PasC=0,CouleurZone=gray!25}%
+\setKVdefault[Yohaku]{Taille=2,Largeur=1cm,Hauteur=1cm,Addition,Multiplication=false,Perso=false,Limite=50,Relatif=false,Negatif=false,Pair=false,Impair=false,Premier=false,Solution=false,Visible=false,Bordure=false,CouleurResultat=gray!15,Ligne=0,Colonne=0,PasL=0,PasC=0,CouleurZone=gray!25}%
\defKV[Yohaku]{Case=\setKV[Yohaku]{Visible}}%
\newlength\PfCYohaku%
@@ -640,6 +940,10 @@
\xdef\PfCYHKnombre{1}%
\xdef\PfCYHKpair{2}%
\xdef\PfCYHKimpair{1}%
+ \xdef\PfCYHKnegatif{}%
+ \xintFor* ##1 in{\xintSeq{2}{\fpeval{\useKV[Yohaku]{Limite}}}}\do{%
+ \xdef\PfCYHKnegatif{\PfCYHKnegatif -##1,}%
+ }%
\xintFor* ##1 in{\xintSeq{2}{\fpeval{\useKV[Yohaku]{Limite}}}}\do{%
\xdef\PfCYHKnombre{\PfCYHKnombre,##1}%
}%
@@ -649,7 +953,7 @@
\xintFor* ##1 in{\xintSeq{1}{\fpeval{\useKV[Yohaku]{Limite}}}}\do{%
\xdef\PfCYHKimpair{\PfCYHKimpair,\fpeval{##1*2+1}}%
}%
- %
+ %
\ifboolKV[Yohaku]{Perso}{%
\setsepchar[*]{,*/}\ignoreemptyitems%
\readlist*\PfCYHKListe{#2}%
@@ -660,40 +964,62 @@
}%
\ignoreemptyitems\readlist*\PfCYHKListeNA{\PfCYHKListeFoo}%
\xdef\PfCYHKListeFoo{}%
- \foreachitem\compteur\in\PfCYHKListe[2]{
+ \foreachitem\compteur\in\PfCYHKListe[2]{%
\xdef\PfCYHKListeFoo{\PfCYHKListeFoo \PfCYHKListe[2,\compteurcnt],}%
}%
\ignoreemptyitems\readlist*\PfCYHKListeP{\PfCYHKListeFoo}%
}{%
- \ifboolKV[Yohaku]{Premier}{%
- \xdef\PfCYHKListe{\PfCYHKpremier}%
+ \ifboolKV[Yohaku]{Negatif}{%
+ \xdef\PfCYHKListe{\PfCYHKnegatif}%
}{%
- \ifboolKV[Yohaku]{Impair}{%
- \xdef\PfCYHKListe{\PfCYHKimpair}%
+ \ifboolKV[Yohaku]{Premier}{%
+ \xdef\PfCYHKListe{\PfCYHKpremier}%
}{%
- \ifboolKV[Yohaku]{Pair}{%
- \xdef\PfCYHKListe{\PfCYHKpair}%
+ \ifboolKV[Yohaku]{Impair}{%
+ \xdef\PfCYHKListe{\PfCYHKimpair}%
}{%
- \xdef\PfCYHKListe{\PfCYHKnombre}%
+ \ifboolKV[Yohaku]{Pair}{%
+ \xdef\PfCYHKListe{\PfCYHKpair}%
+ }{%
+ \xdef\PfCYHKListe{\PfCYHKnombre}%
+ }%
}%
}%
}%
- % \xintifboolexpr{\useKV[Yohaku]{Taille}==2}{\MelangeListe{\PfCYHKListe}{4}}{\MelangeListe{\PfCYHKListe}{9}}%
- \MelangeListe{\PfCYHKListe}{\fpeval{\useKV[Yohaku]{Taille}**2}}%
+ \ifboolKV[Yohaku]{Relatif}{%
+ \xdef\PfCMoitieCase{\fpeval{floor((\useKV[Yohaku]{Taille}**2)/2)}}%
+ \xdef\PfCAutreMoitieCase{\fpeval{\useKV[Yohaku]{Taille}**2-\PfCMoitieCase}}%
+ \xdef\PfCFooRelatifYohaku{}%
+ \xdef\PfCYohakuAlea{\fpeval{randint(1,2)}}%
+ \xintifboolexpr{\PfCYohakuAlea==1}{% on choisit M1 négatifs, M2 positifs
+ \MelangeListe{\PfCYHKnegatif}{\PfCMoitieCase}%
+ \xdef\PfCYohakuInter{\faa}%
+ \MelangeListe{\PfCYHKnombre}{\PfCAutreMoitieCase}%
+ \xdef\PfCYohakuInter{\PfCYohakuInter,\faa}%
+ }{% on choisit M1 positifs, M2 négatifs
+ \MelangeListe{\PfCYHKnombre}{\PfCMoitieCase}%
+ \xdef\PfCYohakuInter{\faa}%
+ \MelangeListe{\PfCYHKnegatif}{\PfCAutreMoitieCase}%
+ \xdef\PfCYohakuInter{\PfCYohakuInter,\faa}%
+ }%
+ \MelangeListe{\PfCYohakuInter}{\fpeval{\useKV[Yohaku]{Taille}**2}}%
+ }{%
+ \MelangeListe{\PfCYHKListe}{\fpeval{\useKV[Yohaku]{Taille}**2}}%
+ }%
\ignoreemptyitems\readlist*\PfCYHKListeNA{\faa}%
%Sommes/Produits
- \xdef\PfCYHKListeProduit{}
+ \xdef\PfCYHKListeProduit{}%
%verticaux
\xintFor* ##2 in {\xintSeq{1}{\fpeval{\useKV[Yohaku]{Taille}}}}\do{%
\ifboolKV[Yohaku]{Multiplication}{%
\xdef\PfCYHKTampon{1}%
\xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Yohaku]{Taille}-1}}}\do{%
- \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}}
+ \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}}%
}%
}{%
\xdef\PfCYHKTampon{0}%
\xintFor* ##1 in {\xintSeq{0}{\fpeval{\useKV[Yohaku]{Taille}-1}}}\do{%
- \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}}
+ \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{##2+##1*\useKV[Yohaku]{Taille}}]}}%
}%
}%
\xdef\PfCYHKListeProduit{\PfCYHKListeProduit,\PfCYHKTampon}%
@@ -703,21 +1029,21 @@
\ifboolKV[Yohaku]{Multiplication}{%
\xdef\PfCYHKTampon{1}%
\xintFor* ##1 in {\xintSeq{1}{\fpeval{\useKV[Yohaku]{Taille}}}}\do{%
- \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}}
+ \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon*\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}}%
}%
}{%
\xdef\PfCYHKTampon{0}%
\xintFor* ##1 in {\xintSeq{1}{\fpeval{\useKV[Yohaku]{Taille}}}}\do{%
- \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}}
+ \xdef\PfCYHKTampon{\fpeval{\PfCYHKTampon+\PfCYHKListeNA[\fpeval{(\useKV[Yohaku]{Taille}-##2)*\useKV[Yohaku]{Taille}+##1}]}}%
}%
}%
\xdef\PfCYHKListeProduit{\PfCYHKListeProduit,\PfCYHKTampon}%
}%
- \readlist*\PfCYHKListeP{\PfCYHKListeProduit}
+ \readlist*\PfCYHKListeP{\PfCYHKListeProduit}%
}%
\setlength{\PfCYohaku}{\useKV[Yohaku]{Largeur}-\tabcolsep}%
- \colorlet{PfCFondYohaku}{\useKV[Yohaku]{CouleurResultat}}
- \colorlet{PfCZoneYohaku}{\useKV[Yohaku]{CouleurZone}}
+ \colorlet{PfCFondYohaku}{\useKV[Yohaku]{CouleurResultat}}%
+ \colorlet{PfCZoneYohaku}{\useKV[Yohaku]{CouleurZone}}%
\begin{NiceTabular}{*{\fpeval{\useKV[Yohaku]{Taille}+1}}{m{\PfCYohaku}}}[hvlines-except-borders]
\CodeBefore
\xintifboolexpr{\useKV[Yohaku]{Ligne}==0 || \useKV[Yohaku]{Colonne}==0}{}{%
@@ -788,27 +1114,93 @@
%%%
% Rose
%%%
-\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false}%
+\setKVdefault[ClesRose]{Vide=false,Couleur=white,Produits=false,Solution=false,Rayon=2cm,Petales=7,Aide=false,FacteurMin=2,FacteurMax=10,ProduitVide=false,CaseVide=false,Polygone=false,Nom=Rose1}%
\NewDocumentCommand\RoseMul{o}{%
\useKVdefault[ClesRose]%
\setKV[ClesRose]{#1}%
+ \ifluatex%
+ \ifboolKV[ClesRose]{Solution}{%
+ \DessineRoseMulSol%
+ }{%
+ \DessineRoseMul%
+ }%
+ \else%
\DessineRoseMul%
+ \fi%
}%
+\newcommand\DessineRoseMulSol{%
+ \ifluatex%
+ \mplibforcehmode%
+ \xdef\PfCNomRose{\useKV[ClesRose]{Nom}}%
+ \begin{mplibcode}[\PfCNomRose]
+ boolean Aide,Produits,Solution,Vide,ProduitVide,CaseVide,Polygone;
+ Aide:=\useKV[ClesRose]{Aide};
+ Vide:=\useKV[ClesRose]{Vide};
+ Solution:=\useKV[ClesRose]{Solution};
+ Produits:=\useKV[ClesRose]{Produits};
+ ProduitVide:=\useKV[ClesRose]{ProduitVide};
+ CaseVide:=\useKV[ClesRose]{CaseVide};
+ if ProduitVide:Solution:=true fi;
+ if CaseVide:Solution:=true fi;
+ % on labelise
+ if Vide=false:
+ if Produits:
+ else:
+ for k=0 upto Petales-1:
+ label(TEX("\num{"&decimal(Facteur[k])&"}"),(0.5[O,A[k]]-center BoiteRec));
+ endfor;
+ fi;
+ if Produits or Solution:
+ for k=0 upto Petales-1:
+ label(TEX("\num{"&decimal(Produit[k])&"}"),(B[k]+0.5*Rayon*unitvector(B[k])));
+ endfor;
+ fi;
+ fi;
+ % On trace et on affiche...éventuellement :)
+ if Aide:
+ for k=0 upto Petales-1:
+ drawarrow (0.5[O,A[k]]--1.75[O,B[k]]) cutbefore segment(A[k],A[k+1]) cutafter BoiteRec shifted (B[k]+0.5*Rayon*unitvector(B[k])) dashed evenly scaled 0.5;
+ drawarrow (0.5[O,A[k+1]]--1.75[O,B[k]]) cutbefore segment(A[k],A[k+1]) cutafter BoiteRec shifted (B[k]+0.5*Rayon*unitvector(B[k])) dashed evenly scaled 0.5;
+ endfor;
+ fi;
+ if ProduitVide:
+ %choix=floor(uniformdeviate(Petales-1));
+ fill (BoiteRec shifted (1.75[O,B[choix]]-center BoiteRec)) withcolor Fond;
+ fill rotation(polygone(O,B0,A1,B1),O,(choix-1)*(360/Petales)) withcolor Fond;
+ fill rotation(polygone(O,B0,A1,B1),O,choix*(360/Petales)) withcolor Fond;
+ fi;
+ if CaseVide:
+ %choix:=floor(uniformdeviate(Petales-1));
+ for k=0 upto Petales-1:
+ if k<>choix:
+ fill rotation(polygone(O,B0,A1,B1),O,k*(360/Petales)) withcolor Fond;
+ fi;
+ endfor;
+ fi;
+ trace A0 for k=1 upto Petales:--A[k] endfor --cycle;
+ for k=0 upto Petales-1:
+ trace segment(O,B[k]) dashed withdots scaled 0.25;
+ draw BoiteRec shifted (B[k]+0.5*Rayon*unitvector(B[k])) dashed evenly scaled 0.5;
+ endfor;
+ \end{mplibcode}
+ \fi
+}
\newcommand\DessineRoseMul{%
\ifluatex%
\mplibforcehmode%
- \begin{mplibcode}
+ \xdef\PfCNomRose{\useKV[ClesRose]{Nom}}%
+ \begin{mplibcode}[\PfCNomRose]
vardef ExtraireListe(expr nbmin,nbmax,nbfacteurs)=
numeric ElementE[],ElementS[];
%% éléments d'entrée
- nbe=1;
+ nbe:=1;
for k=nbmin upto nbmax:
ElementE[nbe]=k;
nbe:=nbe+1;
endfor;
- totalE=(nbmax-nbmin)+1;
+ totalE:=(nbmax-nbmin)+1;
numeric rec;
for k=1 upto nbfacteurs:
rec:=ceiling(uniformdeviate(totalE+1-k));
@@ -845,7 +1237,7 @@
color Fond;
Fond:=\useKV[ClesRose]{Couleur};
O=(0,0);
- ExtraireListe(FacteurMin,FacteurMax,Petales);
+ ExtraireListe(FacteurMin,FacteurMax,Petales);
path cc;
cc=cercles(O,Rayon);
for k=0 upto Petales:
@@ -862,11 +1254,11 @@
fi;
%On détermine les facteurs et produits
for k=0 upto Petales-1:
- Facteur[k]=ElementS[k+1];
+ Facteur[k]:=ElementS[k+1];
endfor;
- Facteur[Petales]=Facteur[0];
+ Facteur[Petales]:=Facteur[0];
for k=0 upto Petales-1:
- Produit[k]=Facteur[k]*Facteur[k+1];
+ Produit[k]:=Facteur[k]*Facteur[k+1];
endfor;
%on labelise
if Vide=false:
@@ -890,7 +1282,7 @@
endfor;
fi;
if ProduitVide:
- choix=floor(uniformdeviate(Petales-1));
+ choix:=floor(uniformdeviate(Petales-1));
fill (BoiteRec shifted (1.75[O,B[choix]]-center BoiteRec)) withcolor Fond;
fill rotation(polygone(O,B0,A1,B1),O,(choix-1)*(360/Petales)) withcolor Fond;
fill rotation(polygone(O,B0,A1,B1),O,choix*(360/Petales)) withcolor Fond;
@@ -983,12 +1375,12 @@
if Produits:
else:
for k=0 upto Petales-1:
- label(TEX("\num{"&decimal(Facteur[k])&"}"),(0.5[O,A[k]]-center BoiteRec));
+ label(LATEX("\num{"&decimal(Facteur[k])&"}"),(0.5[O,A[k]]-center BoiteRec));
endfor;
fi;
if Produits or Solution:
for k=0 upto Petales-1:
- label(TEX("\num{"&decimal(Produit[k])&"}"),(B[k]+0.5*Rayon*unitvector(B[k])));
+ label(LATEX("\num{"&decimal(Produit[k])&"}"),(B[k]+0.5*Rayon*unitvector(B[k])));
endfor;
fi;
fi;
@@ -4751,7 +5143,7 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
%%%
% Labyrinthe Nombre
%%%
-\setKVdefault[ClesLabyNb]{Multiple=5,XDepart=0,YDepart=0,Longueur=7,Largeur=4,XArrivee=6,YArrivee=3,Solution=false,Echelle=1,Angle=0,Couleur=red,Murs=false,Nom=Ex1,CouleurChemin=blue}
+\setKVdefault[ClesLabyNb]{Multiple=5,XDepart=0,YDepart=0,Longueur=7,Largeur=4,XArrivee=6,YArrivee=3,Solution=false,Echelle=1,Angle=0,Couleur=red,Murs=false,Nom=Ex1,CouleurChemin=LightSteelBlue}
\newcommand\LabyNombre[1][]{%
\useKVdefault[ClesLabyNb]%
@@ -6207,6 +6599,14 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\newtcolorbox{CadreNombre}[1][]{%
Expression,#1}
+\newcommand\BoiteFlash[2][40pt]{%
+ \ifx\bla#2\bla%
+ \tcbox[BoiteExpression]{\hbox to#1{\phantom{A}}}%
+ \else
+ \tcbox[BoiteExpression]{#2}%
+ \fi
+}
+
\setKVdefault[ClesFlash]{Hauteur=0.2\textheight,Simple=false,Intrus=false,Kahout=false,Daily=false,Expression=false,Mental=false,Mesure=false,Heure=false,Decimal=false,Operation=Multiplie,Numeration=false,Evaluation=false,Pause=false,Couleur1=blue!10,Couleur2=orange!10,Couleur3=green!10,Couleur4=yellow!10,Numerique=false,Seul=false}
\newlength{\HauteurFlash}
@@ -6528,13 +6928,7 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\end{CadreNombre}
}
-\newcommand\BoiteFlash[1]{%
- \ifx\bla#1\bla%
- \tcbox[BoiteExpression]{\phantom{10000000}}%
- \else
- \tcbox[BoiteExpression]{#1}%
- \fi
-}
+
\newcommand\QFVide{%
\begin{CadreNombre}
@@ -7933,7 +8327,7 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\newcounter{QuestionQCM}%
\newcounter{TitreQCM}%
\ifdef{\QCM}{%
- \PackageWarning{ProfCollege}{La commande \noexpand\QCM étant définie par la classe du document, ProfCollege modifie sa commande \noexpand\QCM en \noexpand\QCMPfC.}%
+ \PackageWarning{ProfCollege}{La commande \noexpand\QCM étant définie par la classe du document, ProfCollege modifie sa commande \noexpand\QCM en \noexpand\QCMPfC.}%
\newcommand\QCMPfC[2][]{%
\useKVdefault[ClesQCM]%
\setKV[ClesQCM]{#1}%
@@ -8028,6 +8422,7 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
}%
\hline%
\end{tabular}%
+ \renewcommand{\arraystretch}{1}%
}{%
\ifboolKV[ClesQCM]{VF}{%
\setKV[ClesQCM]{Reponses=2}
@@ -8065,10 +8460,10 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\end{tabular}%
}%
}%
+ \renewcommand{\arraystretch}{1}%
}%
}
-
%%%
% Somme des angles
%%%
@@ -21046,12 +21441,14 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%%%
% 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={}}
+\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}
\newcommand\PfCTBstrut{\rule[-1.2ex]{0pt}{3.8ex}} % Top and Bottom strut
\newcommand\PfCTstrut{\rule{0pt}{3.8ex}} % Top strut
\newcommand\PfCBstrut{\rule[-1.2ex]{0pt}{0ex}} % Bottom strut
+\newlength\PfCTableauPuissances%
+
\newcommand\Tableau[2][]{%
\useKVdefault[ClesTableaux]%
\setKV[ClesTableaux]{#1}%
@@ -21222,9 +21619,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}{}%
}{}\\%
}{}%
- %
%%% Prise en compte de la cl\'e Puissances
- %
\ifboolKV[ClesTableaux]{Puissances}{%
\xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}%
\ifboolKV[ClesTableaux]{Milliards}{%
@@ -21311,6 +21706,178 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\setlength{\tabcolsep}{100\tabcolsep}%
}{}%
%
+ %%% Puissances seules
+ %
+ \ifboolKV[ClesTableaux]{PuissancesSeules}{%
+ \setlength{\PfCTableauPuissances}{3em}%
+ \xdef\DecalageLigne{0}%
+ \setlength{\tabcolsep}{0.01\tabcolsep}%
+ \begin{center}%
+ %
+ %%% Definition du tableau
+ %
+ \ifboolKV[ClesTableaux]{Milliards}{\xdef\PfCDerniereColonne{16}}{\ifboolKV[ClesTableaux]{Millions}{\xdef\PfCDerniereColonne{13}}{\xdef\PfCDerniereColonne{10}}}%
+ \begin{NiceTabular}{*{\ifboolKV[ClesTableaux]{Milliards}{12}{%
+ \ifboolKV[ClesTableaux]{Millions}{9}{6}%
+ }}{m{\PfCTableauPuissances}}>{\columncolor{gray!15}}{c}*{3}{m{\PfCTableauPuissances}}}%
+ \CodeBefore
+ \xintifboolexpr{\useKV[ClesTableaux]{Colonne}>0}{%
+ \tikz\fill[gray!15] (1-|\fpeval{\useKV[ClesTableaux]{Colonne}}) rectangle (last-|\fpeval{\useKV[ClesTableaux]{Colonne}+1});
+ }{}
+ \Body
+ \hline
+ %
+ %%% Prise en compte de la cl\'e Partie
+% %
+% \ifboolKV[ClesTableaux]{Partie}{%
+% \Block[]{1-%
+% \ifboolKV[ClesTableaux]{Milliards}{12}{%
+% \ifboolKV[ClesTableaux]{Millions}{9}{6}%
+% }}{\bfseries Partie enti\`ere}\ifboolKV[ClesTableaux]{Milliards}{%
+% &&&&&&%
+% }{%
+% \ifboolKV[ClesTableaux]{Millions}{%
+% &&&%
+% }{%
+% }}%
+% &&&&&%
+% &\Block[fill=gray!15]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}\xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}%%
+% &\Block[]{1-3}{\bfseries Partie d\'ecimale}%
+% &&\\
+% }{}%
+% %
+% %%% Prise en compte de la cl\'e Classes
+% %
+% \ifboolKV[ClesTableaux]{Classes}{%
+% \xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}\ifboolKV[ClesTableaux]{Milliards}{\Block[draw,fill={\useKV[ClesTableaux]{CouleurG}}]{1-3}{Classe des milliards}&&&\Block[draw,fill={\useKV[ClesTableaux]{CouleurM}}]{1-3}{Classe des millions}&&&}{}%
+% \ifboolKV[ClesTableaux]{Millions}{\Block[draw,fill={\useKV[ClesTableaux]{CouleurM}}]{1-3}{Classe des millions}&&&}{}%
+% \Block[draw,fill={\useKV[ClesTableaux]{Couleurm}}]{1-3}{Classe des milliers}&&%
+% &\Block[draw,fill={\useKV[ClesTableaux]{Couleuru}}]{1-3}{Classe des unités}&&
+% &\Block[draw,fill=gray!15]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}%
+% &\Block[draw]{1-3}{}&&%
+% \\
+% }{}%
+ %
+ %%% Valeurs ci-dessous par d\'efaut
+ %
+ %Affichage ou pas des noms ?
+% \hline
+% \ifboolKV[ClesTableaux]{Milliards}{%
+% \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont centaines de milliards}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de milliards}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont unit\'es de milliards}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont centaines de millions}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de millions}%
+% &\Block[]{}{\fontsize{5}{5}\selectfont unit\'es de millions}%
+% &
+% }{}%
+% \ifboolKV[ClesTableaux]{Millions}{%
+% \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont centaines de millions}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de millions}%
+% &\Block[]{}{\fontsize{5}{5}\selectfont unit\'es de millions}%
+% &
+% }{}%
+% \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont centaines de milliers}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines de milliers}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont unit\'es de milliers}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont centaines}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dizaines}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont unit\'es}%
+% &\Block[borders={right}]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont dixi\`emes}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont centi\`emes}%
+% &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont milli\`emes}\\
+% %
+ %%% Prise en compte de la cl\'e Nombres
+ %
+ \ifboolKV[ClesTableaux]{Nombres}{%
+ \xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}%
+ \ifboolKV[ClesTableaux]{Milliards}{%
+ \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont\num{100000000000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont\num{10000000000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont\num{1000000000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{100000000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10000000}}%
+ &\Block[borders={}]{}{\fontsize{5}{5}\selectfont \num{1000000}}%
+ &%
+ }{}%
+ \ifboolKV[ClesTableaux]{Millions}{%
+ \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont \num{100000000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10000000}}%
+ &\Block[borders={}]{}{\fontsize{5}{5}\selectfont \num{1000000}}%
+ &%
+ }{}%
+ \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont \num{100000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{1000}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{100}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{10}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{1}}%
+ &\Block[borders={right}]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{0,1} ou $\dfrac{\strut1}{\strut10}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{0,01} ou $\dfrac{\strut1}{\strut100}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont \num{0,001} ou $\dfrac{\strut1}{\strut\num{1000}}$}%
+ \\
+ }{}%
+ %%% Prise en compte de la cl\'e Puissances
+ \ifboolKV[ClesTableaux]{Milliards}{%
+ \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont $10^{11}$}&%
+ \Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{10}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{9}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{8}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{7}$}%
+ &\Block[borders={}]{}{\fontsize{5}{5}\selectfont $10^{6}$}%
+ &%
+ }{%
+ \ifboolKV[ClesTableaux]{Millions}{%
+ \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont $10^{8}$}&%
+ \Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{7}$}%
+ &\Block[borders={}]{}{\fontsize{5}{5}\selectfont $10^{6}$}%
+ &%
+ }{%
+ }}%
+ \Block[borders={left,right}]{}{\fontsize{5}{5}\selectfont $10^{5}$}
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^{4}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $10^3$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{d2}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{d1}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^0$}%
+ &\Block[borders={right}]{}{\ifboolKV[ClesTableaux]{Virgule}{,}{}}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^{-1}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^{-2}$}%
+ &\Block[borders={right}]{}{\fontsize{5}{5}\selectfont $\num{10}^{-3}$}%
+ \\%
+ %%% Lignes vierges
+ \hline%
+ \xintFor* ##1 in {\xintSeq{1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
+ \ifboolKV[ClesTableaux]{Milliards}{%
+ &&&&&&}{}%
+ \ifboolKV[ClesTableaux]{Millions}{%
+ &&&}{}%
+ &&&&&&\ifboolKV[ClesTableaux]{Virgule}{,}{\phantom{,}}&&&\\}%
+ \CodeAfter%
+ % on trace les lignes verticales
+ \xintFor* ##1 in {\xintSeq{1}{\fpeval{\PfCDerniereColonne+1}}}\do{%
+ \tikz\draw (\fpeval{\DecalageLigne+2}-|##1)--(\fpeval{\DecalageLigne+2+\useKV[ClesTableaux]{NbLignes}}-|##1);%
+ }%
+ % On place le nombre éventuel
+ \ifx\bla#2\bla%
+ \else%
+ \setsepchar[*]{,*/}%
+ \readlist*\ListeNombreAPlacer{#2}%
+ \setsepchar{,}%
+ \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{
+ \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]%
+ \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{%
+ \tikz\node at (\fpeval{##2+1.5}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}};
+ }%
+ }
+ \fi%
+ \end{NiceTabular}%
+ \end{center}%
+ \setlength{\tabcolsep}{100\tabcolsep}%
+ }{}%
+ %
%%% Cl\'e Entiers
%
\ifboolKV[ClesTableaux]{Entiers}{%
@@ -21442,7 +22009,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\CodeAfter%
% on trace les lignes verticales
\xintFor* ##1 in {\xintSeq{1}{\PfCDerniereColonne}}\do{%
- \tikz\draw (2-|##1)--(\fpeval{2+\useKV[ClesTableaux]{NbLignes}+1}-|##1);%
+ \tikz\draw (\fpeval{\DecalageLigne+1}-|##1)--(\fpeval{\DecalageLigne+1+\useKV[ClesTableaux]{NbLignes}+1}-|##1);%
}%
%% On place le nombre éventuel
\ifx\bla#2\bla%
@@ -21689,7 +22256,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\ifboolKV[ClesTableaux]{Milliards}{\xdef\PfCDerniereColonne{17}}{\ifboolKV[ClesTableaux]{Millions}{\xdef\PfCDerniereColonne{14}}{\xdef\PfCDerniereColonne{11}}}%
\begin{NiceTabular}{*{\ifboolKV[ClesTableaux]{Milliards}{12}{%
\ifboolKV[ClesTableaux]{Millions}{9}{6}%
- }}{m{1cm}}*{5}{m{1cm}}}%
+ }}{wc{1cm}}*{5}{wc{1cm}}}%
%
\CodeBefore%
\ifboolKV[ClesTableaux]{Milliards}{%
@@ -21836,7 +22403,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%
\ifboolKV[ClesTableaux]{Metre}{%
\[\renewcommand{\arraystretch}{1.15}%
- \begin{NiceTabular}{*{7}{p{7.5mm}}}%
+ \begin{NiceTabular}{*{7}{wc{7.5mm}}}%
\Block[]{}{}
&\Block[]{}{}
&\Block[]{}{}
@@ -21895,7 +22462,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%
\ifboolKV[ClesTableaux]{Carre}{%
\[\renewcommand{\arraystretch}{1.15}%
- \begin{NiceTabular}{*{7}{p{3.5mm}p{3.5mm}}}%
+ \begin{NiceTabular}{*{7}{wc{3.5mm}wc{3.5mm}}}%
\Block[]{1-2}{}
&&\Block[]{1-2}{}
&&\Block[]{1-2}{}
@@ -21971,7 +22538,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\ifboolKV[ClesTableaux]{Cube}{%
\[\renewcommand{\arraystretch}{1.15}%
\setlength{\tabcolsep}{0.625\tabcolsep}%
- \begin{NiceTabular}{*{7}{p{3.5mm}p{3.5mm}p{3.5mm}}}
+ \begin{NiceTabular}{*{7}{wc{3.5mm}wc{3.5mm}wc{3.5mm}}}
\Block[]{1-3}{}
&&&\Block[]{1-3}{}
&&&\Block[]{1-3}{}
@@ -22049,7 +22616,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%
\ifboolKV[ClesTableaux]{Litre}{%
\[\renewcommand{\arraystretch}{1.15}%
- \begin{NiceTabular}{*{6}{p{7.5mm}}}%
+ \begin{NiceTabular}{*{6}{wc{7.5mm}}}%
\Block[]{1-1}{}
&\Block[]{1-1}{}
&\Block[]{1-1}{}
@@ -22104,7 +22671,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%
\ifboolKV[ClesTableaux]{Gramme}{%
\[\renewcommand{\arraystretch}{1.15}%
- \begin{NiceTabular}{*{7}{p{7.5mm}}}%
+ \begin{NiceTabular}{*{7}{wc{7.5mm}}}%
\Block[]{}{}
&\Block[]{}{}
&\Block[]{}{}
@@ -22160,7 +22727,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}%
\newcommand\PfCTableauIncline{%
-\begin{NiceTabular}{p{1.5em}p{1.5em}p{1.5em}p{1.5em}p{1.5em}p{1.5em}p{1.5em}}
+\begin{NiceTabular}{wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}wc{1.5em}}
&&&&&&\\
\Block[borders={bottom}]{}{\si{\kilo\PfCTableauUnite}}&\\
&\Block[borders={left}]{}{}&\\
@@ -22333,6 +22900,18 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}%
\makeatother
+\newtcolorbox{MyboxTrivial}[1][]{%
+ enhanced,%
+ nobeforeafter,%
+ left=0pt,right=0pt,top=0pt,bottom=0pt,%
+ text fill,%
+ width=\largeurcarte,%
+ height=\hauteurcarte,%
+ arc=5pt,%
+ colback=white,%
+ #1
+}
+
\newlength{\largeurcards}%
\newlength{\hauteurcards}%
\newlength{\largeurcarte}%
@@ -22388,7 +22967,10 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}%
\setKVdefault[Cards]{Largeur=59,Hauteur=89,HauteurTheme=15,Marge=4,Landscape=false,Couleur=Cornsilk,Theme=Th\'eor\`eme\\de
- Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true,SolutionSeule=false}%
+ Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true,SolutionSeule=false,%
+ % Pour le trivial
+ Trivial=false,Symboles={\faInfinity,\faSignal,\faProjectDiagram,\faHiking,\faRuler,\faLockOpen}
+}%
\newcommand\Cartes[2][]{%
\useKVdefault[Cards]%
@@ -22414,97 +22996,190 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\setlength{\largeurtitre}{\fpeval{(\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}-9)/2}mm}%
\colorlet{TexteCouleur}{black}%
\colorlet{TrameCouleur}{\useKV[Cards]{Couleur}}%
- \ifboolKV[Cards]{JaiQuia}{%
+ \ifboolKV[Cards]{Trivial}{%
+ \xdef\PfCListeSymbolTrivial{\useKV[Cards]{Symboles}}%
+ \setsepchar{,}\readlist*\ListeSymbolesTrivial{\PfCListeSymbolTrivial}%
+ \setlength{\tabcolsep}{0.25\tabcolsep}
\ifboolKV[Cards]{Trame}{%
\clearpage%
\thispagestyle{empty}%
\begin{Trame}
\multido{\i=1+1}{9}{%
- \node at (Carte\i) {%
- \begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}%
- %%
- \end{MyboxJQ}%
+ \node[] at (Carte\i) {%
+ \begin{MyboxTrivial}%
+ \begin{center}
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[9,m]}[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
+ \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\i,\fpeval{1+2*(##1-1)}]\\
+ }%
+ \end{NiceTabular}
+ \end{center}
+ \end{MyboxTrivial}%
};%
}%
\end{Trame}%
- \clearpage%
- }{%
- \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}%
- %%
- \end{MyboxJQ}%
- }%
- }{%
- \ifboolKV[Cards]{Loop}{%
- \ifboolKV[Cards]{Trame}{%
+ \ifboolKV[Cards]{AffichageSolution}{%
\clearpage%
\thispagestyle{empty}%
\begin{Trame}
- \multido{\i=1+1}{9}{%
+ \multido{\i=1+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxTrivial}%
+ \begin{center}
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
+ \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{4-\i},\fpeval{2*##1}]\\
+ }%
+ \end{NiceTabular}
+ \end{center}
+ \end{MyboxTrivial}%
+ };%
+ }%
+ \multido{\i=4+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxTrivial}%
+ \begin{center}
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
+ \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{10-\i},\fpeval{2*##1}]\\
+ }%
+ \end{NiceTabular}
+ \end{center}
+ \end{MyboxTrivial}%
+ };%
+ }%
+ \multido{\i=7+1}{3}{%
\node at (Carte\i) {%
- \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}%
- \ListeCards[\i,3]%
- \end{Mybox}%
+ \begin{MyboxTrivial}
+ \begin{center}
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
+ \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{16-\i},\fpeval{2*##1}]\\
+ }%
+ \end{NiceTabular}
+ \end{center}
+ \end{MyboxTrivial}%
};%
}%
\end{Trame}%
\clearpage%
- }{%
- \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}%
- \ListeCards[1,3]%
- \end{Mybox}%
- }%
+ }{}%
}{%
+ \begin{MyboxTrivial}%
+ \begin{center}
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
+ \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{1+2*(##1-1)}]\\
+ }%
+ \end{NiceTabular}
+ \end{center}
+ \end{MyboxTrivial}%
+ \ifboolKV[Cards]{AffichageSolution}{%
+ \begin{MyboxTrivial}%
+ \begin{center}
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{6}}\do{%
+ \rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{2*##1}]\\
+ }%
+ \end{NiceTabular}
+ \end{center}
+ \end{MyboxTrivial}%
+ }{}%
+ }%
+ \setlength{\tabcolsep}{4\tabcolsep}%
+ }{%
+ \ifboolKV[Cards]{JaiQuia}{%
\ifboolKV[Cards]{Trame}{%
\clearpage%
\thispagestyle{empty}%
\begin{Trame}
\multido{\i=1+1}{9}{%
- \node[] at (Carte\i) {%
- \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
- \ListeCards[\i,1]%
- \end{MyboxSimpleAv}%
+ \node at (Carte\i) {%
+ \begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}%
+ %%
+ \end{MyboxJQ}%
};%
}%
\end{Trame}%
- \ifboolKV[Cards]{AffichageSolution}{%
+ \clearpage%
+ }{%
+ \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}%
+ %%
+ \end{MyboxJQ}%
+ }%
+ }{%
+ \ifboolKV[Cards]{Loop}{%
+ \ifboolKV[Cards]{Trame}{%
\clearpage%
\thispagestyle{empty}%
\begin{Trame}
- \multido{\i=1+1}{3}{%
- \node at (Carte\i) {%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[\fpeval{4-\i},2]%
- \end{MyboxSimpleAr}%
- };%
- }%
- \multido{\i=4+1}{3}{%
- \node at (Carte\i) {%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[\fpeval{10-\i},2]%
- \end{MyboxSimpleAr}%
- };%
- }%
- \multido{\i=7+1}{3}{%
+ \multido{\i=1+1}{9}{%
\node at (Carte\i) {%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[\fpeval{16-\i},2]%
- \end{MyboxSimpleAr}%
+ \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}%
+ \ListeCards[\i,3]%
+ \end{Mybox}%
};%
}%
\end{Trame}%
\clearpage%
- }{}%
+ }{%
+ \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}%
+ \ListeCards[1,3]%
+ \end{Mybox}%
+ }%
}{%
- \ifboolKV[Cards]{SolutionSeule}{}{%
- \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
- \ListeCards[1,1]%
- \end{MyboxSimpleAv}%
+ \ifboolKV[Cards]{Trame}{%
+ \clearpage%
+ \thispagestyle{empty}%
+ \begin{Trame}
+ \multido{\i=1+1}{9}{%
+ \node[] at (Carte\i) {%
+ \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
+ \ListeCards[\i,1]%
+ \end{MyboxSimpleAv}%
+ };%
+ }%
+ \end{Trame}%
+ \ifboolKV[Cards]{AffichageSolution}{%
+ \clearpage%
+ \thispagestyle{empty}%
+ \begin{Trame}
+ \multido{\i=1+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[\fpeval{4-\i},2]%
+ \end{MyboxSimpleAr}%
+ };%
+ }%
+ \multido{\i=4+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[\fpeval{10-\i},2]%
+ \end{MyboxSimpleAr}%
+ };%
+ }%
+ \multido{\i=7+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[\fpeval{16-\i},2]%
+ \end{MyboxSimpleAr}%
+ };%
+ }%
+ \end{Trame}%
+ \clearpage%
+ }{}%
+ }{%
+ \ifboolKV[Cards]{SolutionSeule}{}{%
+ \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
+ \ListeCards[1,1]%
+ \end{MyboxSimpleAv}%
+ }%
+ \ifboolKV[Cards]{AffichageSolution}{%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[1,2]%
+ \end{MyboxSimpleAr}%
+ }{}%
}%
- \ifboolKV[Cards]{AffichageSolution}{%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[1,2]%
- \end{MyboxSimpleAr}%
- }{}%
}%
}%
}%
@@ -22533,29 +23208,32 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\newtoks\t@b
\long\def\ifremain@lines#1\\#2\@nil{%
- \csname @\ifx\@empty#2\@empty second\else first\fi oftwo\endcsname}
+ \csname @\ifx\@empty#2\@empty second\else first\fi oftwo\endcsname}
\long\def\subst@eol#1\\#2\@nil{\addtot@b{#1\\}%
\ifremain@lines#2\\\@nil{\addtot@b&\subst@eol#2\@nil}{\addtot@b{#2\CodeAfter\xintifboolexpr{\useKV[Tableur]{Ligne}==0 || \useKV[Tableur]{Colonne}==0}{}{%
- \tikz\node at (row-\fpeval{\useKV[Tableur]{Ligne}+1+\useKV[Tableur]{PasL}}-|col-\fpeval{\useKV[Tableur]{Colonne}+1+\useKV[Tableur]{PasC}}) {\tiny$\blacksquare$};%
- }%
- \end{NiceTabular}}}}%
+ \tikz\node at (row-\fpeval{\useKV[Tableur]{Ligne}+1+\useKV[Tableur]{PasL}}-|col-\fpeval{\useKV[Tableur]{Colonne}+1+\useKV[Tableur]{PasC}}) {\tiny$\blacksquare$};%
+ }%
+ \end{NiceTabular}}}}%
\long\def\collectcp@body#1\end{\subst@eol#1\@nil\end}
\newcommand\addtot@b[1]{\t@b\expandafter{\the\t@b#1}}
\newcommand\edftot@b[1]{\edef\temp@{#1}\expandafter\addtot@b\expandafter{\temp@}}
-\newlength\LongInter
-\newlength\TotalInter
-
+\newlength\PfCLongInter%
+\newlength\PfCTableurLargeurUn%
+\newlength\PfCTableurLargeur%
+\setlength{\PfCTableurLargeurUn}{\useKV[Tableur]{LargeurUn}em}
+\setlength{\PfCTableurLargeur}{\useKV[Tableur]{Largeur}em}
\newenvironment{Tableur}[1][]{%
\useKVdefault[Tableur]%
\setKV[Tableur]{#1}%
+
\ttfamily%
- \newcolumntype Y{>{\centering\arraybackslash}p{\useKV[Tableur]{LargeurUn}em}}%
- \newcolumntype X{>{\centering\arraybackslash}p{\useKV[Tableur]{Largeur}em}}%
+ \newcolumntype Y{>{\centering\arraybackslash}wc{\PfCTableurLargeurUn}}%
+ \newcolumntype X{>{\centering\arraybackslash}wc{\PfCTableurLargeurUn}}%
\ifboolKV[Tableur]{Bandeau}{%
- \setlength{\LongInter}{\fpeval{\useKV[Tableur]{LargeurUn}+(\useKV[Tableur]{Colonnes}-2)*\useKV[Tableur]{Largeur}-4}em+\fpeval{\useKV[Tableur]{Colonnes}*2-6}\tabcolsep+\fpeval{\useKV[Tableur]{Colonnes}+1}\arrayrulewidth}%
- \begin{NiceTabular}{p{\useKV[Tableur]{Largeur}em}p{1em}p{5em}p{\LongInter}}%
+ \setlength{\PfCLongInter}{\fpeval{\useKV[Tableur]{LargeurUn}+(\useKV[Tableur]{Colonnes}-2)*\useKV[Tableur]{Largeur}-4}em+\fpeval{\useKV[Tableur]{Colonnes}*2-6}\tabcolsep+\fpeval{\useKV[Tableur]{Colonnes}+1}\arrayrulewidth}%
+ \begin{NiceTabular}{wc{\PfCTableurLargeur}wc{1em}wc{5em}wc{\PfCLongInter}}%
\Block[draw]{}{}\useKV[Tableur]{Cellule}&\Block[draw]{}{}\centering\arraybackslash\scriptsize$\blacktriangledown$&$f_x$\hfill$\sum$~\scriptsize$\blacktriangledown$\hfill$=$&\Block[draw]{}{}\useKV[Tableur]{Formule}\hfill\scriptsize$\blacktriangledown$\\
\end{NiceTabular}%
\nopagebreak
@@ -22568,10 +23246,10 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\global\cntcol\z@\global\advance\cntlin\@ne
\centering\arraybackslash
\ifnum\cntlin>\@ne
- \ifboolKV[Tableur]{Selection}{
+ \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}
- p{2em}Y*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{X}}[hvlines]%
+ wc{2em}Y*{\fpeval{\useKV[Tableur]{Colonnes}-1}}{X}}[hvlines]%
\CodeBefore
% on colorie en gris toute la première ligne
\tikz\draw[fill=gray!15](row-1-|col-1) rectangle (row-2-|last);%
@@ -22920,7 +23598,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%%%
% Papiers
%%%
-\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,PageEntiere=false,ZoneTexte=false,Baseline=false}%
+\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,IsometriquePointe=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,GrillePointe=-1,PageEntiere=false,ZoneTexte=false,Baseline=false}%
%\def\MPBaseLineSkip#1#2#3{%à retravailler : ne fonctionne pas :(
% %
@@ -22947,7 +23625,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\def\MPGrille#1#2#3#4{%
\ifluatex%
- %\mplibcodeinherit{enable}%
\mplibforcehmode%
\begin{mplibcode}%
path horizon,verticon;
@@ -22961,7 +23638,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
draw horizon shifted((0,(k/100)*cm));
endfor;
\end{mplibcode}%
- %\mplibcodeinherit{disable}%
\else%
\begin{mpost}%
path horizon,verticon;
@@ -22978,9 +23654,31 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\fi%
}%
+\def\MPGrillePointe#1#2#3#4{%
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}%
+ drawoptions(withcolor #3);
+ for k=0 step (#4*100) until (#1*100):
+ for l=0 step (#4*100) until (#2*100):
+ fill (cercles((0,0),1pt) shifted(((k/100)*cm,(l/100)*cm)));
+ endfor;
+ endfor;
+ \end{mplibcode}%
+ \else%
+ \begin{mpost}%
+ drawoptions(withcolor #3);
+ for k=0 step (#4*100) until (#1*100):
+ for l=0 step (#4*100) until (#2*100):
+ fill (cercles((0,0),0.5pt) shifted(((k/100)*cm,(l/100)*cm)));
+ endfor;
+ endfor;
+ \end{mpost}%
+ \fi%
+}%
+
\def\MPCinq#1#2#3{%
\ifluatex%
- %\mplibcodeinherit{enable}%
\mplibforcehmode%
\begin{mplibcode}%
path horizon,verticon;
@@ -22994,7 +23692,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
draw horizon shifted((0,k*cm));
endfor;
\end{mplibcode}%
- %\mplibcodeinherit{disable}%
\else%
\begin{mpost}
path horizon,verticon;
@@ -23013,7 +23710,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\def\MPSeyes#1#2#3{%
\ifluatex%
- %\mplibcodeinherit{enable}%
\mplibforcehmode%
\begin{mplibcode}%
path horizon,verticon;
@@ -23030,7 +23726,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
draw horizon shifted((0,(k/10)*cm)) withpen pencircle scaled 1.25;
endfor;
\end{mplibcode}%
- %\mplibcodeinherit{disable}%
\else%
\begin{mpost}%
path horizon,verticon;
@@ -23052,7 +23747,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\def\MPMillimetre#1#2#3{%
\ifluatex%
- %\mplibcodeinherit{enable}%
\mplibforcehmode%
\begin{mplibcode}%
path horizon,verticon;
@@ -23078,7 +23772,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
draw horizon shifted((0,k*cm)) withpen pencircle scaled 1.25;
endfor;
\end{mplibcode}%
- %\mplibcodeinherit{disable}%
\else%
\begin{mpost}%
path horizon,verticon;
@@ -23109,54 +23802,76 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\def\MPIsometrique#1#2#3{%
\ifluatex%
- %\mplibcodeinherit{enable}%
\mplibforcehmode%
\begin{mplibcode}%
path diagon,antidiagon;
diagon=(0,0)--#2*(sqrt(3)*cm,1*cm);
antidiagon=(0,0)--#2*(-sqrt(3)*cm,1*cm);
drawoptions(withcolor #3);
- for k=0 step 1 until #1:
- draw diagon shifted((k*cm,0));
- endfor;
- for k=0 step (sqrt(3)/3) until (#2):
- draw diagon shifted((0,k*cm));
- endfor;
for k=0 step 1 until (#1):
+ draw diagon shifted((k*cm,0));
draw antidiagon shifted((k*cm,0));
endfor;
for k=0 step (sqrt(3)/3) until (#2):
+ draw diagon shifted((0,k*cm));
draw antidiagon shifted((#1*cm,k*cm));
endfor;
clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
\end{mplibcode}%
- %\mplibcodeinherit{disable}%
\else%
\begin{mpost}%
path diagon,antidiagon;
diagon=(0,0)--#2*(sqrt(3)*cm,1*cm);
antidiagon=(0,0)--#2*(-sqrt(3)*cm,1*cm);
drawoptions(withcolor #3);
- for k=0 step 1 until #1:
+ for k=0 step 1 until (#1):
draw diagon shifted((k*cm,0));
+ draw antidiagon shifted((k*cm,0));
endfor;
for k=0 step (sqrt(3)/3) until (#2):
draw diagon shifted((0,k*cm));
+ draw antidiagon shifted((#1*cm,k*cm));
endfor;
- for k=0 step 1 until (#1):
- draw antidiagon shifted((k*cm,0));
+ clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
+ \end{mpost}%
+ \fi%
+}%
+
+\def\MPIsometriquePointe#1#2#3{%
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}%
+ pair diagon,antidiagon;
+ diagon=(1pt,1pt);
+ antidiagon=(1pt+0.5cm,1pt+0.5*(sqrt(3)*1cm/3));
+ drawoptions(withcolor #3);
+ for k=0 step (sqrt(3)/3) until (#2):
+ for l=0 step 1 until (#1):
+ fill (cercles(diagon,1pt) shifted((l*cm,k*cm)));
+ fill (cercles(antidiagon,1pt) shifted((l*cm,k*cm)));
endfor;
+ endfor;
+ clip currentpicture to polygone((0,0),(#1*cm+2pt,0),(#1*cm+2pt,#2*cm+1pt),(0,#2*cm+1pt));
+ \end{mplibcode}%
+ \else%
+ \begin{mpost}%
+ pair diagon,antidiagon;
+ diagon=(1pt,1pt);
+ antidiagon=(1pt+0.5cm,1pt+0.5*(sqrt(3)*1cm/3));
+ drawoptions(withcolor #3);
for k=0 step (sqrt(3)/3) until (#2):
- draw antidiagon shifted((#1*cm,k*cm));
+ for l=0 step 1 until (#1):
+ fill (cercles(diagon,1pt) shifted((l*cm,k*cm)));
+ fill (cercles(antidiagon,1pt) shifted((l*cm,k*cm)));
endfor;
- clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
+ endfor;
+ clip currentpicture to polygone((0,0),(#1*cm+2pt,0),(#1*cm+2pt,#2*cm+1pt),(0,#2*cm+1pt));
\end{mpost}%
\fi%
}%
\def\MPTriangulaire#1#2#3{%
\ifluatex%
- %\mplibcodeinherit{enable}%
\mplibforcehmode%
\begin{mplibcode}%
path horizon,diagon,antidiagon;
@@ -23181,7 +23896,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
endfor;
clip currentpicture to polygone((0,0),(#1*cm,0),(#1*cm,#2*cm),(0,#2*cm));
\end{mplibcode}%
- %\mplibcodeinherit{disable}%
\else%
\begin{mpost}%
path horizon,diagon,antidiagon;
@@ -23220,6 +23934,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\xdef\PapierHauteur{\useKV[Papiers]{Hauteur}}%
\xdef\PapierCouleur{\useKV[Papiers]{Couleur}}%
\xdef\PapierGrille{\useKV[Papiers]{Grille}}%
+ \xdef\PapierGrillePointe{\useKV[Papiers]{GrillePointe}}%
\checkoddpage%
\ifoddpage%
\setlength{\PapierLeftCurrent}{\oddsidemargin}%
@@ -23233,20 +23948,28 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\xdef\PapierLargeur{\fpeval{\textwidth/1cm}}%
\begin{tikzpicture}[remember picture,overlay]%
\node[anchor=south west,inner sep=0pt,transform canvas={xshift=\PapierLeft,yshift=\PapierBottom}] at (current page.south west) {%
- \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
- \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
- }{\ifboolKV[Papiers]{Baseline}{%
- \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{%
- \ifboolKV[Papiers]{Triangle}{%
- \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Millimetre}{%
- \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Isometrique}{%
- \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Seyes}{%
- \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ \xintifboolexpr{\useKV[Papiers]{GrillePointe}>0}{%
+ \MPGrillePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrillePointe}%
+ }{%
+ \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
+ \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
+ }{\ifboolKV[Papiers]{Baseline}{%
+ \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{%
+ \ifboolKV[Papiers]{IsometriquePointe}{%
+ \MPIsometriquePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{%
+ \ifboolKV[Papiers]{Triangle}{%
+ \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Millimetre}{%
+ \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Isometrique}{%
+ \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Seyes}{%
+ \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }%
+ }%
}%
}%
}%
@@ -23261,17 +23984,24 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\xdef\PapierLargeur{\fpeval{\paperwidth/1cm}}%
\begin{tikzpicture}[remember picture,overlay]%
\node[anchor=south west,inner sep=0pt] at (current page.south west) {%
- \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
- \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
- }{\ifboolKV[Papiers]{Triangle}{%
- \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Millimetre}{%
- \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Isometrique}{%
- \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Seyes}{%
- \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ \xintifboolexpr{\useKV[Papiers]{GrillePointe}>0}{%
+ \MPGrillePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrillePointe}%
+ }{%
+ \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
+ \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
+ }{\ifboolKV[Papiers]{IsometriquePointe}{%
+ \MPIsometriquePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Triangle}{%
+ \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Millimetre}{%
+ \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Isometrique}{%
+ \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Seyes}{%
+ \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }%
+ }%
}%
}%
}%
@@ -23280,20 +24010,28 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
};%
\end{tikzpicture}%
}{%
- \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
- \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
- }{\ifboolKV[Papiers]{Baseline}{%
- \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{%
- \ifboolKV[Papiers]{Triangle}{%
- \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Millimetre}{%
- \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Isometrique}{%
- \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Seyes}{%
- \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ \xintifboolexpr{\useKV[Papiers]{GrillePointe}>0}{%
+ \MPGrillePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrillePointe}%
+ }{%
+ \xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
+ \MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
+ }{\ifboolKV[Papiers]{Baseline}{%
+ \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{%
+ \ifboolKV[Papiers]{IsometriquePointe}{%
+ \MPIsometriquePointe{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{%
+ \ifboolKV[Papiers]{Triangle}{%
+ \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Millimetre}{%
+ \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Isometrique}{%
+ \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Seyes}{%
+ \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }%
+ }%
}%
}%
}%