From cd8bce9ed5e85d0004ab3a6e72567c435c81706c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 20 Apr 2024 19:26:56 +0000 Subject: profcollege (20apr24) git-svn-id: svn://tug.org/texlive/trunk@71018 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/profcollege/ProfCollege-doc.pdf | Bin 10211376 -> 10283168 bytes .../doc/latex/profcollege/ProfCollege-doc.zip | Bin 5713946 -> 5696000 bytes .../texmf-dist/metapost/profcollege/PfCObjets.mp | 257 +++++++++++ .../texmf-dist/metapost/profcollege/PfCScratch.mp | 7 +- .../latex/profcollege/PfCAssemblagesSolides.tex | 497 +++++++++++++++++++++ .../tex/latex/profcollege/PfCCartographie.tex | 3 + .../tex/latex/profcollege/PfCConversion.tex | 19 +- .../profcollege/PfCDecomposerNombrePremier.tex | 8 +- .../tex/latex/profcollege/PfCOperationsTrou.tex | 226 +++++++++- .../tex/latex/profcollege/PfCPixelArt.tex | 118 ++++- .../tex/latex/profcollege/PfCPythagore.tex | 2 +- .../tex/latex/profcollege/PfCReperage.tex | 12 +- .../tex/latex/profcollege/PfCStatistiques.tex | 9 +- .../texmf-dist/tex/latex/profcollege/PfCThales.tex | 14 +- .../tex/latex/profcollege/PfCTrigonometrie.tex | 4 +- .../texmf-dist/tex/latex/profcollege/PfCTrio.tex | 37 +- .../tex/latex/profcollege/ProfCollege.sty | 45 +- 17 files changed, 1202 insertions(+), 56 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/profcollege/PfCAssemblagesSolides.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf b/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf index 2d23d813a79..206f5547a10 100644 Binary files a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf and b/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip b/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip index 0f4669d0c0c..d1c1c1ac304 100644 Binary files a/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip and b/Master/texmf-dist/doc/latex/profcollege/ProfCollege-doc.zip differ diff --git a/Master/texmf-dist/metapost/profcollege/PfCObjets.mp b/Master/texmf-dist/metapost/profcollege/PfCObjets.mp index 3b47a88983d..fd2fbe0f2dd 100644 --- a/Master/texmf-dist/metapost/profcollege/PfCObjets.mp +++ b/Master/texmf-dist/metapost/profcollege/PfCObjets.mp @@ -42,6 +42,263 @@ Transparence:=false; boolean couleurz;%pour gérer l'affichage "des lignes" de niveaux couleurz:=false; + vardef AffichageObjetCylindre[]= + save _affi; + picture _affi; + color Fc[][];color cou[]; + tapj:=0; + for k=0 upto apj.@: + cpt[tapj]:=tapj; + Fc[tapj].nb:=OTFc.@[k].nb; + for l=1 upto Fc[tapj].nb: + Fc[tapj][l]:=OTFc.@[k][l]; + endfor; + Fc[tapj].iso:=OTFc.@[k].iso; + cou[tapj]:=if perso.@:scantokens(couleurperso) else: coul.@[k] fi; + ALT[tapj]:=ALT.@[k]; + Vue[tapj]:=Vue.@[k]; + tapj:=tapj+1; + endfor; + tapj:=tapj-1; + QS(0,tapj); + for k=0 step 1 until tapj: + if Vue[cpt[k]]=false: + draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2]) dashed dashpattern(on0.5 off2) withpen pencircle scaled0.25; + draw Projette(Fc[cpt[k]][3])--Projette(Fc[cpt[k]][4]) dashed dashpattern(on0.5 off2) withpen pencircle scaled0.25; + fi; + endfor; + n:=0; + for k=0 step 1 until tapj: + if Vue[cpt[k]]: +% label(""&decimal(cpt[k])&"",Projette(Fc[cpt[k]].iso)); + n:=n+1; + if n<3: + if cpt[k]>1: + vala[n]=cpt[k]; +% label.top(decimal(n)&"--"&decimal(vala[n]),n*u*(1,0)); + else: + n:=n-1; + fi; + fi; + if cpt[k]<1: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle;% withpen pencircle scaled0.25; + fi; + if cpt[k]>1: + draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2]);% withpen pencircle scaled0.25; + draw Projette(Fc[cpt[k]][3])--Projette(Fc[cpt[k]][4]);% withpen pencircle scaled0.25; + fi; + fi; + endfor; + if vala[1]1: + vala[n]=cpt[k]; +% label.top(decimal(n)&"--"&decimal(vala[n]),n*u*(1,0)); + else: + n:=n-1; + fi; + fi; + %if cpt[k]<1: + %draw for l=1 upto Fc[cpt[k]].nb: + % Projette(Fc[cpt[k]][l])-- + % endfor + % cycle withpen pencircle scaled0.25; + % fi; + if cpt[k]>1: + draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2]);% withpen pencircle scaled0.25; + draw Projette(Fc[cpt[k]][3])--Projette(Fc[cpt[k]][4]);% withpen pencircle scaled0.25; + fi; + fi; + endfor; + if vala[1]0: + n:=n+1; + if n<3: + if cpt[k]>1: + vala[n]:=cpt[k]; +% label.top(decimal(n)&"--"&decimal(vala[n]),n*u*(1,0)); + else: + n:=n-1; + fi; + fi; + draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2]);%withpen pencircle scaled0.25bp; + fi; + fi; + endfor; + if vala[1]0: + n:=n+1; + if n<3: + if cpt[k]>1: + vala[n]:=cpt[k]; +% label.top(decimal(n)&"--"&decimal(vala[n]),n*u*(1,0)); + else: + n:=n-1; + fi; + fi; + draw Projette(Fc[cpt[k]][1])--Projette(Fc[cpt[k]][2]);%withpen pencircle scaled0.25bp; + fi; + fi; + endfor; + if vala[1]1: + if Vue[cpt[k]]: + if cpt[k]}[\PrefixeDepart] - \StrBehind{#3}{>}[\PrefixeArrivee] + \StrBefore{#3}{>}[\PrefixeDepart]% + \StrBehind{#3}{>}[\PrefixeArrivee]% \ChoixUniteD{\PrefixeDepart}% \ChoixUniteA{\PrefixeArrivee}% \ifboolKV[ClesConversion]{Aire}{% \DeclareSIUnit{\TempoAvant}{\square}% \DeclareSIUnit{\TempoBase}{\meter} - \xdef\PfCConvExposant{2} + \xdef\PfCConvExposant{2}% }{\ifboolKV[ClesConversion]{Vol}{% \DeclareSIUnit{\TempoAvant}{\cubic}% \DeclareSIUnit{\TempoBase}{\meter} - \xdef\PfCConvExposant{3} + \xdef\PfCConvExposant{3}% }{% \DeclareSIUnit{\TempoAvant}{}% - \xdef\PfCConvExposant{1} + \xdef\PfCConvExposant{1}% }% }% \ifboolKV[ClesConversion]{Masses}{% @@ -67,14 +70,14 @@ \ifboolKV[ClesConversion]{Capas}{% \DeclareSIUnit{\TempoBase}{\liter}% }{}% - \ensuremath{ + \ensuremath{% \IfBooleanTF{#1}{% \IfStrEq{\PrefixeDepart}{t}{\DeclareSIUnit{\TempoBase}{\relax}}{}\IfStrEq{\PrefixeDepart}{q}{\DeclareSIUnit{\TempoBase}{\relax}}{} \SI{#4}{\TempoAvant\TempoPrefixeD\TempoBase} \IfStrEq{\PrefixeDepart}{t}{\DeclareSIUnit{\TempoBase}{\gram}}{}\IfStrEq{\PrefixeDepart}{q}{\DeclareSIUnit{\TempoBase}{\gram}}{} = \IfStrEq{\PrefixeArrivee}{t}{\DeclareSIUnit{\TempoBase}{\relax}}{}\IfStrEq{\PrefixeArrivee}{q}{\DeclareSIUnit{\TempoBase}{\relax}}{} - \PointsSuspension{\fpeval{#4*(10**((\ExposantD-(\ExposantA))*\PfCConvExposant))}\fpeval{#4*(10**((\ExposantD-(\ExposantA))*\PfCConvExposant))}}~\si{\TempoAvant\TempoPrefixeA\TempoBase} + \ifboolKV[ClesConversion]{Completes}{\setlength{\PfCConversionLongueur}{\useKV[ClesConversion]{Complete}}\pointilles[\PfCConversionLongueur]}{\PointsSuspension{\fpeval{#4*(10**((\ExposantD-(\ExposantA))*\PfCConvExposant))}\fpeval{#4*(10**((\ExposantD-(\ExposantA))*\PfCConvExposant))}}}~\si{\TempoAvant\TempoPrefixeA\TempoBase} \IfStrEq{\PrefixeArrivee}{t}{\DeclareSIUnit{\TempoBase}{\gram}}{}\IfStrEq{\PrefixeArrivee}{q}{\DeclareSIUnit{\TempoBase}{\gram}}{} }{% \ifboolKV[ClesConversion]{Sans}{% diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex b/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex index 3f11bb05b74..bf1a28e3334 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCDecomposerNombrePremier.tex @@ -43,7 +43,7 @@ Ancre0:=(0,0); racine:=#1; - label(btex \num{#1} etex,(0,0)); + label(TEX("\num{#1}"),(0,0)); forever: PremierSimple(racine); exitif racine=1; @@ -829,10 +829,12 @@ \end{tabular}% \else% \begin{tabular}{c|c} - 1&\num{#1}\\ + 1&\num{#1} + \ifnum\cnpT>2\relax\\ \xintFor* ##1 in {\xintSeq {1}{\fpeval{\cnpT/2}}}\do{% \DiviseurNumero{#1}{##1}\num{\fpeval{\dnpT}}\uppercase{&}\DiviseurNumero{#1}{##1}\num{\fpeval{#1/\dnpT}}\\ - } + } + \fi \end{tabular}% \fi% }% diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCOperationsTrou.tex b/Master/texmf-dist/tex/latex/profcollege/PfCOperationsTrou.tex index d26dbade32c..347ca499bcf 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCOperationsTrou.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCOperationsTrou.tex @@ -105,7 +105,7 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,fill=PfCSolOp,rounded corner \fi \opmul[decimalsepsymbol={,},lineheight=2em,columnwidth=1.5em,voperator=bottom,intermediarystyle=\stepcounter{divxlop}\color{PfCSolOp}\PfCchiffre{A\thedivxlop},resultstyle=\stepcounter{divxlop}\color{PfCSolOp}\PfCchiffre{A\thedivxlop},resultstyle.d=\color{PfCCouleurVirgule}]{#2}{#3}% \foreach \i in {1,...,\thedivxlop}{% - \PfCentoure{A\i}{A\i}% + \PfCentoure{A\i}{A\i}% }% \endgroup } @@ -168,4 +168,228 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,fill=PfCSolOp,rounded corner \foreach \i in {1,...,\thedivxlop}{% \PfCentoure{A\i}{A\i}% }% +}% + +%%%%%%%%%%%%%%%%%%%%% Colorees %%%%%%%%%%%%%%%%%%% +% Merci JCC +%%% Seule ligne à modifier selon la convenance %%% +\newcommand\couleurs{blue,red,green,blue,red,green,blue,red,green,blue,red,green}% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newcount\numint% +\newcount\indint% +\newcount\ind% +\def\nnil{\nil}% +\def\ExtraitCouleurs{% + \ind=0% + \expandafter\ExtraitCouleursAux\couleurs,\nil,% +}% +\def\ExtraitCouleursAux#1,{% + \def\arg{#1}% + \ifx\arg\nnil% + \edef\cmax{\the\ind}% + \else% + \def\couleur{#1}% + \stepcounter{coulxlop}% + \stepcounter{coulxlopa}% + \stepcounter{coulxlopd}% + \expandafter\edef\csname PfCOpCouleurs\Roman{coulxlop}\endcsname{\couleur}% + \expandafter\edef + \csname op@operandstyle.1.\the\numexpr\ind+1\endcsname{% + \noexpand\PfCchiffre{CA\thecoulxlop}% + }% + \expandafter\edef + \csname op@operandstyle.2.\the\numexpr\ind+1\endcsname{% + \noexpand\PfCchiffre{CB\thecoulxlopa}% + }% + \expandafter\edef + \csname op@resultstyle.\the\numexpr\ind+1\endcsname{% + \noexpand\PfCchiffre{CC\thecoulxlopd}% + }% + \numint = \numexpr\ind+1 + \indint = 1 + \ConstruitIntermediaire + \advance\ind by 1 + \expandafter\ExtraitCouleursAux + \fi +} +\def\ConstruitIntermediaire{% + \ifnum\numint>0 + \stepcounter{coulxlopi}% + \expandafter\edef\csname PfCOpCouleursi\Roman{coulxlopi}\endcsname{\couleur}% + \expandafter\edef + \csname op@intermediarystyle.\the\numint.\the\indint\endcsname{% + \noexpand\PfCchiffre{CD\thecoulxlopi}% + }% + \advance\indint by 1 + \advance\numint by -1 + \expandafter\ConstruitIntermediaire + \fi + } + \def\ConstruitRemainder{% + \ifnum\numint>0 + \stepcounter{coulxlopidiv}% + \expandafter\edef\csname PfCOpCouleursid\Roman{coulxlopidiv}\endcsname{\couleur}% + \expandafter\edef + \csname op@remainderystyle.\the\numint.\the\indint\endcsname{% + \noexpand\PfCchiffre{CE\thecoulxlopidiv}% + }% + \advance\indint by 1 + \advance\numint by -1 + \expandafter\ConstruitRemainder + \fi + } + +\newcounter{coulxlop}% +\newcounter{coulxlopi}% +\newcounter{coulxlopa}% +\newcounter{coulxlopd}% +\newcounter{coulxlopidiv}% +\newcounter{coulxlopcoul}% + +\newcommand\PfCentoureColor[2]{% + \expandafter\edef\csname RetiensCouleur\endcsname{\csname PfCOpCouleurs\Roman{coulxlopcoul}\endcsname}\colorlet{CouleurCadre}{\RetiensCouleur}% + \tikz[remember picture,overlay] \node[preaction={draw={CouleurCadre},ultra thick,opacity=1, + transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,inner sep=.55em,fit=(#1.center)(#2.center)]{};} + +\newcommand\PfCentoureColorR[3]{% + \expandafter\edef\csname RetiensCouleur\endcsname{\csname PfCOpCouleurs\Roman{coulxlopcoul}\endcsname}\colorlet{CouleurCadre}{\RetiensCouleur}% + \tikz[remember picture,overlay] \node[preaction={draw={CouleurCadre},ultra thick,opacity=1, + transform canvas={xshift=0em,yshift=0em}},rectangle,fill=PfCSolOp,rounded corners,ultra thick,inner sep=.55em,fit=(#1.center)(#2.center)]{};} + +\newcommand\PfCentoureColorI[2]{% + \expandafter\edef\csname RetiensCouleur\endcsname{\csname PfCOpCouleursi\Roman{coulxlopcoul}\endcsname}\colorlet{CouleurCadre}{\RetiensCouleur}% + \tikz[remember picture,overlay] \node[preaction={draw={CouleurCadre},ultra thick,opacity=1, + transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,inner sep=.55em,fit=(#1.center)(#2.center)]{};} + +\newcommand\PfCentoureColorIR[2]{% + \expandafter\edef\csname RetiensCouleur\endcsname{\csname PfCOpCouleursi\Roman{coulxlopcoul}\endcsname}\colorlet{CouleurCadre}{\RetiensCouleur}% + \tikz[remember picture,overlay] \node[preaction={draw={CouleurCadre},ultra thick,opacity=1, + transform canvas={xshift=0em,yshift=0em}},rectangle,fill=PfCSolOp,rounded corners,ultra thick,inner sep=.55em,fit=(#1.center)(#2.center)]{};} + +\newcommand\PfCentoureColorIdiv[2]{% + \expandafter\edef\csname RetiensCouleur\endcsname{\csname PfCOpCouleursid\Roman{coulxlopcoul}\endcsname}\colorlet{CouleurCadre}{\RetiensCouleur}% + \tikz[remember picture,overlay] \node[preaction={draw={CouleurCadre},ultra thick,opacity=1, +transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,inner sep=.55em,fit=(#1.center)(#2.center)]{};} + +\makeatletter +\long\def\ifnodedefined#1#2#3{% + \@ifundefined{pgf@sh@ns@#1}{#3}{#2}% +} +\makeatother + +\NewDocumentCommand\MultiplicationColore{omm}{% + \useKVdefault[ClesOperations]% + \setKV[ClesOperations]{#1}% + \setcounter{coulxlop}{0}% + \setcounter{coulxlopa}{0}% + \setcounter{coulxlopd}{0}% + \setcounter{coulxlopi}{0}% + \setcounter{coulxlopcoul}{0}% + \ifboolKV[ClesOperations]{Solution}{\colorlet{PfCSolOp}{\useKV[ClesOperations]{CouleurSolution}}}{\colorlet{PfCSolOp}{\useKV[ClesOperations]{CouleurFond}}}% + \ExtraitCouleurs% + \begingroup% + \setlength{\baselineskip}{1.75em}% + \StrLen{#3}[\PfCLongueurFacteurDeux]% + \ifnum\PfCLongueurFacteurDeux=1\relax% + \opset{lineheight=\baselineskip} % nécessaire + \else% + \opset{lineheight=\baselineskip,displayintermediary=all,displayshiftintermediary=all} % nécessaire + \fi% + \opmul[decimalsepsymbol={,},lineheight=1.75em,columnwidth=1.5em,voperator=bottom]{#2}{#3}% + \endgroup% + \foreach \i in {1,...,\thecoulxlop}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CA\i}{% + \PfCentoureColor{CA\i}{CA\i}% + }{} + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopa}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CB\i}{% + \PfCentoureColor{CB\i}{CB\i}% + }{} + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopd}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CC\i}{% + \ifboolKV[ClesOperations]{Solution}{\PfCentoureColor{CC\i}{CC\i}}{\PfCentoureColorR{CC\i}{CC\i}}% + }{} + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopi}{% + \stepcounter{coulxlopcoul}% +% La couleur est + \ifnodedefined{CD\i}{% + \ifboolKV[ClesOperations]{Solution}{\PfCentoureColorI{CD\i}{CD\i}}{\PfCentoureColorIR{CD\i}{CD\i}}% + }{}% + }% +}% + +\newcommand\AdditionColore[3][]{% + \useKVdefault[ClesOperations]% + \setKV[ClesOperations]{#1}% + \ifboolKV[ClesOperations]{Solution}{\colorlet{PfCSolOp}{\useKV[ClesOperations]{CouleurSolution}}}{\colorlet{PfCSolOp}{\useKV[ClesOperations]{CouleurFond}}}% + \setcounter{coulxlop}{0}% + \setcounter{coulxlopa}{0}% + \setcounter{coulxlopd}{0}% + \setcounter{coulxlopi}{0}% + \setcounter{coulxlopcoul}{0}% + \ExtraitCouleurs% + \opadd[decimalsepsymbol={,},lineheight=1.75em,columnwidth=1.5em,voperator=bottom]{#2}{#3}% + \foreach \i in {1,...,\thecoulxlop}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CA\i}{% + \PfCentoureColor{CA\i}{CA\i}% + }{}% + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopa}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CB\i}{% + \PfCentoureColor{CB\i}{CB\i}% + }{}% + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopd}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CC\i}{% + \ifboolKV[ClesOperations]{Solution}{\PfCentoureColor{CC\i}{CC\i}}{\PfCentoureColorR{CC\i}{CC\i}}% + }{}% + }% +}% + +\newcommand\SoustractionColore[3][]{% + \useKVdefault[ClesOperations]% + \setKV[ClesOperations]{#1}% + \ifboolKV[ClesOperations]{Solution}{\colorlet{PfCSolOp}{\useKV[ClesOperations]{CouleurSolution}}}{\colorlet{PfCSolOp}{\useKV[ClesOperations]{CouleurFond}}}% + \setcounter{coulxlop}{0}% + \setcounter{coulxlopa}{0}% + \setcounter{coulxlopd}{0}% + \setcounter{coulxlopi}{0}% + \setcounter{coulxlopcoul}{0}% + \ExtraitCouleurs% + \opsub[decimalsepsymbol={,},lineheight=1.75em,columnwidth=1.5em,voperator=bottom]{#2}{#3}% +\foreach \i in {1,...,\thecoulxlop}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CA\i}{% + \PfCentoureColor{CA\i}{CA\i}% + }{} + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopa}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CB\i}{% + \PfCentoureColor{CB\i}{CB\i}% + }{} + }% + \setcounter{coulxlopcoul}{0}% + \foreach \i in {1,...,\thecoulxlopd}{% + \stepcounter{coulxlopcoul}% + \ifnodedefined{CC\i}{% + \ifboolKV[ClesOperations]{Solution}{\PfCentoureColor{CC\i}{CC\i}}{\PfCentoureColorR{CC\i}{CC\i}}% + }{} + }% }% \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCPixelArt.tex b/Master/texmf-dist/tex/latex/profcollege/PfCPixelArt.tex index 06d0cfe95a3..77eecfcb428 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCPixelArt.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCPixelArt.tex @@ -4,8 +4,8 @@ \newtoks\toklistePANombre% \def\UpdatetoksPANombre#1\nil{\addtotok\toklistePANombre{"#1",}}% -\setKVdefault[ClesPixelArt]{Largeur=29,Hauteur=29,Solution=false,Lettres=ABCDEFGHIJK,Nombres=false,ListeCouleurs={Orange,Red,LightGray,Maroon,Purple,black,black,Plum,Orange,White,White},Unite=5mm} -\defKV[ClesPixelArt]{ListeNombres=\setKV[ClesPixelArt]{Nombres}} +\setKVdefault[ClesPixelArt]{Largeur=29,Hauteur=29,Solution=false,Lettres=ABCDEFGHIJK,Nombres=false,ListeCouleurs={Orange,Red,LightGray,Maroon,Purple,black,black,Plum,Orange,White,White},Unite=5mm,Geant=false,HauteurD=1,LargeurD=1,Complet=false,Numero=1,Separations=false}% +\defKV[ClesPixelArt]{ListeNombres=\setKV[ClesPixelArt]{Nombres}}% \NewDocumentCommand\PixelArt{o m}{% \toklistePANombre{}% @@ -16,7 +16,24 @@ \setsepchar{,}% \readlist*\ListePANombre{\ListeAvantNombres}% \foreachitem\compteur\in\ListePANombre{\expandafter\UpdatetoksPANombre\compteur\nil}% - \BuildPixelArt{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}% + \ifboolKV[ClesPixelArt]{Geant}{% + % Découpe en hauteur : \fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}\\ + % Découpe en largeur : \fpeval{\useKV[ClesPixelArt]{Largeur}/\useKV[ClesPixelArt]{LargeurD}-1}}\par + \ifboolKV[ClesPixelArt]{Complet}{% + \xintFor* ##1 in{\xintSeq{0}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}-1}}}\do{% + \xintFor* ##2 in{\xintSeq{0}{\fpeval{\useKV[ClesPixelArt]{Largeur}/\useKV[ClesPixelArt]{LargeurD}-1}}}\do{% + \fpeval{##1*\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}+##2} : \BuildPixelArtGeant{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}{##1}{##2}\\% + }% + }% + }{% + \quotient{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}}% + \modulo{\fpeval{\useKV[ClesPixelArt]{Numero}-1}}{\fpeval{\useKV[ClesPixelArt]{Hauteur}/\useKV[ClesPixelArt]{HauteurD}}}% +% quotient = \the\intquotient -- remainder = \the\remainder : + \BuildPixelArtGeant{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}{\the\intquotient}{\the\remainder}% + }% + }{% + \BuildPixelArt{#2}{\useKV[ClesPixelArt]{Lettres}}{\ListeAvantCouleurs}{\the\toklistePANombre}% + }% }% \NewDocumentCommand\BuildPixelArt{m m m m}{% @@ -25,10 +42,15 @@ \begin{mplibcode} largeur:=\useKV[ClesPixelArt]{Largeur}; hauteur:=\useKV[ClesPixelArt]{Hauteur}; + largeurd:=\useKV[ClesPixelArt]{LargeurD}; + hauteurd:=\useKV[ClesPixelArt]{HauteurD}; Unite:=\useKV[ClesPixelArt]{Unite}; - boolean Solution,Nombres; + + boolean Solution,Nombres,Separations; Solution:=\useKV[ClesPixelArt]{Solution}; Nombres:=\useKV[ClesPixelArt]{Nombres}; + Separations:=\useKV[ClesPixelArt]{Separations}; + string BaseLettres; BaseLettres=str #2; numeric EchelleScale; @@ -84,6 +106,16 @@ enddef; Lecturecsv("#1"); + if Separations: + drawoptions(withcolor Purple); + for k=hauteur step -hauteurd until 0: + draw (Unite*(-1,k-0.5)--Unite*(largeur,k-0.5)) withpen pencircle scaled 1.25; + endfor; + for k=0 step largeurd until largeur: + draw (Unite*(k-0.5,hauteur+0.125)--Unite*(k-0.5,-0.875)) withpen pencircle scaled 1.25; + endfor; + drawoptions(); + fi; \end{mplibcode} \else \begin{mpost}[mpsettings={largeur:=\useKV[ClesPixelArt]{Largeur}; hauteur:=\useKV[ClesPixelArt]{Hauteur}; Unite:=\useKV[ClesPixelArt]{Unite}; boolean Solution,Nombres; Solution:=\useKV[ClesPixelArt]{Solution}; Nombres:=\useKV[ClesPixelArt]{Nombres};}] @@ -142,4 +174,82 @@ Lecturecsv("#1"); \end{mpost} \fi +} + +\NewDocumentCommand\BuildPixelArtGeant{m m m m m m}{% + \ifluatex + \mplibforcehmode + \begin{mplibcode} + largeur:=\useKV[ClesPixelArt]{Largeur}; + hauteur:=\useKV[ClesPixelArt]{Hauteur}; + largeurd:=\useKV[ClesPixelArt]{LargeurD}; + hauteurd:=\useKV[ClesPixelArt]{HauteurD}; + + Unite:=\useKV[ClesPixelArt]{Unite}; + + boolean Solution,Nombres; + Solution:=\useKV[ClesPixelArt]{Solution}; + Nombres:=\useKV[ClesPixelArt]{Nombres}; + + string BaseLettres; + BaseLettres=str #2; + + numeric EchelleScale; + EchelleScale=Unite/5mm; + + color ColorEntier[],ColFond; + n:=0; + for p_=#3: + n:=n+1; + ColorEntier[n]:=p_; + endfor; + + string RetiensNombres[]; + if Nombres: + n:=0; + for p_=#4: + n:=n+1; + RetiensNombres[n]=p_; + endfor; + fi; + + vardef Lecturecsv(expr nomfichier)= + % for h=hauteur-#5*hauteurd downto hauteur-(#5+1)*hauteurd: + for h=hauteur downto 1: + string p_; + p_=readfrom nomfichier; + l:=0; + if (h>hauteur-(#5+1)*hauteurd) and (h-pasx: - minx:=-pasx-1; - fi; +% if maxx-pasx: +% minx:=-pasx-1; +% fi; % if DemiDroite: minx:=0; diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex b/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex index 0ae0894e969..6223f887cd4 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCStatistiques.tex @@ -20,7 +20,7 @@ Largeur=1cm,Precision=2,PrecisionF=0,Donnee=Valeurs,Effectif=Effectif,Grille=fal % Pour les diags batons EpaisseurBatons=1,ListeCouleursB={a},Lecture=false,LectureFine=false,AideLecture=false,Reponses=false,DonneesSup=false,AbscisseRotation=false,Tiret=false,AngleRotationAbscisse=0,Pasx=1,Pasy=1,Unitex=0.5,Unitey=0.5,Depart=0,CouleurDefaut=black,Date=false,GrandNombrey=false,GrandNombrex=false,PasGrillex=1,PasGrilley=1,% % Pour les diags circulaires -Rayon=3cm,AffichageAngle=false,AffichageDonnee=false,ListeCouleurs={white},Hachures=false,ListeHachures={60},LectureInverse=false,EcartHachures=0.25,EpaisseurHachures=1,Legende,LegendeVide=false,ACompleter=false,DebutAngle=0,% +Rayon=3cm,AffichageAngle=false,AffichageDonnee=false,ListeCouleurs={white},Hachures=false,ListeHachures={60},LectureInverse=false,EcartHachures=0.25,EpaisseurHachures=1,Legende,LegendeVide=false,ACompleter=false,DebutAngle=0,%on utilisera également la clé CouleurDefaut %Pour les représentations Representation=false,% %Pour les barres horizontales @@ -856,6 +856,8 @@ ModeleCouleur=5% Retour=false; ACompleter=\useKV[ClesStat]{ACompleter}; DebutAngle=\useKV[ClesStat]{DebutAngle}; + color CoulDefaut; + CoulDefaut=\useKV[ClesStat]{CouleurDefaut}; % pair A[],O,B[],C[],D[]; O=(0,0); @@ -965,7 +967,12 @@ ModeleCouleur=5% n:=0; for p_=#3: n:=n+1; + % Col[n]=p_; + if color p_: Col[n]=p_; + else: + Col[n]=CoulDefaut; + fi; endfor; % on r\'ecup\`ere les angles d'hachures numeric anglehach[]; diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCThales.tex b/Master/texmf-dist/tex/latex/profcollege/PfCThales.tex index ea01972c256..d4adb5be013 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCThales.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCThales.tex @@ -175,10 +175,10 @@ % #4 point sur le segment #1#2 % #5 point sur le segment #1#3 \ifluatex - \mplibcodeinherit{enable} +% \mplibcodeinherit{enable} \mplibforcehmode \begin{mplibcode} - defaultcolormodel := \useKV[ClesThales]{ModeleCouleur}; + defaultcolormodel := \useKV[ClesThales]{ModeleCouleur}; u:=\useKV[ClesThales]{Echelle}; pair A,B,C,M,N,O;% %On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure @@ -213,7 +213,7 @@ fill (fullcircle scaled 0.75mm) shifted (cotes1 intersectionpoint cotes4); fill (fullcircle scaled 0.75mm) shifted (cotes3 intersectionpoint cotes4); \end{mplibcode} - \mplibcodeinherit{disable} +% \mplibcodeinherit{disable} \else \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};}] pair A,B,C,M,N,O;% @@ -261,7 +261,7 @@ % #5 point sur la droite #1#3 \ifluatex \mplibforcehmode - \mplibcodeinherit{enable} +% \mplibcodeinherit{enable} \begin{mplibcode} defaultcolormodel := \useKV[ClesThales]{ModeleCouleur}; u:=\useKV[ClesThales]{Echelle}; @@ -343,7 +343,7 @@ label(btex $//$ etex ,K); drawoptions(); \end{mplibcode} - \mplibcodeinherit{disable} +% \mplibcodeinherit{disable} \else \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};boolean CouleursNum,CouleursDen; CouleursNum=\useKV[ClesThales]{CouleursNum}; @@ -435,7 +435,7 @@ % #5 point sur la droite #1#3 \ifluatex \mplibforcehmode - \mplibcodeinherit{enable} +% \mplibcodeinherit{enable} \begin{mplibcode} defaultcolormodel := \useKV[ClesThales]{ModeleCouleur}; u:=\useKV[ClesThales]{Echelle}; @@ -479,7 +479,7 @@ fill (fullcircle scaled 0.75mm) shifted (cotes1 intersectionpoint cotes2); fill (fullcircle scaled 0.75mm) shifted (cotes3 intersectionpoint cotes2); \end{mplibcode} - \mplibcodeinherit{disable} +% \mplibcodeinherit{disable} \else \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};}] pair A,B,C,M,N,O;% diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCTrigonometrie.tex b/Master/texmf-dist/tex/latex/profcollege/PfCTrigonometrie.tex index c31076e010a..38fe05ce606 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCTrigonometrie.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCTrigonometrie.tex @@ -209,7 +209,7 @@ % #6 hyp % #7 angle de rotation \ifluatex - \mplibcodeinherit{enable} +% \mplibcodeinherit{enable} \mplibforcehmode \begin{mplibcode} defaultcolormodel := \useKV[ClesTrigo]{ModeleCouleur}; @@ -278,7 +278,7 @@ fi; fi; \end{mplibcode} -\mplibcodeinherit{disable} +%\mplibcodeinherit{disable} \else \begin{mpost}[mpsettings={u:=\useKV[ClesTrigo]{Echelle};}] u:=1cm; diff --git a/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex b/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex index beee6278fa8..560258ff59d 100644 --- a/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex +++ b/Master/texmf-dist/tex/latex/profcollege/PfCTrio.tex @@ -1,7 +1,7 @@ \newlength\PfCTrioHauteur% \newcounter{PfCTrioLettre}% -\setKVdefault[Trio]{Largeur=15pt,Graines=false,Repere=false,Cibles=false,Ligne=1,Colonne=1,Vide=false,VideRepere=false,Relatifs=false,Ecole=false,Horizontal=false,Vertical=false,DiagonaleM=false,DiagonaleD=false,NonAlea=false,NbSolutions=false}% +\setKVdefault[Trio]{Largeur=15pt,Graines=false,Repere=false,Cibles=false,Ligne=1,Colonne=1,Vide=false,VideRepere=false,Relatifs=false,Ecole=false,Horizontal=false,Vertical=false,DiagonaleM=false,DiagonaleD=false,NonAlea=false,NbSolutions=false,IntroRelatifs=false}% \defKV[Trio]{Graine=\setKV[Trio]{Graines}}% \defKV[Trio]{Cible=\setKV[Trio]{Cibles}}% \defKV[Trio]{Liste=\setKV[Trio]{NonAlea}}% @@ -20,18 +20,29 @@ }% \NewDocumentCommand\TrioTestCible{O{\useKV[Trio]{Cible}}mmm}{% - \xintifboolexpr{% - \fpeval{#2*#3+#4}==#1% - || \fpeval{#2*#3-#4}==#1% - || \fpeval{#3*#4+#2}==#1% - || \fpeval{#3*#4-#2}==#1% - || \fpeval{#4*#2+#3}==#1% - || \fpeval{#4*#2-#3}==#1% - % ajout pour une cible négative - || \fpeval{#3-#4*#2}==#1% - || \fpeval{#4-#2*#3}==#1% - || \fpeval{#2-#3*#4}==#1% - }{\xdef\PfCRetourTestCible{1}}{\xdef\PfCRetourTestCible{0}}% + \ifboolKV[Trio]{IntroRelatifs}{% + \xintifboolexpr{% + \fpeval{#2*#3+#4}==#1% + || \fpeval{#2*#3-#4}==#1% + || \fpeval{#3*#4+#2}==#1% + || \fpeval{#3*#4-#2}==#1% + || \fpeval{#4*#2+#3}==#1% + || \fpeval{#4*#2-#3}==#1% + % ajout pour une cible négative + || \fpeval{#3-#4*#2}==#1% + || \fpeval{#4-#2*#3}==#1% + || \fpeval{#2-#3*#4}==#1% + }{\xdef\PfCRetourTestCible{1}}{\xdef\PfCRetourTestCible{0}}% + }{% + \xintifboolexpr{% + \fpeval{#2*#3+#4}==#1% + || \fpeval{#2*#3-#4}==#1% + || \fpeval{#3*#4+#2}==#1% + || \fpeval{#3*#4-#2}==#1% + || \fpeval{#4*#2+#3}==#1% + || \fpeval{#4*#2-#3}==#1% + }{\xdef\PfCRetourTestCible{1}}{\xdef\PfCRetourTestCible{0}}% + }% }% \NewDocumentCommand\Trio{o}{% diff --git a/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty b/Master/texmf-dist/tex/latex/profcollege/ProfCollege.sty index d09cfda9889..3963e71e7d6 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{2024/03/24}% +\def\filedate{2024/04/20}% \let\PfCfiledate\filedate% -\def\fileversion{0.99-A-b}% +\def\fileversion{0.99-A-c}% \let\PfCfileversion\fileversion% \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]% @@ -39,7 +39,7 @@ % mathématiques \RequirePackage{siunitx}% \sisetup{% - locale=FR,%mode = match, + locale=FR,mode = match, propagate-math-font = true,% reset-math-version = false, reset-text-family = false,% reset-text-series = false, reset-text-shape = false,% @@ -326,12 +326,40 @@ \IfNoValueTF{#1}{\Dotfill}{\makebox[#1]{\Dotfill}}% }% +%\NewDocumentCommand\Lignespointilles{m}{% +% \xintifboolexpr{\fpeval{#1}>1}{% +% \xintFor* ##1 in {\xintSeq {1}{\fpeval{#1}}}\do{% +% \pointilles\par% +% }% +% }{}% +%}% + +\NewDocumentCommand\PfCNbLignesRestantes{}{% + \edef\measurepage{\dimexpr\pagegoal-\pagetotal\relax}% + \xintifboolexpr{\fpeval{\the\measurepage}>\fpeval{\the\textheight}}{ +% Toto + \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}{% - \xintifboolexpr{\fpeval{#1}>1}{% - \xintFor* ##1 in {\xintSeq {1}{\fpeval{#1}}}\do{% - \pointilles\par% - }% - }{}% + \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 @@ -759,6 +787,7 @@ \def\PfCSymbolTimes{\times}% \def\PfCSymbolDiv{\div}% +\input{PfCAssemblagesSolides} \input{PfCTicketCaisse} \input{PfCRecyclage} \input{PfCDontCountDots} -- cgit v1.2.3