summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/proflycee
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/proflycee')
-rw-r--r--macros/latex/contrib/proflycee/README.md12
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1788630 -> 2316850 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdfbin74004 -> 80865 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty406
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty357
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdfbin0 -> 2781 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdfbin0 -> 1857 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdfbin0 -> 154573 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdfbin0 -> 1480 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdfbin0 -> 1484 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdfbin0 -> 2764 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdfbin0 -> 1713 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdfbin0 -> 119155 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdfbin0 -> 8987 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdfbin0 -> 8987 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdfbin0 -> 8988 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdfbin0 -> 8348 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdfbin0 -> 3347 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdfbin0 -> 3291 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdfbin0 -> 2759 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdfbin0 -> 1763 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdfbin0 -> 98514 bytes
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-aleatoire.tex8
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex21
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex182
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex146
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex136
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex3
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex1
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex165
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex569
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex130
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex189
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-suites.tex6
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex30
35 files changed, 2283 insertions, 78 deletions
diff --git a/macros/latex/contrib/proflycee/README.md b/macros/latex/contrib/proflycee/README.md
index 11502d6f77..9b96a17168 100644
--- a/macros/latex/contrib/proflycee/README.md
+++ b/macros/latex/contrib/proflycee/README.md
@@ -1,13 +1,15 @@
You are a french mathematics teacher ?
proflycee may be a useful package to daily use of LaTeX.
-----------------
+-----------------------------------------------------------------------------
Vous êtes un enseignant de mathématiques en lycée ?
proflycee est un package qui pourra vous aider à utiliser LaTeX au quotidien.
-----------------
+-----------------------------------------------------------------------------
-Author : Cédric Pierquet
-email : cpierquet@outlook.fr
-Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+Author : Cédric Pierquet
+email : cpierquet@outlook.fr
+Licences : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+ CC0 for cliparts (from openclipart)
+ CC BY-SA 3.0 (from Mark Wibrow helping code)
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index 40cb330c40..377ad4b07a 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
index 5e6698109f..e9dc581cd8 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty b/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty
new file mode 100644
index 0000000000..35d42aec31
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty
@@ -0,0 +1,406 @@
+% Author.............: C. Pierquet
+% licence............: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% licence cliparts...: CC0 from openclipart
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ProfLycee-Light}[2025/02/10 1.00c Aide pour l'utilisation de LaTeX en lycee]
+%1.00c Ajout d'aliases en \pfl....
+%1.00b Changement du préfixage de certaines commandes + \logo calculatrice interdite
+%1.00a Refonte du fonctionnement
+
+%%=====Mathtools (la base)
+\RequirePackage{mathtools}
+
+%%=====Option(s)
+\newif\if@xcolor \@xcolorfalse
+\newif\if@build \@buildfalse
+\newif\if@loadamssymb \@loadamssymbtrue
+\newif\if@warningsoff \@warningsofffalse
+\newif\if@loadtikzbabel \@loadtikzbabeltrue
+\DeclareOption{xcolor}{\@xcolortrue}%
+\DeclareOption{build}{\@buildtrue}%
+\DeclareOption{nonamssymb}{\@loadamssymbfalse}%
+\DeclareOption{warningsoff}{\@warningsofftrue}%
+\DeclareOption{nontikzbabel}{\@loadtikzbabelfalse}%
+\DeclareOption*{}
+\ProcessOptions\relax
+
+%%=====Packages utiles et indispensables
+\if@loadamssymb
+ \RequirePackage{amssymb}
+\fi
+\if@warningsoff
+ \PassOptionsToPackage{warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math}
+\fi
+\if@xcolor
+ \RequirePackage[table,svgnames]{xcolor}%Gestion des couleurs
+\fi
+\RequirePackage{iftex}
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\usetikzlibrary{decorations,decorations.pathreplacing,decorations.markings,arrows,arrows.meta,shapes.geometric,decorations.pathmorphing}
+\if@loadtikzbabel
+ \usetikzlibrary{babel}
+\fi
+\RequirePackage{ifthen}
+\RequirePackage{xstring}
+\RequirePackage{xintexpr}
+\RequirePackage{xintbinhex}
+\RequirePackage{xinttools}
+\RequirePackage{randomlist}
+\RequirePackage{simplekv}
+\RequirePackage{listofitems}
+\RequirePackage{tkz-tab}
+\RequirePackage{tabularray}
+\RequirePackage{settobox}
+\RequirePackage{hologo}
+\RequirePackage{fancyvrb}
+\RequirePackage{nicefrac}
+\RequirePackage{siunitx}
+\sisetup{%
+ locale=FR,output-decimal-marker={,},%
+ mode=match,propagate-math-font=true,%
+ reset-math-version=false,reset-text-family=false,%
+ reset-text-series=false,reset-text-shape=false,%
+ text-family-to-math=true,text-series-to-math=true,%
+ group-minimum-digits=4%
+}%
+\RequirePackage{fontawesome5}
+\RequirePackage{tcolorbox}%
+\tcbuselibrary{breakable,fitting,skins,listings,listingsutf8,hooks}
+
+%%=====COULEUR PERSO
+\definecolor{CouleurVertForet}{HTML}{1F8B36} %ForestGreen
+
+%%=====COMMANDES DE BASES xint/siunitx
+\NewDocumentCommand\pflnum{ s D<>{} O{} m }{%version consolidée
+ %1 := version étoilée pour arrondi (normal) / - avant la fraction éventuelle
+ \IfEq{#2}{}%argument <> vide := entier/décimal -> checked
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \IfEq{#3}{}{\num{\xintfloateval{#4}}}{\num{\xintfloateval{round(#4,#3)}}}%
+ }%
+ {%
+ \num{\xintiieval{#4}}%
+ }%
+ }%
+ {}%
+ \IfEq{#2}{frac}%argument <frac> := fraction -> checked
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \pflnumfrac*[#3]{#4}%
+ }%
+ {%
+ \pflnumfrac[#3]{#4}%
+ }%
+ }%
+ {}%
+ \IfEq{#2}{rad}%argument <rad> := angle radian -> checked (juste le - devant...)
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \pflnumrad*[#3]{#4}%
+ }%
+ {%
+ \pflnumrad[#3]{#4}%
+ }%
+ }%
+ {}%
+ \IfEq{#2}{rac}%
+ {%
+ \pflnumsqrt[#3]{#4}%
+ }%
+ {}%
+ \IfEq{#2}{annee}%
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \IfEq{#3}{}{\num[digit-group-size=5]{\xintfloateval{#4}}}{\num[digit-group-size=5]{\xintfloateval{round(#4,#3)}}}%
+ }%
+ {%
+ \num[digit-group-size=5]{\xintiieval{#4}}%
+ }%
+ }%
+ {}%
+}
+
+\DeclareDocumentCommand\pflnumsqrt{ O{} m }{% argument mandataire {calcul ou fraction}
+ \xdef\calculargument{\xintIrr{\xinteval{#2}}}%
+ \xintifboolexpr{\calculargument == 1}%
+ {%
+ \ensuremath{1}%
+ }%
+ {%
+ \IfEndWith{\calculargument}{/1}%
+ {%si c'est un entier !
+ \xdef\calculargument{\xintiieval{#2}}%
+ \xdef\ExtractRacStop{\xintiFloor{\xintfloateval{sqrt(\calculargument)}}}%
+ \xintFor* ##1 in {\xintSeq{1}{\ExtractRacStop}}\do{%
+ \xintifboolexpr{ \xintiiRem{\calculargument}{\xintiieval{##1*##1}} == 0}%si le carré divise
+ {\xdef\ExtractRacID{##1}}%
+ {}%
+ }%
+ \xdef\ExtracReste{\xintiieval{\calculargument/(\ExtractRacID*\ExtractRacID)}}%
+ \ensuremath{\xintifboolexpr{\ExtractRacID == 1 && \ExtracReste == 1}%
+ {1}%
+ { \xintifboolexpr{\ExtractRacID == 1}{}{\num{\xintiieval{\ExtractRacID}}}%
+ \xintifboolexpr{\ExtracReste == 1}{}{\sqrt{\num{\ExtracReste}}} }%
+ }%
+ }%
+ {%on va mettre sous forme a\sqrt(d)/b := buggue avec des millièmes...
+ \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur
+ \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur
+ \xdef\ExtractRacNNum{\xintiieval{\numerateur*\denominateur}}%
+ \xdef\ExtractRacStop{\xintiFloor{\xintfloateval{sqrt(\ExtractRacNNum)}}}%
+ \xintFor* ##1 in {\xintSeq{1}{\ExtractRacStop}}\do{%
+ \xintifboolexpr{ \xintiiRem{\ExtractRacNNum}{\xintiieval{##1*##1}} == 0}%si le carré divise
+ {\xdef\ExtractRacID{##1}}%
+ {}
+ }%
+ \xdef\ExtractRacGCD{\xintiiGCD{\ExtractRacID}{\denominateur}}%
+ \xdef\RacNumSimpl{\xintiieval{\ExtractRacID/\ExtractRacGCD}}%simpl num
+ \xdef\RacDenomSimpl{\xintiieval{\denominateur/\ExtractRacGCD}}%
+ \xdef\RacRacSimpl{\xintiieval{\ExtractRacNNum/(\ExtractRacID*\ExtractRacID)}}%
+ \IfEq{#1}{}%fraction classique
+ {%
+ \ensuremath{\frac{%
+ \xintifboolexpr{\RacNumSimpl == 1 && \RacRacSimpl == 1}%
+ {1}%
+ { \xintifboolexpr{\RacNumSimpl == 1}{}{\RacNumSimpl} \xintifboolexpr{\RacRacSimpl == 1}{}{\sqrt{\num{\RacRacSimpl}}} }%
+ }%
+ { \RacDenomSimpl }}%
+ }%
+ {}%
+ \IfEq{#1}{d}%dfraction
+ {%
+ \ensuremath{\dfrac{%
+ \xintifboolexpr{\RacNumSimpl == 1 && \RacRacSimpl == 1}%
+ {1}%
+ { \xintifboolexpr{\RacNumSimpl == 1}{}{\RacNumSimpl} \xintifboolexpr{\RacRacSimpl == 1}{}{\sqrt{\num{\RacRacSimpl}}} }%
+ }%
+ { \RacDenomSimpl }}%
+ }%
+ {}%
+ \IfEq{#1}{n}%nfraction
+ {%
+ \ensuremath{\nicefrac{%
+ \xintifboolexpr{\RacNumSimpl == 1 && \RacRacSimpl == 1}%
+ {1}%
+ { \xintifboolexpr{\RacNumSimpl == 1}{}{\RacNumSimpl} \xintifboolexpr{\RacRacSimpl == 1}{}{\sqrt{\num{\RacRacSimpl}}} }%
+ }%
+ { \RacDenomSimpl }}%
+ }%
+ {}%
+ }%
+}%
+}
+
+\NewDocumentCommand\pflnumfrac{ s O{} m }{%patch xinttotexfrac
+ %*=moins sur le numérateur
+ %2=argument.optionnel[d/t/dec=...]
+ %3=argument mandataire {calcul ou fraction}
+ \xdef\calculargument{\xintPRaw{\xintIrr{\xinteval{#3}}}}%on calcule et on transforme en A/B
+ \IfSubStr{\calculargument}{/}%on teste si le symbole / apparaît
+ {%si oui := fraction
+ \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur
+ \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur
+ \ifblank{#2}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{d}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\dfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{t}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\tfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{n}%
+ {%
+ {\ensuremath{\nicefrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfSubStr{#2}{dec}%on veut la forme décimale
+ {%
+ \IfSubStr{#2}{=}%si on rajoute une précision
+ {%
+ \StrBehind{#2}{=}[\precdecimal]%
+ \ensuremath{\num{\xintfloateval{round(#3,\precdecimal)}}}%
+ }%
+ {%
+ \ensuremath{\num{\xintfloateval{#3}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ }%
+ {%si non := entier
+ \num{\calculargument}%on affiche l'entier, avec le package siunitx
+ }%
+}
+
+\NewDocumentCommand\pflnumrad{ s O{} m }{%
+ %1 = options
+ %2 = angle sous la forme a*pi/b
+ \StrDel{#3}{pi}[\MPargument]%
+ \IfBeginWith{#3}{pi}%
+ {\StrSubstitute{#3}{pi}{1}[\MPargument]}%
+ {}%
+ \IfBeginWith{#3}{-pi}%
+ {\StrSubstitute{#3}{pi}{1}[\MPargument]}%
+ {}%
+ %on conserve les données initiales
+ \IfSubStr{\MPargument}{/}%on coupe numérateur/dénominateur
+ {\StrCut{\MPargument}{/}\MPnumerateurinit\MPdenominateurinit}%
+ {\xdef\MPnumerateurinit{\MPargument}\xdef\MPdenominateurinit{1}}%
+ %on affiche le début, avant simplification
+ \IfStrEq{#2}{d}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \displaystyle\IfBooleanT{#1}{-}\frac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{\IfBooleanTF{#1}{}{-}\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{ \IfBooleanTF{#1}{\xinteval{abs(\MPnumerateurinit)}}{\MPnumerateurinit} }\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ \IfStrEq{#2}{t}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \IfBooleanT{#1}{-}\tfrac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{ \IfBooleanTF{#1}{\xinteval{abs(\MPnumerateurinit)}}{\MPnumerateurinit} }\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ \IfStrEq{#2}{}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \IfBooleanT{#1}{-}\frac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{ \IfBooleanTF{#1}{\xinteval{abs(\MPnumerateurinit)}}{\MPnumerateurinit} }\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ \IfStrEq{#2}{n}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \nicefrac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+}
+
+%%=====LIBRAIRIES/BIBIOTHÈQUES
+\newcommand\useproflyclib[1]{%ajout d'une commande "librairie" pour charger des modules
+ \IfSubStr{#1}{most}{%
+ \input{proflycee-tools-analyse.tex}
+ \input{proflycee-tools-graphiques.tex}
+ \input{proflycee-tools-listings.tex}
+ \input{proflycee-tools-trigo.tex}
+ \input{proflycee-tools-probas.tex}
+ \input{proflycee-tools-stats.tex}
+ \input{proflycee-tools-arithm.tex}
+ \input{proflycee-tools-aleatoire.tex}
+ \input{proflycee-tools-suites.tex}
+ \input{proflycee-tools-cliparts.tex}
+ }%
+ {%
+ \IfSubStr{#1}{analyse}{\input{proflycee-tools-analyse.tex}}{}%
+ \IfSubStr{#1}{graphiques}{\input{proflycee-tools-graphiques.tex}}{}%
+ \IfSubStr{#1}{listings}{\input{proflycee-tools-listings.tex}}{}%
+ \IfSubStr{#1}{trigo}{\input{proflycee-tools-trigo.tex}}{}%
+ \IfSubStr{#1}{probas}{\input{proflycee-tools-probas.tex}}{}%
+ \IfSubStr{#1}{stats}{\input{proflycee-tools-stats.tex}}{}%
+ \IfSubStr{#1}{arithm}{\input{proflycee-tools-arithm.tex}}{}%
+ \IfSubStr{#1}{aleatoire}{\input{proflycee-tools-aleatoire.tex}}{}%
+ \IfSubStr{#1}{suites}{\input{proflycee-tools-suites.tex}}{}%
+ \IfSubStr{#1}{geom}{\input{proflycee-tools-geom.tex}}{}%
+ \IfSubStr{#1}{cliparts}{\input{proflycee-tools-cliparts.tex}}{}%
+ }%
+ \IfSubStr{#1}{piton}{\input{proflycee-tools-piton.tex}}{}%
+ \IfSubStr{#1}{espace}{\input{proflycee-tools-espace.tex}}{}%
+ \IfSubStr{#1}{ecritures}{\input{proflycee-tools-ecritures.tex}}{}%
+ \IfSubStr{#1}{complexes}{\input{proflycee-tools-complexes.tex}}{}%
+ \IfSubStr{#1}{recreat}{\input{proflycee-tools-recreat.tex}}{}%
+ \IfSubStr{#1}{competences}{\input{proflycee-tools-competences.tex}}{}%
+ \IfSubStr{#1}{exams}{\input{proflycee-tools-exams.tex}}{}%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index c13d91729a..add18837bc 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -1,9 +1,25 @@
-% Author : C. Pierquet
-% licence : Released under the LaTeX Project Public License v1.3c
-% or later, see http://www.latex-project.org/lppl.txtf
+% Author...................: C. Pierquet
+% licence..................: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% licence (part of code).. : CC BY-SA 3.0 (from Mark Wibrow)
+% licence cliparts.........: CC0 (from openclipart)
+% code
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2024/05/31 3.04c Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2025/02/10 3.11a Aide pour l'utilisation de LaTeX en lycee]
+% 3.11a Ajout d'aliases des commandes via \pfl... (à voir pour les environnements...)
+% 3.10g Clé [warningsoff] pour envlever les warnings liés à unicode-math
+% 3.10f Ajout de quelques commandes arithmétiques (test premier + décompo)
+% 3.10e Correction de noms de commandes + \logo calculatrice interdite
+% 3.10d Correction d'un nom de commande (doublon avec ProfMaquette)
+% 3.10c Ajout de clés/arguments pour les arbres de probas + paramètres stats + arbres de dénombrement(s)
+% 3.10b Ajout des empilements d'oranges + commandes sur les dates
+% 3.10a Bifurcation pfl / pfllight + pflnum consolidée
+% 3.05b Mise en standby des commandes liées à minted (attente de compatibilité complète avec tcblisting) + Clé [ValeursTan] pour les cercles trigo
+% 3.05a Conversions entre bases + vectorial clipart (de openclipart)
+% 3.04g Ajout de clés pour les arbres de probas
+% 3.04f Ajout de clés pour la coloration des nombres et Piton
+% 3.04e Commandes prix/angle/pourcent en lien avec siunitx
+% 3.04d PitonInputFile et styles
% 3.04c Max et min pour des fonctions
% 3.04b Travail sur la loi binomiale + Ajout de clés pour les environnements graphiques
% 3.04a Améliorations de la partie graphiques tikz (intégrales, axes) + Factorielle
@@ -97,9 +113,14 @@
\newif\if@xcolor \@xcolorfalse
\newif\if@build \@buildfalse
\newif\if@loadamssymb \@loadamssymbtrue
+\newif\if@warningsoff \@warningsofffalse
+\newif\if@loadtikzbabel \@loadtikzbabeltrue
\DeclareOption{xcolor}{\@xcolortrue}%
\DeclareOption{build}{\@buildtrue}%
\DeclareOption{nonamssymb}{\@loadamssymbfalse}%
+\DeclareOption{warningsoff}{\@warningsofftrue}%
+\DeclareOption{nonwarnings}{\@warningsofftrue}%
+\DeclareOption{nontikzbabel}{\@loadtikzbabelfalse}%
\DeclareOption*{}
\ProcessOptions\relax
@@ -107,10 +128,17 @@
\if@loadamssymb
\RequirePackage{amssymb}
\fi
+\if@warningsoff
+ \PassOptionsToPackage{warnings-off={mathtools-colon,mathtools-overbracket}}{unicode-math}
+\fi
\if@xcolor
\RequirePackage[table,svgnames]{xcolor}%Gestion des couleurs
\fi
\RequirePackage{tikz}
+\usetikzlibrary{calc,decorations,decorations.pathreplacing,decorations.markings,arrows,arrows.meta,shapes.geometric,decorations.pathmorphing}
+\if@loadtikzbabel
+ \usetikzlibrary{babel}
+\fi
\RequirePackage{tkz-tab}
\RequirePackage{pgf,pgffor}
\RequirePackage{ifthen}
@@ -137,15 +165,6 @@
group-minimum-digits=4%
}%
\RequirePackage{fontawesome5}
-%librairies tikz
-\usetikzlibrary{calc}
-\usetikzlibrary{decorations}
-\usetikzlibrary{decorations.pathreplacing}
-\usetikzlibrary{decorations.markings}
-\usetikzlibrary{arrows,arrows.meta}
-\usetikzlibrary{babel}
-\usetikzlibrary{shapes.geometric}
-\usetikzlibrary{decorations.pathmorphing}
%tcolorbox
\RequirePackage{tcolorbox}%
\tcbuselibrary{breakable,fitting,skins,listings,listingsutf8,hooks}
@@ -167,15 +186,15 @@
\input{proflycee-tools-espace.tex}
}%
{}%
- \IfSubStr{#1}{minted}%
- {%
- \if@build
- \RequirePackage[outputdir=build]{minted} %on charge minted avec le répertoire build
- \fi
- \tcbuselibrary{minted} %on charge minted via la librairie tcbox
- \input{proflycee-tools-minted.tex}
- }%
- {}%
+ %\IfSubStr{#1}{minted}%
+ % {%
+ % \if@build
+ % \RequirePackage[outputdir=build]{minted} %on charge minted avec le répertoire build
+ % \fi
+ % \tcbuselibrary{minted} %on charge minted via la librairie tcbox
+ % \input{proflycee-tools-minted.tex}
+ % }%
+ % {}%
\IfSubStr{#1}{pythontex}%
{%
\RequirePackage[gobble=auto]{pythontex}
@@ -194,14 +213,298 @@
}
%%------patch num et xint
-\NewDocumentCommand\pflnum{ s O{} m }{%
- \IfBooleanTF{#1}%
+\NewDocumentCommand\pflnum{ s D<>{} O{} m }{%version consolidée
+ %1 := version étoilée pour arrondi (normal) / - avant la fraction éventuelle
+ \IfEq{#2}{}%argument <> vide := entier/décimal -> checked
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \IfEq{#3}{}{\num{\xintfloateval{#4}}}{\num{\xintfloateval{round(#4,#3)}}}%
+ }%
+ {%
+ \num{\xintiieval{#4}}%
+ }%
+ }%
+ {}%
+ \IfEq{#2}{frac}%argument <frac> := fraction -> checked
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \pflnumfrac*[#3]{#4}%
+ }%
+ {%
+ \pflnumfrac[#3]{#4}%
+ }%
+ }%
+ {}%
+ \IfEq{#2}{rad}%argument <rad> := angle radian -> checked (juste le - devant...)
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \pflnumrad*[#3]{#4}%
+ }%
+ {%
+ \pflnumrad[#3]{#4}%
+ }%
+ }%
+ {}%
+ \IfEq{#2}{rac}%
+ {%
+ \pflnumsqrt[#3]{#4}%
+ }%
+ {}%
+ \IfEq{#2}{annee}%
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \IfEq{#3}{}{\num[digit-group-size=5]{\xintfloateval{#4}}}{\num[digit-group-size=5]{\xintfloateval{round(#4,#3)}}}%
+ }%
+ {%
+ \num[digit-group-size=5]{\xintiieval{#4}}%
+ }%
+ }%
+ {}%
+}
+
+\DeclareDocumentCommand\pflnumsqrt{ O{} m }{% argument mandataire {calcul ou fraction}
+ \xdef\calculargument{\xintIrr{\xinteval{#2}}}%
+ \xintifboolexpr{\calculargument == 1}%
{%
- \IfEq{#2}{}{\num{\xintfloateval{#3}}}{\num{\xintfloateval{round(#3,#2)}}}%
+ \ensuremath{1}%
}%
{%
- \num{\xintiieval{#3}}%
+ \IfEndWith{\calculargument}{/1}%
+ {%si c'est un entier !
+ \xdef\calculargument{\xintiieval{#2}}%
+ \xdef\ExtractRacStop{\xintiFloor{\xintfloateval{sqrt(\calculargument)}}}%
+ \xintFor* ##1 in {\xintSeq{1}{\ExtractRacStop}}\do{%
+ \xintifboolexpr{ \xintiiRem{\calculargument}{\xintiieval{##1*##1}} == 0}%si le carré divise
+ {\xdef\ExtractRacID{##1}}%
+ {}%
+ }%
+ \xdef\ExtracReste{\xintiieval{\calculargument/(\ExtractRacID*\ExtractRacID)}}%
+ \ensuremath{\xintifboolexpr{\ExtractRacID == 1 && \ExtracReste == 1}%
+ {1}%
+ { \xintifboolexpr{\ExtractRacID == 1}{}{\num{\xintiieval{\ExtractRacID}}}%
+ \xintifboolexpr{\ExtracReste == 1}{}{\sqrt{\num{\ExtracReste}}} }%
+ }%
}%
+ {%on va mettre sous forme a\sqrt(d)/b := buggue avec des millièmes...
+ \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur
+ \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur
+ \xdef\ExtractRacNNum{\xintiieval{\numerateur*\denominateur}}%
+ \xdef\ExtractRacStop{\xintiFloor{\xintfloateval{sqrt(\ExtractRacNNum)}}}%
+ \xintFor* ##1 in {\xintSeq{1}{\ExtractRacStop}}\do{%
+ \xintifboolexpr{ \xintiiRem{\ExtractRacNNum}{\xintiieval{##1*##1}} == 0}%si le carré divise
+ {\xdef\ExtractRacID{##1}}%
+ {}
+ }%
+ \xdef\ExtractRacGCD{\xintiiGCD{\ExtractRacID}{\denominateur}}%
+ \xdef\RacNumSimpl{\xintiieval{\ExtractRacID/\ExtractRacGCD}}%simpl num
+ \xdef\RacDenomSimpl{\xintiieval{\denominateur/\ExtractRacGCD}}%
+ \xdef\RacRacSimpl{\xintiieval{\ExtractRacNNum/(\ExtractRacID*\ExtractRacID)}}%
+ \IfEq{#1}{}%fraction classique
+ {%
+ \ensuremath{\frac{%
+ \xintifboolexpr{\RacNumSimpl == 1 && \RacRacSimpl == 1}%
+ {1}%
+ { \xintifboolexpr{\RacNumSimpl == 1}{}{\RacNumSimpl} \xintifboolexpr{\RacRacSimpl == 1}{}{\sqrt{\num{\RacRacSimpl}}} }%
+ }%
+ { \RacDenomSimpl }}%
+ }%
+ {}%
+ \IfEq{#1}{d}%dfraction
+ {%
+ \ensuremath{\dfrac{%
+ \xintifboolexpr{\RacNumSimpl == 1 && \RacRacSimpl == 1}%
+ {1}%
+ { \xintifboolexpr{\RacNumSimpl == 1}{}{\RacNumSimpl} \xintifboolexpr{\RacRacSimpl == 1}{}{\sqrt{\num{\RacRacSimpl}}} }%
+ }%
+ { \RacDenomSimpl }}%
+ }%
+ {}%
+ \IfEq{#1}{n}%nfraction
+ {%
+ \ensuremath{\nicefrac{%
+ \xintifboolexpr{\RacNumSimpl == 1 && \RacRacSimpl == 1}%
+ {1}%
+ { \xintifboolexpr{\RacNumSimpl == 1}{}{\RacNumSimpl} \xintifboolexpr{\RacRacSimpl == 1}{}{\sqrt{\num{\RacRacSimpl}}} }%
+ }%
+ { \RacDenomSimpl }}%
+ }%
+ {}%
+ }%
+}%
+}
+
+\NewDocumentCommand\pflnumfrac{ s O{} m }{%patch xinttotexfrac
+ %*=moins sur le numérateur
+ %2=argument.optionnel[d/t/dec=...]
+ %3=argument mandataire {calcul ou fraction}
+ \xdef\calculargument{\xintPRaw{\xintIrr{\xinteval{#3}}}}%on calcule et on transforme en A/B
+ \IfSubStr{\calculargument}{/}%on teste si le symbole / apparaît
+ {%si oui := fraction
+ \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur
+ \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur
+ \ifblank{#2}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{d}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\dfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{t}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\tfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{n}%
+ {%
+ {\ensuremath{\nicefrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfSubStr{#2}{dec}%on veut la forme décimale
+ {%
+ \IfSubStr{#2}{=}%si on rajoute une précision
+ {%
+ \StrBehind{#2}{=}[\precdecimal]%
+ \ensuremath{\num{\xintfloateval{round(#3,\precdecimal)}}}%
+ }%
+ {%
+ \ensuremath{\num{\xintfloateval{#3}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ }%
+ {%si non := entier
+ \num{\calculargument}%on affiche l'entier, avec le package siunitx
+ }%
+}
+
+\NewDocumentCommand\pflnumrad{ s O{} m }{%
+ %1 = options
+ %2 = angle sous la forme a*pi/b
+ \StrDel{#3}{pi}[\MPargument]%
+ \IfBeginWith{#3}{pi}%
+ {\StrSubstitute{#3}{pi}{1}[\MPargument]}%
+ {}%
+ \IfBeginWith{#3}{-pi}%
+ {\StrSubstitute{#3}{pi}{1}[\MPargument]}%
+ {}%
+ %on conserve les données initiales
+ \IfSubStr{\MPargument}{/}%on coupe numérateur/dénominateur
+ {\StrCut{\MPargument}{/}\MPnumerateurinit\MPdenominateurinit}%
+ {\xdef\MPnumerateurinit{\MPargument}\xdef\MPdenominateurinit{1}}%
+ %on affiche le début, avant simplification
+ \IfStrEq{#2}{d}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \displaystyle\IfBooleanT{#1}{-}\frac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{\IfBooleanTF{#1}{}{-}\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{ \IfBooleanTF{#1}{\xinteval{abs(\MPnumerateurinit)}}{\MPnumerateurinit} }\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ \IfStrEq{#2}{t}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \IfBooleanT{#1}{-}\tfrac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{ \IfBooleanTF{#1}{\xinteval{abs(\MPnumerateurinit)}}{\MPnumerateurinit} }\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ \IfStrEq{#2}{}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \IfBooleanT{#1}{-}\frac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{ \IfBooleanTF{#1}{\xinteval{abs(\MPnumerateurinit)}}{\MPnumerateurinit} }\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
+ \IfStrEq{#2}{n}%
+ {%
+ \ensuremath{%
+ \xintifboolexpr{\MPdenominateurinit == 1}%
+ {%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}%
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \nicefrac{%
+ \xintifboolexpr{\MPnumerateurinit == 1}{\pi}{}%
+ \xintifboolexpr{\MPnumerateurinit == -1}{-\pi}{}
+ \xintifboolexpr{\xinteval{abs(\MPnumerateurinit) != 1}}{\num{\MPnumerateurinit}\pi}{}%
+ }%
+ {%
+ \num{\MPdenominateurinit}%
+ }%
+ }%
+ }%
+ }%
+ {}%
}
%%------Codes listings
@@ -232,5 +535,7 @@
\input{proflycee-tools-competences.tex}
%%------Examens
\input{proflycee-tools-exams.tex}
+%%------Cliparts
+\input{proflycee-tools-cliparts.tex}
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdf
new file mode 100644
index 0000000000..3ca7af1aac
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-cup.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdf
new file mode 100644
index 0000000000..83f7d91489
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal-flat.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdf
new file mode 100644
index 0000000000..0e4712cece
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-bronze-medal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdf
new file mode 100644
index 0000000000..238d76df4e
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-checked.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdf
new file mode 100644
index 0000000000..94f04537b2
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-crossed.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdf
new file mode 100644
index 0000000000..e1b1a5fb46
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-cup.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdf
new file mode 100644
index 0000000000..424fc345ab
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal-flat.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdf
new file mode 100644
index 0000000000..3246c38693
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-gold-medal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdf
new file mode 100644
index 0000000000..bc03661421
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-center.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdf
new file mode 100644
index 0000000000..40f843b864
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-left.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdf
new file mode 100644
index 0000000000..323710e097
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse-right.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdf
new file mode 100644
index 0000000000..b8e69cd524
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-mouse.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdf
new file mode 100644
index 0000000000..0fed35ca1e
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-notok.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdf
new file mode 100644
index 0000000000..43cac49c38
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-ok.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdf
new file mode 100644
index 0000000000..9ba7602d26
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-cup.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdf
new file mode 100644
index 0000000000..70d0ca8d8b
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal-flat.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdf b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdf
new file mode 100644
index 0000000000..ced83f9d17
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/pflcliparts/pfl-silver-medal.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-aleatoire.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-aleatoire.tex
index 4d4a50eca3..d85a244292 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-aleatoire.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-aleatoire.tex
@@ -1,5 +1,5 @@
% proflycee-tools-aleatoire.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
%%------EnsembleList
@@ -21,6 +21,7 @@
{\left\lbrace \PLensopt{} \mathpunct{} \StrSubstitute{#2}{/}{\mathpunct{}{\PLenssep}\mathpunct{}} \mathpunct{} \right\rbrace}%
{\left\lbrace \PLensopt{} \StrSubstitute{#2}{/}{{\PLenssep}} \right\rbrace}%
}
+\NewCommandCopy\pflecritens\EcritureEnsemble
%%------TRINOMEALEA
\setKVdefault[trinomealea]{%
@@ -60,6 +61,7 @@
%formatage
\ensuremath{\TriPartieA\TriPartieB\TriPartieC}%
}
+\NewCommandCopy\pflecrittrinom\EcritureTrinome
%%------ALEATOIRES
\ExplSyntaxOn
@@ -98,9 +100,12 @@
}%
}%
}
+\NewCommandCopy\pflnbalea\NbAlea
+
\newcommand\VarNbAlea[2]{%
\xdef#1{\fpeval{#2}}%
}
+\NewCommandCopy\pflvarnbalea\VarNbAlea
\defKV[TirageAleatoireEntiersEntre]{%
ValMin=\def\TAEEmin{#1},%
@@ -149,5 +154,6 @@
{}%
\StrSubstitute{#2}{,}{\TAEEsep}[#2]%on change le séparateur si besoin
}
+\NewCommandCopy\pfltiragealeaent\TirageAleatoireEntiers
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex
index 1581688cb1..e9cb464221 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex
@@ -1,5 +1,5 @@
% proflycee-tools-analyse.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
%Correction d'un bug sur la raacine carrée... le cas où ça fait 1 !
@@ -327,6 +327,7 @@
\IfBooleanTF{#1}%
{\end{tikzpicture}}{}%
}
+\NewCommandCopy\pflschemasignes\MiniSchemaSignes
%pour l'interaction avec tkz-tab
\defKV[aidetdstkz]{%
@@ -350,6 +351,7 @@
%\shorthandon{:}\shorthandon{!}
\path (ZZZ.east) + (#4,0) pic[right,scale=#3,every node/.style={scale=#3}] {code={\MiniSchemaSignes[#1]}} ;
}
+\NewCommandCopy\pflschemasignestkztab\MiniSchemaSignesTkzTab
%%------TVISOLUTION
\defKV[dichoto]{%
@@ -387,6 +389,7 @@
\num{\DHTva} < \DHTnomsol < \num{\DHTvb}%
}%
}
+\NewCommandCopy\pflsoltvi\SolutionTVI
%%------SIMPLIFRACINES
\DeclareDocumentCommand\SimplificationRacine{ m }{% argument mandataire {calcul ou fraction}
@@ -477,6 +480,7 @@
%valeur approchée
\expandafter\def\csname#3a\endcsname{\fpeval{round(\varvalm,\DICHOTOstep)}}%
}
+\NewCommandCopy\pflresolapproch\ResolutionApprochee
%==taux acroissement==
\defKV[tauxaccroiss]{%
@@ -510,6 +514,7 @@
\num{\xintfloateval{round(\TmpRes,\TauxAccroisPrec)}}%
}%
}
+\NewCommandCopy\pfltxaccroiss\TauxAccroissement
%==approx intégrale==
\defKV[methodeintegr]{%
@@ -573,6 +578,7 @@
\num{\xintfloateval{round(\TmpRes,\MethIntegrPrec)}}
}%
}
+\NewCommandCopy\pflintegrapproch\IntegraleApprochee
%===intégrale 'brute'
\NewDocumentCommand\CalcIntegrale{ s O{} D<>{50} m m m }{%
@@ -588,8 +594,9 @@
}%
\relax
}
+\NewCommandCopy\pflvalintegr\CalcIntegrale
-%===intégrale 'brute'
+%===val moy 'brute'
\NewDocumentCommand\ValeurMoyenneIntg{ s O{} D<>{50} m m m }{%
\xintdeffloatfunc varfct(x) := #4 ;%
\def\TmpNmU{\xinteval{(#3)-1}}%
@@ -603,6 +610,7 @@
}%
\relax
}
+\NewCommandCopy\pflvalmoyintegr\ValeurMoyenneIntg
%==intégrale tikz==
@@ -656,6 +664,7 @@
}%
{}%
}
+\NewCommandCopy\pflintegrapprochtikz\IntegraleApprocheeTikz
%==fonction affine==
\NewDocumentCommand\AffCoeffFAm{ O{d} m }{%
@@ -754,11 +763,13 @@
}%
{}%
}
+\NewCommandCopy\pfleqreduite\EquationReduite
%====FRACTION PÉRIODIQUE
\defKV[FracPeriod]{Inconnue=\def\FracPerVar{#1}}
\setKVdefault[FracPeriod]{Enonce=true,d=true,Inconnue=x,Solution=false,Brut=true,Simple=false}
+\makeatletter
\NewDocumentCommand\FractionPeriode{ O{} m m }{%on verra pour la mise en forme après...
%clés
\restoreKV[FracPeriod]% revenir au valeurs par défaut
@@ -841,6 +852,8 @@
}%
{}%
}
+\makeatletter
+\NewCommandCopy\pflfracperiod\FractionPeriode
%====tkz ligne convexité
\makeatletter
@@ -951,6 +964,7 @@
}%
}%
}
+\NewCommandCopy\pflformcanoniq\FormeCanonique
\NewDocumentCommand\FonctionHomographique{ s O{t} m m m m }{%
\xintifboolexpr{#3 != 0}%
@@ -995,16 +1009,19 @@
}%
}%
}
+\NewCommandCopy\pflfcthomogr\FonctionHomographique
%----max/min
\NewDocumentCommand\DetermineMax{ O{0.01} m m m O{\tmpmax} O{\tmpmaxvalx} }{%
\xdef#5{\xintfloateval{max(seq(#2,x=#3..[#1]..#4,#4))}}%
\xdef#6{\xintfloateval{first(seq((#2 == #5)?{x}{},x=#3..[#1]..#4,#4))}}%
}
+\NewCommandCopy\pfldetmax\DetermineMax
\NewDocumentCommand\DetermineMin{ O{0.01} m m m O{\tmpmin} O{\tmpminvalx} }{%
\xdef#5{\xintfloateval{min(seq(#2,x=#3..[#1]..#4,#4))}}%
\xdef#6{\xintfloateval{first(seq((#2 == #5)?{x}{},x=#3..[#1]..#4,#4))}}%
}
+\NewCommandCopy\pfldetmin\DetermineMin
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
index a021fea937..6953d24702 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
@@ -1,10 +1,93 @@
% proflycee-tools-arithm.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\RequirePackage{ifthen}
+\RequirePackage{etoolbox}
\RequirePackage{modulus}
+%%-----Nombres premiers (code venant de la documentation de xint :-))
+\NewDocumentCommand\pflboolestpremier{ m }{%
+ \ifnumodd{#1}%
+ {%
+ \ifnumless{#1}{8}%
+ {%
+ \ifnumequal{#1}{1}{0}{1}%
+ }%le cas 3,5,7 qui sont premiers
+ {%
+ \if\xintiloop[3+2]%
+ \ifnum#1<\numexpr\xintiloopindex*\xintiloopindex\relax%
+ \expandafter\xintbreakiloopanddo\expandafter1\expandafter.%
+ \fi%
+ \ifnum#1=\numexpr(#1/\xintiloopindex)*\xintiloopindex\relax%
+ \else
+ \repeat 00\expandafter0%
+ \else%
+ \expandafter1%
+ \fi%
+ }%
+ }%fin de la partie impaire
+ {%
+ \ifnumequal{#1}{2}{1}{0}%
+ }%partie paire
+}%
+
+\NewDocumentCommand\pflestpremier{ O{est premier} O{n'est pas premier} m }{%
+ \num{#3} \xintifboolexpr{\pflboolestpremier{#3} == 1}{#1}{#2}\relax%
+}%
+
+%%------Décomposition, adaptée de pfc
+\NewDocumentCommand\pfldecompnb{ s m }{%
+ \xdef\tmpcalc{\xinteval{#2}}%
+ \xdef\tmparg{}%
+ \newcount\pflanp\newcount\pflbnp\newcount\pflcnp%
+ \newcount\pflpileb\newcount\pflexposant%
+ \pflexposant=0\relax%
+ \pflanp=\tmpcalc\relax%
+ \pflbnp=2\relax%
+ \pflpileb=2\relax%
+ \ensuremath{%
+ \whiledo{\the\pflanp > 1}{%
+ \modulo{\the\pflanp}{\the\pflbnp}%
+ \ifnum\remainder=0\relax%
+ \pflcnp=\numexpr\pflanp/\pflbnp\relax%
+ \pflexposant=\numexpr\pflexposant+1\relax%
+ \pflanp=\pflcnp\relax%
+ \else%
+ \ifnum\pflexposant>0\relax%
+ \IfBooleanTF{#1}%
+ {%
+ \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}\times}%
+ }%
+ {%
+ \ifnum\pflexposant=1\relax%
+ \xdef\tmparg{\tmparg\num{\the\pflpileb}\times}%
+ \else%
+ \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}\times}%
+ \fi%
+ }%
+ \fi%
+ \pflbnp=\numexpr\pflbnp+1\relax%
+ \pflpileb=\pflbnp\relax%
+ \pflexposant=0\relax%
+ \fi%
+ }%
+ \IfBooleanTF{#1}%
+ {%
+ \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}}%
+ }%
+ {%
+ \ifnum\pflexposant=1\relax%
+ \xdef\tmparg{\tmparg\num{\the\pflpileb}}%
+ \else%
+ \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}}%
+ \fi%
+ }%
+ \tmparg\relax%
+ }%
+}
+
+
%%------ConversionsBases
%dec->bin avec blocs de 4 chiffres
\setKVdefault[CONVDECBIN]{%
@@ -20,6 +103,7 @@
{\num{#3}\ifboolKV[CONVDECBIN]{AffBase}{_{10}}{}=\num[digit-group-size=4]{\resbrut}\ifboolKV[CONVDECBIN]{AffBase}{_{2}}{}}%
{\num{#3}\ifboolKV[CONVDECBIN]{AffBase}{_{10}}{}=\num[digit-group-size=4,minimum-integer-digits=\nbgrp]{\resbrut}\ifboolKV[CONVDECBIN]{AffBase}{_{2}}{}}%
}
+\NewCommandCopy\pflconvdecbin\ConversionDecBin
\setKVdefault[CONVBINHEX]{%
%Epaisseur=0.75pt,%
@@ -70,6 +154,7 @@
{}%
\xintBinToHex{\chbrut}\ifboolKV[CONVBINHEX]{AffBase}{_{16}}{}%
}
+\NewCommandCopy\pflconvbinhex\ConversionBinHex
%hexa-bin par bloc de 4
\setKVdefault[CONVHEXBIN]{%
@@ -106,6 +191,7 @@
\!\ifboolKV[CONVHEXBIN]{AffBase}{{}_{2}}{}%
}%
}
+\NewCommandCopy\pflconvhexbin\ConversionHexBin
%hexa/bin->dec avec écriture polynomiale
@@ -187,6 +273,7 @@
}%
{}%
}
+\NewCommandCopy\pflconvversdec\ConversionVersDec
\newcommand\ConversionBaseDix[3][]{%1=options,%2=nb,%3=basedep ??
\useKVdefault[CONVTODEC]
@@ -219,6 +306,7 @@
{}%
\num{\convertbasetobasedix{#2}{#3}}\ifboolKV[CONVTODEC]{AffBase}{_{10}}{}%
}
+\NewCommandCopy\pflconvdix\ConversionBaseDix
%%------CONVFROMDEC
\newcommand\PLnoeud[2]{\tikz[remember picture,baseline=(#1.base)]\node[shape=rectangle,inner sep=0pt](#1){#2};}
@@ -278,6 +366,7 @@
\end{tikzpicture}%
}{}%
}
+\NewCommandCopy\pflconvdepuisdix\ConversionDepuisBaseDix
%%------PRESPGCD
\DeclareMathOperator{\PLpgcd}{PGCD}
@@ -343,6 +432,7 @@
\end{tikzpicture}%
}{}%
}
+\NewCommandCopy\pflprespgcd\PresentationPGCD
%%===égalité de Bezout
\NewDocumentCommand\AffCoeffBezout{ m }{%
@@ -354,6 +444,7 @@
\xintAssign{\xintBezout{#2}{#3}}\to\TmpU\TmpV\TmpD%
\ensuremath{\num{#2} \times \mathcolor{#1}{\AffCoeffBezout{\TmpU}} + \AffCoeffBezout{#3} \times \mathcolor{#1}{\AffCoeffBezout{\TmpV}} = \num{\TmpD}}%
}
+\NewCommandCopy\pflbezout\EgaliteBezout
%%===Équations diophantiennes
\RequirePackage[thicklines]{cancel}%comme PfC
@@ -489,6 +580,7 @@
Le PGCD de \num{\AA} et \num{\BB} ne divise pas \num{\CC}, donc l'équation $(\LettreSolEDioph)$ n'admet aucune solution.
}%
}
+\NewCommandCopy\pflequadioph\EquationDiophantienne
%liste diviseurs
\setKVdefault[listdiv]{%
@@ -508,6 +600,7 @@
}%
\ensuremath{\ifboolKV[listdiv]{AffNom}{\IfBooleanTF{#1}{\mathscr{D}}{\mathcal{D}}_{\num{\argcal}}=}{}\EcritureEnsemble[\strut]{\tmplistdiv}}%
}
+\NewCommandCopy\pfllistediv\ListeDiviseurs
%arbre diviseurs
\defKV[arbrediviseurs]{%
@@ -526,11 +619,11 @@
Fleches=true
}
-\NewDocumentCommand\ArbreDiviseurs{ O{} m }{%
+\NewDocumentCommand\ArbreDiviseurs{ O{} D<>{} m }{%
\useKVdefault[arbrediviseurs]%
\setKV[arbrediviseurs]{#1}%
% test avec CPoulain ^^
- \xdef\tmpcalc{\xinteval{#2}}%
+ \xdef\tmpcalc{\xinteval{#3}}%
\xdef\tmparg{}%
\newcount\anp\newcount\bnp\newcount\cnp%
\newcount\pileb\newcount\exposant%
@@ -569,7 +662,7 @@
\ifboolKV[arbrediviseurs]{Fleches}%
{\tikzstyle{flechearbrediv} = [line width=\fpeval{\TmpEchelle*0.6}pt,->,>=latex]}%
{\tikzstyle{flechearbrediv} = [line width=\fpeval{\TmpEchelle*0.6}pt]}%
- \begin{tikzpicture}[scale=\TmpEchelle,every node/.style={scale=\TmpEchelle}]
+ \begin{tikzpicture}[scale=\TmpEchelle,every node/.style={scale=\TmpEchelle},#2]
% grille d'aide
% \draw[xstep=\TmpEspNiv,ystep=\TMpEspFeuille,thin,lightgray] (0,{(-\arbredivnbdiv+1)*\TMpEspFeuille}) grid ({\arbredivnbdivprem*\TmpEspNiv},0) ;
% dernier niveau OK
@@ -646,6 +739,7 @@
}{}%
\end{tikzpicture}%
}
+\NewCommandCopy\pflarbrediv\ArbreDiviseurs
%somme des chiffres
\ifthenelse{\isundefined{\SommeChiffres}}%
@@ -665,6 +759,7 @@
\ensuremath{\num{\tmpres}}%
}
}%
+\NewCommandCopy\pflsomchiff\SommeChiffres
%====CHIFFREMENTS !!
\xdef\aLPHaBeTMajusc{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
@@ -683,6 +778,7 @@
}%
{}%
}
+\NewCommandCopy\pflinvmod\InverseModulo
\defKV[chiffaffine]{a=\xdef\tmpcoeffa{#1},b=\xdef\tmpcoeffb{#1},modulo=\xdef\tmpmodulo{#1}}
\setKVdefault[chiffaffine]{a=3,b=12,Dechiffr=false,modulo=26}
@@ -748,6 +844,7 @@
{\xintifboolexpr{\PGCDD != 1}{Le message ne peut pas être déchiffré car $\text{PGCD}(\tmpcoeffa;\tmpmodulo)\neq1$ !\relax}{}}%
{}%
}
+\NewCommandCopy\pflchiffraff\ChiffrementAffine
\defKV[chiffhill]{Matrice=\xdef\tmpcoeffmat{#1},Modulo=\xdef\tmpmodulo{#1}}
\setKVdefault[chiffhill]{Matrice={1,2,3,5},Dechiffr=false,modulo=26}
@@ -878,6 +975,7 @@
}%
}%
}
+\NewCommandCopy\pflchiffrhill\ChiffrementHill
\defKV[chiffcesar]{Decal=\xdef\tmpdecalcesar{#1}}
\setKVdefault[chiffcesar]{Decal=5,Dechiffr=false}
@@ -912,6 +1010,7 @@
}%
}%
}
+\NewCommandCopy\pflchiffrcesar\ChiffrementCesar
%====DIV EUCL (OK), 2 versions, mises à jour ;-)
\setKVdefault[diveucl]{%
@@ -933,12 +1032,14 @@
\ensuremath{\num{\xinteval{#3}}=\num{\xinteval{#4}}\times\ifboolKV[diveucl]{Quotient}{\xintifboolexpr{\tmpQuotient < 0}{(\num{\tmpQuotient})}{\num{\tmpQuotient}}}{\useKV[diveucl]{Pointilles}}+\ifboolKV[diveucl]{Reste}{\num{\tmpReste}}{\useKV[diveucl]{Pointilles}}}%
\IfBooleanT{#1}{~avec $0 \leqslant \num{\xintiiRem{\tmpAA}{\tmpBB}} < \xintifboolexpr{\tmpBB < 0}{\lvert\num{\xinteval{#4}}\rvert}{\num{\xinteval{#4}}}$}%
}
+\NewCommandCopy\pfldiveucl\DivEucl
\NewDocumentCommand\DivisionEucl{ m m }{%
\xdef\tmpAA{\xinteval{#1}}\xdef\tmpBB{\xinteval{#2}}%
\xdef\tmpQuotient{\xintiiQuo{\tmpAA}{\tmpBB}}\xdef\tmpReste{\xintiiRem{\tmpAA}{\tmpBB}}%
\ensuremath{\num{\tmpBB}\times\xintifboolexpr{\tmpQuotient < 0}{(\num{\tmpQuotient})}{\num{\tmpQuotient}}+\num{\xintiiRem{\tmpAA}{\tmpBB}}}
}
+\NewCommandCopy\pflpresdiveucl\DivisionEucl
%====ADDITIONS POSÉES ?
\newlength{\colspecbinadd}
@@ -1096,6 +1197,7 @@
\end{NiceTabular}
%\end{tabular}%
}
+\NewCommandCopy\pflposadd\PoseAddition
\ifluatex
@@ -1243,6 +1345,7 @@
\end{NiceTabular}%
%\(\matrixPrint{MATINTER}\)
}
+\NewCommandCopy\pflposaddlua\PoseAdditionLua
\fi
@@ -1253,6 +1356,7 @@
{\num{\xintiieval{irem(#2,#3)-#3}}}%
{\num{\xintiieval{irem(#2,#3)}}}%
}
+\NewCommandCopy\pflrestemod\ResteMod
%====OPÉRATIONS POSÉES 2/10/16 MULTICOMPILATEUR ?
\RequirePackage{calc}
@@ -1287,8 +1391,6 @@
\StrChar{#1}{##1}[\tmpchar]%
\settowidth{\charwd}{\tmpchar}%
\setlength{\widestcharwd}{\maxof{\widestcharwd}{\charwd}}%
-
-
}%
}
@@ -1511,6 +1613,7 @@
}%
{}%
}
+\NewCommandCopy\pflopeposee\OperationPosee
%====FACTORIELLE
\defKV[calcfactorielle]{ChSignif=\def\factochfsign{#1},Sens=\def\factochfsens{#1}}
@@ -1595,6 +1698,7 @@
}%
}%
}
+\NewCommandCopy\pflfacto\Factorielle
\NewDocumentCommand\Primorielle{ s O{} m }{%
\restoreKV[calcfactorielle]%
@@ -1652,6 +1756,7 @@
}%
}%
}
+\NewCommandCopy\pflprimor\Primorielle
\NewDocumentCommand\DoubleFactorielle{ s O{} m }{%
\restoreKV[calcfactorielle]%
@@ -1757,6 +1862,7 @@
}%
}%
}
+\NewCommandCopy\pfldblefacto\DoubleFactorielle
\NewDocumentCommand\HyperFactorielle{ s O{} m }{%
\restoreKV[calcfactorielle]%
@@ -1829,6 +1935,7 @@
}%
}%
}
+\NewCommandCopy\pflhyperfacto\HyperFactorielle
\NewDocumentCommand\SuperFactorielle{ s O{} m }{%
\restoreKV[calcfactorielle]%
@@ -1901,5 +2008,68 @@
}%
}%
}
+\NewCommandCopy\pflsuperfacto\SuperFactorielle
+
+%====CONVERSIONS ENTRE BASES
+\ExplSyntaxOn
+%commande interne (stockage ou non)
+\NewDocumentCommand\pflbasetobase{ m m m }{%
+ %1=init
+ %2=fin
+ %3=nb
+ \ifnum#2=10%
+ \int_from_base:nn {#3}{#1}%
+ \else%
+ \int_to_Base:nn {\int_from_base:nn {#3}{#1}}{#2}%
+ \fi%
+}
+
+\NewDocumentCommand\tmpresconvbases{ m m m O{\tmpconvres} }{%
+ %1=init
+ %2=fin
+ %3=nb
+ \ifnum#2=10%
+ \xdef#4{\int_from_base:nn {#3}{#1}}%
+ \else%
+ \xdef#4{\int_to_Base:nn {\int_from_base:nn {#3}{#1}}{#2}}%
+ \fi%
+}
+\ExplSyntaxOff
+
+%commande interne split adaptée de https://tex.stackexchange.com/questions/171007/split-a-character-string-n-by-n // unbonpetit // CC BY-SA 3.0
+\NewDocumentCommand\tmpStrSplit{ O{\,} m m O{\tmpsplitres} }{%
+ %1=espace / %2=nb caract / %3=chaîne / %4=macro de stockage
+ \xdef\splitstring{#3}\let\splitresult\empty%
+ \loop%
+ \StrLen\splitstring[\tempa]%
+ \StrSplit\splitstring{\number\numexpr\tempa-#2}\splitstring\tempb%
+ \xdef\splitresult{\unless\ifx\splitstring\empty#1\fi\tempb\splitresult}%
+ \unless\ifx\splitstring\empty%
+ \repeat%
+ \xdef#4{\splitresult}%
+}
+
+\NewDocumentCommand\ConversionEntreBases{ s O{\,} m m }{%
+ %calculs internes
+ \StrCut{#3}{->}{\tmpbaseinit}{\tmpbasefin}%
+ \tmpresconvbases{\tmpbaseinit}{\tmpbasefin}{#4}%\tmpconvres
+ %affichage
+ \ensuremath{%
+ \ifnum\tmpbaseinit=2%
+ \tmpStrSplit{4}{#4}%
+ {\tmpsplitres}\IfBooleanT{#1}{_{\tmpbaseinit}}%
+ \else%
+ {#4}\IfBooleanT{#1}{_{\tmpbaseinit}}%
+ \fi%
+ =%
+ \ifnum\tmpbasefin=2%
+ \tmpStrSplit[#2]{4}{\tmpconvres}%
+ {\tmpsplitres}\IfBooleanT{#1}{_{\tmpbasefin}}%
+ \else%
+ {\tmpconvres}\IfBooleanT{#1}{_{\tmpbasefin}}%
+ \fi%
+ }%
+}
+\NewCommandCopy\pflconvbases\ConversionEntreBases
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex
new file mode 100644
index 0000000000..d905427d0f
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-cliparts.tex
@@ -0,0 +1,146 @@
+% proflycee-tools-cliparts.tex
+% Copyright 2024-205 Cédric Pierquet
+% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% logos from CC0 opencliparts (users Firkin & Juhele & qubodup & TzeenieWheenie & jetxee)
+
+%====DIMENSIONS
+\newlength{\tmpcharacterheightinline}
+\newlength{\tmpcharacterdepthinline}
+
+%====MACRO PRINCIPALE
+\NewDocumentCommand\InsererClipart{ s O{} m }{%
+ \IfBooleanTF{#1}%
+ {%
+ \IfFileExists{pfl-#3.pdf}{\includegraphics[#2]{pfl-#3.pdf}}{}%
+ }%
+ {%
+ \settototalheight{\tmpcharacterheightinline}{\hbox{AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn}}%
+ \settodepth{\tmpcharacterdepthinline}{\hbox{AZERTYUIOPQSDFGHJKLMWXCVBNazertyuiopqsdfghjklmwxcvbn}}%
+ \IfFileExists{pfl-#3.pdf}{\raisebox{-\tmpcharacterdepthinline}{\includegraphics[height=\tmpcharacterheightinline]{pfl-#3.pdf}}}{}%
+ }%
+}
+\NewCommandCopy\pflclipart\InsererClipart
+
+%====ALIASES
+\NewDocumentCommand\pflimgcoupeb{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{bronze-cup}}%
+ {\InsererClipart{bronze-cup}}%
+}
+
+\NewDocumentCommand\pflimgmedb{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{bronze-medal}}%
+ {\InsererClipart{bronze-medal}}%
+}
+
+\NewDocumentCommand\pflimgmedbp{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{bronze-medal-flat}}%
+ {\InsererClipart{bronze-medal-flat}}%
+}
+
+\NewDocumentCommand\pflimgverif{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{checked}}%
+ {\InsererClipart{checked}}%
+}
+
+\NewDocumentCommand\pflimgnonverif{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{crossed}}%
+ {\InsererClipart{crossed}}%
+}
+
+\NewDocumentCommand\pflimgcoupeo{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{gold-cup}}%
+ {\InsererClipart{gold-cup}}%
+}
+
+\NewDocumentCommand\pflimgmedo{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{gold-medal}}%
+ {\InsererClipart{gold-medal}}%
+}
+
+\NewDocumentCommand\pflimgmedop{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{gold-medal-flat}}%
+ {\InsererClipart{gold-medal-flat}}%
+}
+
+\NewDocumentCommand\pflimgsouris{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse}}%
+ {\InsererClipart{mouse}}%
+}
+
+\NewDocumentCommand\pflimgsourisg{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse-left}}%
+ {\InsererClipart{mouse-left}}%
+}
+
+\NewDocumentCommand\pflimgsourisc{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse-center}}%
+ {\InsererClipart{mouse-center}}%
+}
+
+\NewDocumentCommand\pflimgsourisd{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{mouse-right}}%
+ {\InsererClipart{mouse-right}}%
+}
+
+\NewDocumentCommand\pflimgko{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{notok}}%
+ {\InsererClipart{notok}}%
+}
+
+\NewDocumentCommand\pflimgok{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{ok}}%
+ {\InsererClipart{ok}}%
+}
+
+\NewDocumentCommand\pflimgcoupea{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{silver-cup}}%
+ {\InsererClipart{silver-cup}}%
+}
+
+\NewDocumentCommand\pflimgmeda{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{silver-medal}}%
+ {\InsererClipart{silver-medal}}%
+}
+
+\NewDocumentCommand\pflimgmedap{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {\InsererClipart*[#2]{silver-medal-flat}}%
+ {\InsererClipart{silver-medal-flat}}%
+}
+
+%====NOCALC
+\newlength{\tmptotalheightcurrenttxt}
+\setlength{\tmptotalheightcurrenttxt}{1em}
+\newlength{\tmptotaldepthcurrenttxt}
+\setlength{\tmptotaldepthcurrenttxt}{0.1em}
+
+\NewDocumentCommand\pflnocalc{ s O{black} }{%
+ \settototalheight{\tmptotalheightcurrenttxt}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \settodepth{\tmptotaldepthcurrenttxt}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \IfBooleanTF{#1}{}{\hspace*{-0.05\tmptotalheightcurrenttxt}}%
+ \raisebox{-\tmptotaldepthcurrenttxt}{%
+ {\begin{tikzpicture}[line width={0.1\tmptotalheightcurrenttxt}]
+ \node[#2,inner sep=0pt,scale=0.8,outer sep=0pt] (TMPPP) at (0,0) {\faCalculator} ;
+ \draw[#2,line cap=round] (TMPPP.north east)--(TMPPP.south west) ;
+ \end{tikzpicture}}%
+ }%
+ \IfBooleanTF{#1}{}{\hspace*{-0.05\tmptotalheightcurrenttxt}}%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
index 0a1555c4e9..83c150aaf1 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
@@ -1,5 +1,5 @@
% proflycee-tools-ecritures.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
%===PACKAGE
@@ -10,6 +10,38 @@
\RequirePackage{mleftright} %pour une meilleure gestion des espacements avec \left \right :-)
%\RequirePackage{mathrsfs}%pour \mathscr (à voir...)
+%===UNITÉS
+
+\NewDocumentCommand\pflprix{ o m }{%
+ \IfValueTF{#1}%
+ {%
+ \num[round-mode=places,round-precision=#1]{#2}\,\text{€}%
+ }%
+ {%
+ \num{#2}\,\text{€}%
+ }%
+}
+
+\NewDocumentCommand\pflangle{ o m }{%
+ \IfValueTF{#1}%
+ {%
+ \num[round-mode=places,round-precision=#1]{#2}\text{\textdegree}%
+ }%
+ {%
+ \num{#2}\text{\textdegree}%
+ }%
+}
+
+\NewDocumentCommand\pflpcent{ o m }{%
+ \IfValueTF{#1}%
+ {%
+ \num[round-mode=places,round-precision=#1]{#2}\,\%%
+ }%
+ {%
+ \num{#2}\,\%%
+ }%
+}
+
%===ENSEMBLES CLASSIQUES
\ifthenelse{\isundefined{\N}}%
{%
@@ -72,6 +104,7 @@
\DeclareDocumentCommand\Arrondi{ s O{3} m }{% * pour afficher signe / opt = précision / argument = nb
\IfBooleanTF{#1}{\num[print-implicit-plus]{\xinteval{round(#3,#2)}}}{\num{\xinteval{round(#3,#2)}}}%
}
+\NewCommandCopy\pflarrondi\Arrondi
%====MODULO
\NewDocumentCommand\Modulo{ s O{Cro} m }{%
@@ -82,6 +115,7 @@
\IfStrEq{#2}{Txt}%
{\IfBooleanTF{#1}{\:\:}{\:}\text{modulo }#3}{}%
}
+\NewCommandCopy\pflmod\Modulo
%====COURBE
\NewDocumentCommand\Courbe{ s O{} }{%
@@ -97,11 +131,13 @@
{\ensuremath{{\mathcal{C}}_{#2}}\xspace}%
}%
}
+\NewCommandCopy\pflcourbe\Courbe
%====SUITE
\NewDocumentCommand\Suite{ O{n} m }{%
\ensuremath{\left( #2_{#1} \right)}%
}
+\NewCommandCopy\pflsuite\Suite
%===DIVERS
\AtBeginDocument{%voir hyperref...
@@ -121,14 +157,17 @@
\ifthenelse{\isundefined{\Esper}}%
{\newcommand\Esper[2][\mathbb{E}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
{\renewcommand\Esper[2][\mathbb{E}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
+\NewCommandCopy\pflesper\Esper
\ifthenelse{\isundefined{\Varianc}}%
{\newcommand\Varianc[2][\mathbb{V}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
{\renewcommand\Varianc[2][\mathbb{V}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
+\NewCommandCopy\pflvar\Varianc
\ifthenelse{\isundefined{\EcType}}%
{\newcommand\EcType[1]{\ensuremath{\sigma{\left({#1}\right)}}}}%
{\renewcommand\EcType[1]{\ensuremath{\sigma{\left({#1}\right)}}}}%
+\NewCommandCopy\pflectype\EcType
\ifthenelse{\isundefined{\dx}}%
{\newcommand\dx[1][x]{\ensuremath{~\text{d}#1}}}%
@@ -147,6 +186,7 @@
\RenewDocumentCommand\Limite{ s m m o }{%
\IfBooleanTF{#1}{\ensuremath{\lim_{\IfNoValueTF{#4}{#3}{\substack{#3 \\ #4}}} #2}}{\ensuremath{\lim\limits_{\IfNoValueTF{#4}{#3}{\substack{#3 \\ #4}}} #2}}}\xspace%
}%
+\NewCommandCopy\pfllim\Limite
%====VALEUR ABSOLUE, NORME
\DeclarePairedDelimiter\ValAbs{\lvert}{\rvert}%
@@ -165,28 +205,102 @@
\NewDocumentCommand\LoiNormale{ s m m }{%
\IfBooleanTF{#1}{\ensuremath{\mathscr{N}{\left(#2;#3\right)}}}{\ensuremath{\mathcal{N}{\left(#2;#3\right)}}}%
}
+\NewCommandCopy\pflloinorm\LoiNormale
+
\NewDocumentCommand\LoiBinomiale{ s m m }{%
\IfBooleanTF{#1}{\ensuremath{\mathscr{B}{\left(#2;#3\right)}}}{\ensuremath{\mathcal{B}{\left(#2;#3\right)}}}%
}
+\NewCommandCopy\pflloibinom\LoiBinomiale
+
\NewDocumentCommand\LoiPoisson{ s m }{%
\IfBooleanTF{#1}{\ensuremath{\mathscr{P}_{#2}}}{\ensuremath{\mathcal{P}_{#2}}}%
}
+\NewCommandCopy\pflloipoiss\LoiPoisson
+
\NewDocumentCommand\LoiUnif{ s m }{%
\IfBooleanTF{#1}{\ensuremath{\mathscr{U}_{#2}}}{\ensuremath{\mathcal{U}_{#2}}}%
}
+\NewCommandCopy\pflloiunif\LoiUnif
+
\NewDocumentCommand\LoiExpo{ s m }{%
\IfBooleanTF{#1}{\ensuremath{\mathscr{E}_{#2}}}{\ensuremath{\mathcal{E}_{#2}}}%
}
+\NewCommandCopy\pflloiexpo\LoiExpo
+
%====COORDONNEES, VECTEURS
-\NewDocumentCommand\CoordPtPl{ m m }{\ensuremath{\left(#1;#2\right)}}
-\NewDocumentCommand\CoordPtEsp{ m m m }{\ensuremath{\left(#1;#2;#3\right)}}
-\NewDocumentCommand\CoordVecPl{ m m }{\ensuremath{\begin{pmatrix} #1 \\ #2 \end{pmatrix}}}
-\NewDocumentCommand\CoordVecEsp{ m m m }{\ensuremath{\begin{pmatrix} #1 \\ #2 \\ #3 \end{pmatrix}}}
-\NewDocumentCommand\MatDeux{ m m m m }{\ensuremath{\begin{pmatrix} #1 & #2 \\ #3 & #4 \end{pmatrix}}}
+\RequirePackage{nicematrix}
+
+\NewDocumentCommand\CoordPtPl{ O{0} m m }{%
+ \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits
+ {%
+ \ensuremath{\left(#2;#3\right)}%
+ }%
+ {%
+ \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 ; #3 \end{pNiceMatrix}}%
+ }%
+}
+\NewCommandCopy\pflcoordptpl\CoordPtPl
+
+\NewDocumentCommand\CoordPtEsp{ O{0} m m m }{%
+ \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits
+ {%
+ \ensuremath{\left(#2;#3;#4\right)}%
+ }%
+ {%
+ \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 ; #3 ; #4 \end{pNiceMatrix}}%
+ }%
+}
+\NewCommandCopy\pflcoordptesp\CoordPtEsp
+
+\NewDocumentCommand\CoordVecPl{ O{0} m m }{%
+ \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits
+ {%
+ \ensuremath{\begin{pmatrix} #2 \\ #3 \end{pmatrix}}%
+ }%
+ {%
+ \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 \\ #3 \end{pNiceMatrix}}%
+ }%
+}
+\NewCommandCopy\pflcoordvecpl\CoordVecPl
+
+\NewDocumentCommand\CoordVecEsp{ O{0} m m m }{%
+ \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits
+ {%
+ \ensuremath{\begin{pmatrix} #2 \\ #3 \\ #4 \end{pmatrix}}%
+ }%
+ {%
+ \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 \\ #3 \\ #4 \end{pNiceMatrix}}%
+ }%
+}
+\NewCommandCopy\pflcoordvecesp\CoordVecEsp
+
+\NewDocumentCommand\MatDeux{ O{0} m m m m }{%
+ \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits
+ {%
+ \ensuremath{\begin{pmatrix} #2 & #3 \\ #4 & #5 \end{pmatrix}}%
+ }%
+ {%
+ \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 & #3 \\ #4 & #5 \end{pNiceMatrix}}%
+ }%
+}
+\NewCommandCopy\pflmatdeux\MatDeux
+
\NewDocumentCommand\Vecteur{ s m O{} }{%
\IfBooleanTF{#1}{\ensuremath{\vv*{#2}{#3}}}{\ensuremath{\vv{#2}}}%
}
+\NewCommandCopy\pflvect\Vecteur
+
+\NewDocumentCommand\EqParamDteEsp{ s O{t} m m m }{%
+ \IfBooleanTF{#1}%
+ {%
+ \ensuremath{\begin{cases}{#3}\\{#4}\\{#5}\end{cases}\text{ où }{#2}\in\R}%
+ }%
+ {%
+ \ensuremath{\begin{dcases}{#3}\\{#4}\\{#5}\end{dcases}\text{ où }{#2}\in\R}%
+ }%
+}
+\NewCommandCopy\pfleqparamdteesp\EqParamDteEsp
%====REPÈRES
\setKVdefault[ecrituresreperes]{%
@@ -204,6 +318,7 @@
\ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\imath},\Vecteur{\vphantom{t}\jmath}\right)}\xspace%
}%
}
+\NewCommandCopy\pflrepoij\RepereOij
\NewDocumentCommand\RepereOuv{ s O{} }{%
\useKVdefault[ecrituresreperes]%
@@ -216,6 +331,7 @@
\ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}u},\Vecteur{\vphantom{t}v}\right)}\xspace%
}%
}
+\NewCommandCopy\pflrepouv\RepereOuv
\NewDocumentCommand\RepereOijk{ s O{} }{%
\useKVdefault[ecrituresreperes]%
@@ -228,6 +344,7 @@
\ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\imath},\Vecteur{\vphantom{t}\jmath},\Vecteur{\vphantom{t}\smash{k}}\right)}\xspace%
}%
}
+\NewCommandCopy\pflrepoijk\RepereOijk
\NewDocumentCommand\ReperePlan{ s O{} m m m }{%
\useKVdefault[ecrituresreperes]%
@@ -251,6 +368,7 @@
\ensuremath{\left(#3\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\vecteurun},\Vecteur{\vphantom{t}\vecteurdeux}\right)}%
}%
}
+\NewCommandCopy\pflrepplan\ReperePlan
\NewDocumentCommand\RepereEspace{ s O{} m m m m }{%
\useKVdefault[ecrituresreperes]%
@@ -276,6 +394,7 @@
\ensuremath{\left(#3\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\vecteurun},\Vecteur{\vphantom{t}\vecteurdeux},\Vecteur{\vphantom{t}\vecteurtrois}\right)}%
}%
}
+\NewCommandCopy\pflrepesp\RepereEspace
%====PROBAS
\setKVdefault[probascondit]{%
@@ -296,6 +415,7 @@
\ifboolKV[probascondit]{BB}{\def\notationproba{\mathbb{P}}}{}%
\notationproba_{#3}{\left(#2\right)} \ifboolKV[probascondit]{Formule}{= \dfrac{\notationproba{\left(#2 \cap #3\right)}}{\notationproba{\left(#3\right)}}}{}%
}
+\NewCommandCopy\pflprobcondit\ProbaCondit
%====IF, IC
\defKV[IntFluc]{%
@@ -368,6 +488,7 @@
}%
{}%
}
+\NewCommandCopy\pflintfluct\IntFluctu
\NewDocumentCommand\RedactionIntFluct{ O{} m }{%
%\setKV[IntFluc]{#1}%
@@ -377,6 +498,7 @@
& \IntFluctu[Formule=false,Details=false,Calcul=true,#1] && \\
\end{flalign*}%
}
+\NewCommandCopy\pflredacintfluct\RedactionIntFluct
\defKV[IntConf]{%
Seuil=\def\intflucconfProba{#1},%
@@ -449,6 +571,7 @@
}%
{}%
}
+\NewCommandCopy\pflintconf\IntConf
\NewDocumentCommand\RedactionIntConf{ O{} m }{%
%\setKV[IntConf]{#1}%
@@ -458,5 +581,6 @@
& \IntConf[Formule=false,Details=false,Calcul=true,#1] && \\
\end{flalign*}%
}
+\NewCommandCopy\pflredacintconf\RedactionIntConf
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex
index 229fb03434..a90595d3df 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-espace.tex
@@ -1,5 +1,5 @@
% proflycee-tools-espace.tex
-% Copyright 2024 Cédric Pierquet
+% Copyright 2024-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\RequirePackage{iftex}
@@ -1056,5 +1056,6 @@
% }%
\fi%
}
+\NewCommandCopy\pflschemesp\SchemaEspace
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
index af4aebf384..42b23be551 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-minted.tex
@@ -2,6 +2,7 @@
% Copyright 2023-2024 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%3.05b En standy pour le moment...
%3.00g Modif mineure pour la marge gauche
%2.7.5 Argument optionnel pour les numéros de lignes + changement déclaration environnements
%2.7.3 Correction de la couleur des bordures
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
index 418c5aa8cc..52ef738955 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-piton.tex
@@ -2,6 +2,8 @@
% Copyright 2023-2024 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%3.04f Ajout de clés pour la coloration des nombres et Piton
+%3.04d PitonInputFile et styles, pour compatibilité pfm
%3.03c Thonny via piton + modification clé gobble ?
%3.01f PseudoCode via piton (?)
%3.01e Correction du comportement de la console repl piton/pyluatex
@@ -41,7 +43,7 @@
BarreTitre=true,%
Titre={{\scriptsize\faCode}~~Code Python},%
EspacementV=0.5\baselineskip,%
- CouleurNombres=orange
+ CouleurNombres={orange!75!black}
}
%==Style Moderne
@@ -159,7 +161,7 @@
\useKVdefault[envpiton]%
\setKV[envpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
%------les styles piton
- \SetPitonStyle{ Number = \color{\CODPITcolnb} }
+ \SetPitonStyle[Python]{ Number = \color{\CODPITcolnb} }
\ifboolKV[envpiton]{Lignes}%si lignes=true
{\PitonOptions{left-margin=0.75em,line-numbers={skip-empty-lines=false,label-empty-lines=true,#3}}}%left-margin=auto,
{}%
@@ -220,6 +222,57 @@
\endtcolorbox%
}
+%inputfile
+\NewDocumentCommand\CodePitonFichier{ O{} m D<>{} }{%
+ {\tcbset{reset}
+ \useKVdefault[envpiton]%
+ \setKV[envpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
+ %------les styles piton
+ \SetPitonStyle[Python]{ Number = \color{\CODPITcolnb} }
+ \ifboolKV[envpiton]{Lignes}%si lignes=true
+ {\PitonOptions{left-margin=0.75em,line-numbers,line-numbers={skip-empty-lines=false,label-empty-lines=true,#3}}}%left-margin=auto,
+ {}%
+ \PitonOptions{break-lines,indent-broken-lines,continuation-symbol={\;}}%,numbers-sep=0.65em}%language=Python}
+ %------les styles tcbox
+ \IfEq{\CODPITstyle}{Moderne}%style Moderne (défaut)
+ {%
+ \tcbset{cadre/.style={}}
+ \tcbset{titre/.style={}}
+ \tcbset{stylebase/.style={stylepiton,colframe=CouleurVertForet,colback=CouleurVertForet!5,width=\CODPITlargeur,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign,leftupper=0.75em}}
+ \ifboolKV[envpiton]{Filigrane}%si filigrane
+ {\tcbset{filigrane/.style={watermark text={\faPython},watermark opacity=0.175,watermark zoom=0.50}}}%
+ {\tcbset{filigrane/.style={}}}%
+ }
+ {}%
+ \IfEq{\CODPITstyle}{Classique}%style Classique
+ {%
+ \ifboolKV[envpiton]{Lignes}%si lignes=true
+ {\tcbset{stylebase/.style={thonnystylelineos,leftupper=0.75em,width=\CODPITlargeur,colframe=darkgray!50!black,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign}}}%
+ {\tcbset{stylebase/.style={thonnystyle,leftupper=0.4em,width=\CODPITlargeur,colframe=darkgray!50!black,fontupper=\CODPITfonte,fontlower=\CODPITfonte,\CODPITalign}}}%
+ \ifboolKV[envpiton]{Filigrane}%si filigrane
+ {\tcbset{filigrane/.style={watermark text={\faPython},watermark opacity=0.25,watermark zoom=0.50}}}%
+ {\tcbset{filigrane/.style={}}}%
+ \ifboolKV[envpiton]{BarreTitre}%
+ {%
+ \ifboolKV[envpiton]{Cadre}
+ {\tcbset{cadre/.style={}}}%
+ {\tcbset{cadre/.style={boxrule=0pt,frame hidden}}}%
+ \tcbset{titre/.style={lefttitle=0.4em,title={\CODPITtitre},fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=darkgray!50!black}}
+ }%
+ {%
+ \tcbset{titre/.style={notitle}}
+ \ifboolKV[envpiton]{Cadre}
+ {\tcbset{cadre/.style={}}}
+ {\tcbset{cadre/.style={boxrule=0pt,frame hidden}}}
+ }
+ }
+ {}%
+ %on crée la boîte
+ \tcolorbox[stylebase,filigrane,cadre,titre]
+ \PitonInputFile{#2}
+ \endtcolorbox}%
+}
+
%piton >= 2.4
\NewPitonEnvironment{PseudoCodePiton}{ O{} m D<>{} }%
{%
@@ -317,6 +370,86 @@
\endtcolorbox%
}
+%--inputfile
+\NewDocumentCommand\PseudoCodePitonFichier{ O{} m D<>{} }{%
+ {\tcbset{reset}
+ \useKVdefault[envpcpiton]%
+ \setKV[envpcpiton]{#1}% on paramètres les nouvelles clés et on les simplifie
+ %------les styles piton
+ \ifboolKV[envpcpiton]{Lignes}%si lignes=true
+ {\PitonOptions{left-margin=0.75em,all-line-numbers}}%left-margin=auto,
+ {}%
+ \PitonOptions{break-lines,indent-broken-lines,language=minimal,continuation-symbol={\;}}%,numbers-sep=0.65em}%
+ \SetPitonStyle{ Number = }
+ \ifboolKV[envpcpiton]{Couleurs}%
+ {%
+ \SetPitonIdentifier[minimal]{Algorithme,Fonction,Début,Paramètre,Paramètres,Faire,Fin,Si,Pour,Tant,Que,que,alors,Alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables,Procédure}{\color{MotsClesPseudoCodeA}}
+ \SetPitonIdentifier[minimal]{Afficher,Renvoyer,Saisir}{\color{MotsClesPseudoCodeB}}
+ % \PitonOptions{
+ % identifiers =
+ % {
+ % names = {Algorithme,Fonction,Début,Paramètre,Paramètres,allant,Faire,Fin,Si,Pour,Tant,Que,que,alors,Alors,Sinon,SinonSi,FinSi,FinPour,FinTantQue,TantQue,Variable,Variables,Procédure},
+ % style = \color{MotsClesPseudoCodeA}
+ % } ,
+ % identifiers =
+ % {
+ % names = {Afficher,Retourner,Saisir},
+ % style = \color{MotsClesPseudoCodeB}
+ % }
+ % }%
+ \SetPitonStyle
+ {
+ String = \color{MotsClesPseudoCodeChaine},
+ Comment = \itshape\color{gray},
+ }
+ }%
+ {%
+ \SetPitonStyle
+ {
+ String = ,
+ Comment = \itshape
+ }
+ }%
+ %------les styles tcbox
+ \IfEq{\CODPITPCstyle}{Moderne}%style Moderne (défaut)
+ {%
+ \tcbset{cadre/.style={}}
+ \tcbset{titre/.style={}}
+ \tcbset{stylebase/.style={stylepcpiton,colframe=CouleurVertForet,colback=CouleurVertForet!5,width=\CODPITPClargeur,fontupper=\CODPITPCfonte,fontlower=\CODPITPCfonte,\CODPITPCalign,leftupper=0.75em}}
+ \ifboolKV[envpcpiton]{Filigrane}%si filigrane
+ {\tcbset{filigrane/.style={watermark text={\faCode},watermark opacity=0.175,watermark zoom=0.50}}}%
+ {\tcbset{filigrane/.style={}}}%
+ }
+ {}%
+ \IfEq{\CODPITPCstyle}{Classique}%style Classique
+ {%
+ \ifboolKV[envpcpiton]{Lignes}%si lignes=true
+ {\tcbset{stylebase/.style={thonnypcstylelineos,leftupper=0.75em,width=\CODPITPClargeur,colframe=darkgray!50!black,fontupper=\CODPITPCfonte,fontlower=\CODPITPCfonte,\CODPITPCalign}}}%
+ {\tcbset{stylebase/.style={thonnypcstyle,leftupper=0.4em,width=\CODPITPClargeur,colframe=darkgray!50!black,fontupper=\CODPITPCfonte,fontlower=\CODPITPCfonte,\CODPITPCalign}}}%
+ \ifboolKV[envpcpiton]{Filigrane}%si filigrane
+ {\tcbset{filigrane/.style={watermark text={\faCode},watermark opacity=0.25,watermark zoom=0.50}}}%
+ {\tcbset{filigrane/.style={}}}%
+ \ifboolKV[envpcpiton]{BarreTitre}%
+ {%
+ \ifboolKV[envpcpiton]{Cadre}
+ {\tcbset{cadre/.style={}}}%
+ {\tcbset{cadre/.style={boxrule=0pt,frame hidden}}}%
+ \tcbset{titre/.style={lefttitle=0.4em,title={\CODPITPCtitre},fonttitle=\bfseries\footnotesize\sffamily,colbacktitle=darkgray!50!black}}
+ }%
+ {%
+ \tcbset{titre/.style={notitle}}
+ \ifboolKV[envpcpiton]{Cadre}
+ {\tcbset{cadre/.style={}}}
+ {\tcbset{cadre/.style={boxrule=0pt,frame hidden}}}
+ }
+ }
+ {}%
+ %on crée la boîte
+ \tcolorbox[stylebase,filigrane,cadre,titre]
+ \PitonInputFile{#2}%
+ \endtcolorbox}%
+}
+
%======CONSOLE PYLUATEX (package à charger manuellement !!)
\tcbset{consolepylua/.style={%base de la boîte
enhanced,colback=white,colframe=CouleurVertForet,sharp corners,boxrule=1pt,%
@@ -345,12 +478,14 @@
\defKV[consolepyluatex]{%
Largeur=\def\ConsPyluaLarg{#1},
- Alignement=\def\ConsPyluaAlign{#1}
+ Alignement=\def\ConsPyluaAlign{#1},%
+ CouleurNombres=\def\CODPITcolnb{#1}
}
\setKVdefault[consolepyluatex]{%
Logo=true,%
Largeur=\linewidth,%
- Alignement=flush left
+ Alignement=flush left,%
+ CouleurNombres={orange!75!black}
}
\NewDocumentEnvironment{ConsolePiton}{ O{} D<>{} m }%
@@ -360,6 +495,7 @@
{
\restoreKV[consolepyluatex]% revenir au valeurs par défaut
\setKV[consolepyluatex]{#2}% lit les arguments optionnels
+ \SetPitonStyle[Python]{ Number = \color{\CODPITcolnb} }
\PitonOptions{width={\ConsPyluaLarg-5mm},break-lines,end-of-broken-line={\,},continuation-symbol={\;},#1}
%\PitonOptions{width={\ConsPyluaLarg-5mm},#1}
\PyLTVerbatimEnv
@@ -392,14 +528,16 @@
NomFichier=\def\thonnypitonfilename{#1},%
NomConsole=\def\thonnypitonshellname{#1},%
IntroConsole=\def\thonnypitonintroconsole{#1},%
- Gobble=\def\thonnypitongobble{#1}
+ Gobble=\def\thonnypitongobble{#1},%
+ CouleurNombres=\def\CODPITcolnb{#1}
}
\setKVdefault[pitonthonny]{%
NomFichier=script.py,%
NomConsole=console,%
IntroConsole={Python 3.11.6 /usr/bin/python},%
- Gobble={}
+ Gobble={},%
+ CouleurNombres={orange!75!black}
}
\NewPitonEnvironment{PitonThonnyEditor}{ D<>{} O{} m }%
@@ -407,6 +545,7 @@
\restoreKV[pitonthonny]%
\setKV[pitonthonny]{#1}%
\settowidth{\LargeurNumbersThonny}{\footnotesize\texttt{00}}%
+ \SetPitonStyle[Python]{Number=\color{\CODPITcolnb}}
\PitonOptions{left-margin=\LargeurNumbersThonny+1mm,line-numbers={skip-empty-lines=false,label-empty-lines=true},break-lines,indent-broken-lines,continuation-symbol={}}%
%--gestion du gobble
\IfStrEqCase{\thonnypitongobble}{%
@@ -428,6 +567,19 @@
\endtcolorbox%
}%
+\NewDocumentCommand\PitonThonnyEditorFichier{ D<>{} O{\linewidth} m }{%
+ {\restoreKV[pitonthonny]%
+ \setKV[pitonthonny]{#1}%
+ \settowidth{\LargeurNumbersThonny}{\footnotesize\texttt{00}}%
+ \SetPitonStyle[Python]{Number=\color{\CODPITcolnb}}
+ \PitonOptions{left-margin=\LargeurNumbersThonny+1mm,line-numbers,line-numbers={skip-empty-lines=false,label-empty-lines=true},break-lines,indent-broken-lines,continuation-symbol={}}%
+ \tcbset{tcbthonnypiton/.style={title=\vphantom{pf}\thonnypitonfilename\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
+ \tcolorbox[sharp corners=all,enhanced,size=small,width=#2,colframe=gray,colback=lightgray!5,tcbthonnypiton,fonttitle=\scriptsize\sffamily,coltitle=black,
+ attach boxed title to top left={yshift*=-0.4pt},fontupper=\footnotesize,bottom=-0.25mm,boxed title style={size=tight,colback=lightgray!15,sharp corners=all,boxrule=0.4pt,boxsep=2pt},boxrule=0.4pt,overlay={\begin{tcbclipinterior}\fill[draw=none,gray!25] ([shift={(0.4pt,0.4pt)}]frame.south west) rectangle ([shift={(\LargeurNumbersThonny+1mm+0.8pt,-0.4pt)}]frame.north west) ;\end{tcbclipinterior}}]%
+ \PitonInputFile{#3}
+ \endtcolorbox}%
+}%
+
\NewDocumentEnvironment{PitonThonnyConsole}{ D<>{} O{} m }%
{
\restoreKV[pitonthonny]%
@@ -435,6 +587,7 @@
\PyLTVerbatimEnv%
\tcbset{tcbthonnypitonconsole/.style={title=\vphantom{pf}\thonnypitonshellname\:\textcolor{gray}{×}},before skip=0.33\baselineskip,after skip=0.33\baselineskip}%
\noindent%
+ \SetPitonStyle[Python]{Number=\color{\CODPITcolnb}}
%--gestion du gobble
\IfStrEqCase{\thonnypitongobble}{%
{auto}{\PitonOptions{auto-gobble}}%
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex
index 92cff33772..9badf6e14e 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-probas.tex
@@ -1,6 +1,7 @@
% proflycee-tools-probas.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+% CC BY-SA 3.0 (from Mark Wibrow)
%%------LOISPROBAS
%calculs "simples"
@@ -97,6 +98,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(binomial(#3,#5)*#4^#5*(1-#4)^(#3-#5),#2)}}}%
}%
}
+\NewCommandCopy\pflbinomp\BinomP
\NewDocumentCommand{\BinomC}{ s O{3} m m m m }{%*=sci,2=prec,3=n,4=p,5=a,6=b
\def\BorneInf{#5}\def\BorneSup{#6}%
@@ -114,6 +116,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(add(binomial(#3,i)*#4^i*(1-#4)^(#3-i), i=\BorneInf..\BorneSup),#2)}}}%
}%
}
+\NewCommandCopy\pflbinomc\BinomC
\NewDocumentCommand{\GeomP}{ s O{3} m m }{%*=sci,2=prec,3=p,4=k
\IfBooleanTF{#1}%
@@ -124,6 +127,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round((1-#3)^(#4-1)*(#3),#2)}}}%
}%
}
+\NewCommandCopy\pflgeomp\GeomP
\NewDocumentCommand{\GeomC}{ s O{3} m m m }{%*=sci,2=prec,3=p,4=a,5=b
\def\BorneInf{#4}\def\BorneSup{#5}%
@@ -141,6 +145,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(add((1-#3)^(i-1)*(#3), i=\BorneInf..\BorneSup),#2)}}}%
}
}
+\NewCommandCopy\pflgeomc\GeomC
\NewDocumentCommand{\HypergeomP}{ s O{3} m m m m }{%*=sci,2=prec,3=N,4=n,5=m,6=k
\IfBooleanTF{#1}%
@@ -151,6 +156,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(binomial(#5,#6)*binomial(#3-#5,#4-#6)/binomial(#3,#4),#2)}}}%
}
}
+\NewCommandCopy\pflhypergeomp\HypergeomP
\NewDocumentCommand{\HypergeomC}{ s O{3} m m m m m }{%*=sci,2=prec,3=N,4=n,5=m,6=a,7=b
\def\BorneInf{#6}\def\BorneSup{#7}%
@@ -168,6 +174,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(add(binomial(#5,i)*binomial(#3-#5,#4-i)/binomial(#3,#4), i=\BorneInf..\BorneSup),#2)}}}
}%
}
+\NewCommandCopy\pflhypergeomc\HypergeomC
\NewDocumentCommand{\PoissonP}{ s O{3} m m }{%*=sci,2=prec,3=lbda,4=k
\IfBooleanTF{#1}%
@@ -178,6 +185,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(exp(-#3)*#3^#4/factorial(#4),#2)}}}%
}%
}
+\NewCommandCopy\pflpoissonp\PoissonP
\NewDocumentCommand{\PoissonC}{ s O{3} m m m }{%*=ing,2=prec,3=lbda,4=a,5=b
\def\BorneInf{#4}\def\BorneSup{#5}%
@@ -195,6 +203,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(add(exp(-#3)*#3^i/factorial(i), i=\BorneInf..\BorneSup),#2)}}}%
}%
}
+\NewCommandCopy\pflpoissonc\PoissonC
\NewDocumentCommand{\NormaleC}{ s O{3} m m m m }{%
%*=ing,2=prec,3=mu,4=sigma,5=a,6=b
@@ -214,6 +223,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintfloateval{round(Phi((\BorneSup-#3)/#4)-Phi((\BorneInf-#3)/#4),#2)}}}%
}%
}
+\NewCommandCopy\pflnormalec\NormaleC
\NewDocumentCommand{\ExpoC}{ s O{3} m m m }{%*=ing,2=prec,3=lbda,4=a,5=b
\def\BorneInf{#4}\def\BorneSup{#5}%
@@ -231,6 +241,7 @@
\num[minimum-decimal-digits=#2]{\xintFloatToDecimal{\xintFloatToDecimal{\xintfloateval{round(exp(-#3*\BorneInf)-exp(-#3*\BorneSup),#2)}}}}
}%
}
+\NewCommandCopy\pflexpoc\ExpoC
%%------ARBRESPROBAS
\NewDocumentCommand\numdots{}{\vphantom{0,5}\ldots}
@@ -245,7 +256,10 @@
StyleTrait=\def\PLAPtypetrait{#1},%
EpaisseurTrait=\def\PLAPeptrait{#1},%
PositionProbas=\def\PLAPposprob{#1},%
- CouleurFond=\def\PLAPcolback{#1}
+ CouleurFond=\def\PLAPcolback{#1},%
+ CouleurTraits=\def\PLAPcolarc{#1},%
+ CouleurProbas=\def\PLAPcolprobas{#1},%
+ CouleurNoeuds=\def\PLAPcolnoeuds{#1}
}
\setKVdefault[PLTIKZARBRE]{%
@@ -260,7 +274,10 @@
StyleTrait={},%
EpaisseurTrait=semithick,%
PositionProbas={},%
- CouleurFond=white
+ CouleurFond=white,%
+ CouleurTraits=black,%
+ CouleurProbas=black,%
+ CouleurNoeuds=black
}
\NewDocumentCommand\IntPlaceProbasArbre{ m m m m m }{%
@@ -278,21 +295,21 @@
}%
}
-\NewDocumentCommand\ArbreProbasTikz{ O{} m }{%1=options,2=libellés
+\NewDocumentCommand\ArbreProbasTikz{ O{} D<>{} m }{%1=options,2=libellés
\useKVdefault[PLTIKZARBRE]%
\setKV[PLTIKZARBRE]{#1}%
\setsepchar[.]{,./}%
- \readlist*\PLARBREDONNES{#2}%
- \begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite]
+ \readlist*\PLARBREDONNES{#3}%
+ \begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite,#2]
%styles
- \tikzstyle{noeud} = [font=\PLAPfont]
- \tikzstyle{probas}= [font=\PLAPfontproba]
+ \tikzstyle{noeud} = [font=\PLAPfont,text=\PLAPcolnoeuds]
+ \tikzstyle{probas}= [font=\PLAPfontproba,text=\PLAPcolprobas]
\ifboolKV[PLTIKZARBRE]{InclineProbas}
{\tikzstyle{PLetiquette}=[pos=0.525,sloped,inner sep=2pt,outer sep=2pt,rectangle]}
{\tikzstyle{PLetiquette}=[pos=0.525,inner sep=2pt,outer sep=2pt,rectangle]}
\ifboolKV[PLTIKZARBRE]{Fleche}
- {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait]}
- {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait]}
+ {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
+ {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
%arbre2x2
\IfEq{\PLAPtype}{2x2}
{%
@@ -567,23 +584,24 @@
}{}
\end{tikzpicture}
}
+\NewCommandCopy\pflarbreprobas\ArbreProbasTikz
-\NewDocumentEnvironment{EnvArbreProbasTikz}{ O{} m }%1=options,2=libellés
+\NewDocumentEnvironment{EnvArbreProbasTikz}{ O{} D<>{} m }%1=options,2=libellés
{
\useKVdefault[PLTIKZARBRE]
\setKV[PLTIKZARBRE]{#1}
\setsepchar[.]{,./}%
- \readlist*\PLARBREDONNES{#2}
- \begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite]
+ \readlist*\PLARBREDONNES{#3}
+ \begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite,#2]
%styles
- \tikzstyle{noeud} = [font=\PLAPfont]
- \tikzstyle{probas}= [font=\PLAPfontproba]
+ \tikzstyle{noeud} = [font=\PLAPfont,text=\PLAPcolnoeuds]
+ \tikzstyle{probas}= [font=\PLAPfontproba,text=\PLAPcolprobas]
\ifboolKV[PLTIKZARBRE]{InclineProbas}
{\tikzstyle{PLetiquette}=[pos=0.525,sloped,inner sep=2pt,outer sep=2pt,rectangle]}
{\tikzstyle{PLetiquette}=[pos=0.525,inner sep=2pt,outer sep=2pt,rectangle]}
\ifboolKV[PLTIKZARBRE]{Fleche}
- {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait]}
- {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait]}
+ {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
+ {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait,\PLAPcolarc]}
%arbre2x2
\IfEq{\PLAPtype}{2x2}
{%
@@ -907,6 +925,7 @@
\draw[thick,domain=-4:4,samples=100,\GRPHPROBcoulcbe] plot (\x,{\densnorm{\x}}) ;
\end{tikzpicture}%
}
+\NewCommandCopy\pflnormgraph\LoiNormaleGraphe
\NewDocumentCommand\LoiExpoGraphe{ O{} D<>{} m m m }{%1=options,2=optionstikz,3=l,4=a,5=b
%simplekv
@@ -935,15 +954,18 @@
\draw[thick,domain=0:3.8,samples=100,\GRPHPROBcoulcbe] plot (\x,{0.7*\densexpo{\x}}) ;
\end{tikzpicture}%
}
+\NewCommandCopy\pflexpograph\LoiExpoGraphe
%%------aNp/Cnp
\NewDocumentCommand\CalculAnp{ m m }{%avec et pour xint, p/n
pfactorial(#2-#1,#2)
}
+\NewCommandCopy\pflcalcanp\CalculAnp
\NewDocumentCommand\CalculCnp{ m m }{%avec et pour xint, p/n
binomial(#2,#1)
}
+\NewCommandCopy\pflcalccnp\CalculCnp
\setKVdefault[anpCnp]{%
Formule=false,%
@@ -959,6 +981,8 @@
{\xinteval{\CalculAnp{#3}{#4}}}%non formaté
{\num{\xinteval{\CalculAnp{#3}{#4}}}}%formaté
}
+\NewCommandCopy\pflarrang\Arrangement
+
\NewDocumentCommand\Combinaison{ s O{} m m }{%p/n
\useKVdefault[anpCnp]%
\setKV[anpCnp]{#2}%
@@ -969,6 +993,7 @@
{\xinteval{\CalculCnp{#3}{#4}}}%non formaté
{\num{\xinteval{\CalculCnp{#3}{#4}}}}%formaté
}
+\NewCommandCopy\pflcombin\Combinaison
%%------Fonction de répartition
\NewDocumentCommand\CrochetFctRepart{ m m }{
@@ -1133,6 +1158,7 @@
{}%
\end{tikzpicture}
}
+\NewCommandCopy\pflhistobinom\HistogrammeBinomiale
\NewDocumentEnvironment{HistoBinomiale}{ O{} D<>{} m m }%
{%
@@ -1224,4 +1250,513 @@
}%
}
+%====ARBRES CHOIX
+\RequirePackage{commalists-tools}
+
+\tikzset{arbrechoixaretes/.style={semithick}}
+\tikzset{arbrechoixsommets/.style={circle,draw=none,inner sep=1pt}}
+\tikzset{arbrechoixresultats/.style={rectangle,draw,inner sep=1.5pt}}
+\tikzset{arbrechoixnotices/.style={inner sep=1pt,font=\small\ttfamily,midway,below=\fpeval{0.75*\LISTECHOIXinterfeuille}cm,}}
+\tikzset{arbrechoixdeconotices/.style={semithick,decoration={brace,mirror,raise=\fpeval{0.25*\LISTECHOIXechelle*\LISTECHOIXinterfeuille}cm,amplitude=\fpeval{0.5*\LISTECHOIXechelle*\LISTECHOIXinterfeuille}cm},decorate}}
+
+%https://tex.stackexchange.com/questions/73173/how-to-change-the-item-separator-in-tikz-foreach-command/174135#174135
+%Mark Wibrow := CC BY-SA 3.0
+\makeatletter
+\let\pgffor@dotsscanend@original=\pgffor@dotsscanend
+\def\PGFFOR@PARAMDELIM#1{%
+ \def\pgffor@emptyvalues{#1 \pgffor@stop#1}%
+ \def\pgffor@normal@list##1{%
+ \def\pgffor@values{##1#1 \pgffor@stop#1}%
+ \ifx\pgffor@values\pgffor@emptyvalues
+ \def\pgffor@values{\pgffor@stop#1}%
+ \fi%
+ \let\pgffor@body=\pgfutil@empty%
+ \global\pgffor@continuetrue%
+ \pgffor@collectbody}%
+ \def\pgffor@scanround(##1)##2#1{\def\pgffor@value{(##1)##2}\pgffor@scanned}%
+ \def\pgffor@scanone##1#1{\def\pgffor@value{##1}\pgffor@scanned}%
+ \def\pgffor@dotsscanend##1#1{\pgffor@dotsscanend@original##1,}%
+}
+
+\pgfkeys{/pgf/foreach/separator/.code=\PGFFOR@PARAMDELIM{#1}}
+\makeatother
+
+\defKV[arbrechoix]{%
+ EspaceNiveaux=\def\LISTECHOIXinterniv{#1},%
+ EspaceFeuilles=\def\LISTECHOIXinterfeuille{#1},%
+ Echelle=\def\LISTECHOIXechelle{#1},%
+ Repet=\def\LISTECHOIXrepet{#1},%
+ Notice=\def\LISTECHOIXnotice{#1},%
+ CouleursNiveaux=\def\LISTECHOIXcoulniv{#1},%
+ SepResultats=\def\LISTECHOIXsepres{#1}
+}
+
+\setKVdefault[arbrechoix]{%
+ EspaceNiveaux=2.25,%
+ EspaceFeuilles=0.5,%
+ Echelle=1,%
+ Repet={},%
+ Notice={},%
+ TraitsNotice=false,%
+ CouleursNiveaux=black,%
+ AffResultats=false,%
+ SepResultats={}
+}
+
+\NewDocumentCommand\ArbreChoix{ O{} D<>{} m }{%
+ \restoreKV[arbrechoix]%
+ \setKV[arbrechoix]{#1}%
+ \def\LISTECHOIX{#3}%
+ \IfEq{\LISTECHOIXrepet}{}%
+ {}%
+ {%
+ \foreach \i in {2,...,\LISTECHOIXrepet}{%
+ \xdef\LISTECHOIX{\LISTECHOIX,#3}%
+ }%
+ }%
+ %données utiles
+ \setsepchar[.]{,./}%
+ \readlist*\TRLISTECHOIX{\LISTECHOIX}%
+ %les couleurs...
+ \IfSubStr{\LISTECHOIXcoulniv}{,}%
+ {%
+ \setsepchar{,}%
+ \readlist*\TRLISTECHOIXCOUL{\LISTECHOIXcoulniv}%
+ }%
+ {%
+ \xdef\tmplistcouleurs{\LISTECHOIXcoulniv}%
+ \foreach \i in {2,...,\TRLISTECHOIXlen}{%
+ \xdef\tmplistcouleurs{\tmplistcouleurs,\LISTECHOIXcoulniv}%
+ }%
+ \setsepchar{,}%
+ \readlist*\TRLISTECHOIXCOUL{\tmplistcouleurs}%
+ }%
+ %la figure
+ \begin{tikzpicture}[scale=\LISTECHOIXechelle,transform shape,#2]
+ %création de la liste des étapes intermédiaires
+ \def\tmpnbchoix{1}
+ \def\tmpnbchoixniv{1}
+ \def\tmplistnbchoix{1}
+ \foreach \i in {1,...,\TRLISTECHOIXlen}{%
+ \itemtomacro\TRLISTECHOIX[\i]\tmptrlistchoix%
+ \setsepchar[.]{/}%
+ \readlist*\TRLISTECHOIXTMP{\tmptrlistchoix}%
+ \xdef\tmpnbchoix{\xinteval{\tmpnbchoix*\TRLISTECHOIXTMPlen}}%
+ \xdef\tmpnbchoixniv{\tmpnbchoixniv,\TRLISTECHOIXTMPlen}%nb choix par niveau
+ \xdef\tmplistnbchoix{\tmplistnbchoix,\tmpnbchoix}%nb choix petit à petit
+ }%
+ %données utiles tout le temps
+ \getvaluefromlist{\tmplistnbchoix}{-1}[\nbeltstotal]%
+ %découpage horizontal
+ \ifboolKV[arbrechoix]{TraitsNotice}%
+ {%
+ \foreach \i in {1,...,\TRLISTECHOIXlen}{%
+ \draw[semithick,lightgray!50,densely dashed] ({\i*\LISTECHOIXinterniv},0) --++ (0,{\nbeltstotal*\LISTECHOIXinterfeuille}) ;
+ }%
+ }%
+ {}%
+ %boucle décroissante (OK !!)
+ \foreach \TTT in {\TRLISTECHOIXlen,...,1}{%
+ %\xdef\invTTT{\xinteval{\TRLISTECHOIXlen-\TTT+1}}%
+ \getvaluefromlist{\tmplistnbchoix}{\numexpr\TTT+1\relax}[\nbelts]%
+ \xdef\espchoiceV{\xintfloateval{(\nbeltstotal)/\nbelts}}%
+ \xdef\offsetchoiceV{\xintfloateval{0.5*\LISTECHOIXinterfeuille*(\nbeltstotal-(\nbelts-1)*\espchoiceV)}}%
+ \getvaluefromlist{\tmplistnbchoix}{\TTT}[\nbeltsavant]%
+ \xdef\tmpmodchoix{\xintieval{\nbelts/\nbeltsavant}}%
+ \foreach \i in {1,...,\nbelts}{%
+ \xdef\tmpii{\xinteval{\xintiiRem{\xinteval{\i-1}}{\tmpmodchoix}+1}}%
+ \node[arbrechoixsommets,text={\TRLISTECHOIXCOUL[\TTT]}] (N-\TTT-\i) at ({(\TTT)*\LISTECHOIXinterniv},{\offsetchoiceV+(\nbelts-\i)*\LISTECHOIXinterfeuille*\espchoiceV}) {\TRLISTECHOIX[\TTT,\tmpii]} ;
+ }
+ \ifnum\TTT=\TRLISTECHOIXlen%
+ \coordinate (N-0-1) at ({0*\LISTECHOIXinterniv},{\offsetchoiceV+0.5*(\nbeltstotal-1)*\LISTECHOIXinterfeuille} );
+ \fi
+ }
+ %les flèches
+ \foreach \j in {1,...,\TRLISTECHOIXlen}{%
+ \getvaluefromlist{\tmplistnbchoix}{\j}[\nbnoeuds]%nb nœuds de départ
+ \getvaluefromlist{\tmpnbchoixniv}{\numexpr\j+1\relax}[\nbfleches]%nb flèche par nœud
+ \foreach \i in {1,...,\nbnoeuds}{%
+ \foreach \k in {1,...,\nbfleches}{%
+ \xdef\tmpk{\xinteval{(\i-1)*(\nbfleches)+\k}}
+ \draw[arbrechoixaretes,color={\TRLISTECHOIXCOUL[\j]}] (N-\the\numexpr\j-1\relax-\i) -- (N-\j-\tmpk) ;
+ }
+ }
+ }
+ %notice
+ \IfEq{\LISTECHOIXnotice}{}%
+ {}%
+ {%
+ \foreach \notice [count=\i] in \LISTECHOIXnotice
+ {%
+ \draw[arbrechoixdeconotices] ({(\i-1)*\LISTECHOIXinterniv},0) -- ({(\i)*\LISTECHOIXinterniv},0) node[arbrechoixnotices] {\notice} ;
+ }%
+ }%
+ %listerésultats
+ \ifboolKV[arbrechoix]{AffResultats}%
+ {%
+ \xdef\malistedecombis{}%
+ \ifnum\TRLISTECHOIXlen=2%
+ \itemtomacro\TRLISTECHOIX[1]\myfirsttmp%
+ \itemtomacro\TRLISTECHOIX[2]\mysecondtmp%
+ \foreach \i [separator=/] in \myfirsttmp {%
+ \foreach \j [separator=/] in \mysecondtmp {
+ \xdef\malistedecombis{\malistedecombis,\i\LISTECHOIXsepres\j}%
+ }%
+ }%
+ \fi
+ \ifnum\TRLISTECHOIXlen=3%
+ \itemtomacro\TRLISTECHOIX[1]\myfirsttmp%
+ \itemtomacro\TRLISTECHOIX[2]\mysecondtmp%
+ \itemtomacro\TRLISTECHOIX[3]\mythirdtmp%
+ \foreach \i [separator=/] in \myfirsttmp {%
+ \foreach \j [separator=/] in \mysecondtmp {
+ \foreach \k [separator=/] in \mythirdtmp {
+ \xdef\malistedecombis{\malistedecombis,\i\LISTECHOIXsepres\j\LISTECHOIXsepres\k}%
+ }%
+ }%
+ }%
+ \fi
+ \ifnum\TRLISTECHOIXlen=4%
+ \itemtomacro\TRLISTECHOIX[1]\myfirsttmp%
+ \itemtomacro\TRLISTECHOIX[2]\mysecondtmp%
+ \itemtomacro\TRLISTECHOIX[3]\mythirdtmp%
+ \itemtomacro\TRLISTECHOIX[4]\myfourthtmp%
+ \foreach \i [separator=/] in \myfirsttmp {%
+ \foreach \j [separator=/] in \mysecondtmp {
+ \foreach \k [separator=/] in \mythirdtmp {
+ \foreach \l [separator=/] in \myfourthtmp {
+ \xdef\malistedecombis{\malistedecombis,\i\LISTECHOIXsepres\j\LISTECHOIXsepres\k\LISTECHOIXsepres\l}%
+ }%
+ }%
+ }%
+ }%
+ \fi
+ \ifnum\TRLISTECHOIXlen=5%
+ \itemtomacro\TRLISTECHOIX[1]\myfirsttmp%
+ \itemtomacro\TRLISTECHOIX[2]\mysecondtmp%
+ \itemtomacro\TRLISTECHOIX[3]\mythirdtmp%
+ \itemtomacro\TRLISTECHOIX[4]\myfourthtmp%
+ \itemtomacro\TRLISTECHOIX[5]\myfifthtmp%
+ \foreach \i [separator=/] in \myfirsttmp {%
+ \foreach \j [separator=/] in \mysecondtmp {
+ \foreach \k [separator=/] in \mythirdtmp {
+ \foreach \l [separator=/] in \myfourthtmp {
+ \foreach \m [separator=/] in \myfifthtmp {
+ \xdef\malistedecombis{\malistedecombis,\i\LISTECHOIXsepres\j\LISTECHOIXsepres\k\LISTECHOIXsepres\l\LISTECHOIXsepres\m}%
+ }%
+ }%
+ }%
+ }%
+ }%
+ \fi
+ \foreach \i in {1,...,\nbeltstotal}{%
+ \xdef\j{\xinteval{\i+1}}%
+ \draw (N-\TRLISTECHOIXlen-\i) node[arbrechoixresultats,right=\fpeval{0.5*\LISTECHOIXechelle*\LISTECHOIXinterniv}cm] {\getvaluefromlist*\malistedecombis{\j}} ;
+ }
+ }%
+ {}%
+ \end{tikzpicture}%
+}
+\NewCommandCopy\pflarbrechoix\ArbreChoix
+
+\NewDocumentCommand\IntNoeudArbreSansRemise{ m m m }{%
+ \node[arbrechoixsommets,text={\TRLISTECHOIXCOUL[#1]}] (T-#1-#2) at (N-#1-#2) {\TRLISTECHOIX[#3]} ;
+}
+\NewDocumentCommand\IntAreteArbreSansRemise{ m m }{%
+ \draw[arbrechoixaretes] (T-#1) -- (T-#2) ;
+}
+
+\NewDocumentCommand\ArbreChoixSansRemise{ O{} D<>{} m }{%
+ \restoreKV[arbrechoix]%
+ \setKV[arbrechoix]{#1}%
+ \def\LISTECHOIX{#3}%
+ %couleurs
+ \readlist*\TRLISTECHOIX{\LISTECHOIX}%
+ \IfSubStr{\LISTECHOIXcoulniv}{,}%
+ {%
+ \setsepchar{,}%
+ \readlist*\TRLISTECHOIXCOUL{\LISTECHOIXcoulniv}%
+ }%
+ {%
+ \xdef\tmplistcouleurs{\LISTECHOIXcoulniv}%
+ \foreach \i in {2,...,\TRLISTECHOIXlen}{%
+ \xdef\tmplistcouleurs{\tmplistcouleurs,\LISTECHOIXcoulniv}%
+ }%
+ \setsepchar{,}%
+ \readlist*\TRLISTECHOIXCOUL{\tmplistcouleurs}%
+ }%
+ %figure
+ \begin{tikzpicture}[scale=\LISTECHOIXechelle,transform shape,#2]
+ %création de la liste des étapes intermédiaires (OK)
+ \def\tmpnbchoixniv{\TRLISTECHOIXlen}%
+ \def\tmplistnbchoix{1,\TRLISTECHOIXlen}%
+ \def\tmplistnbchoixfact{\TRLISTECHOIXlen}%
+ \foreach \i in {1,...,\xinteval{\TRLISTECHOIXlen-1}}{%
+ \xdef\tmpnbchoix{\xinteval{\TRLISTECHOIXlen-\i}}%
+ \xdef\tmpnbchoixniv{\tmpnbchoixniv,\tmpnbchoix}%nb nœuds par niveau
+ \xdef\tmplistnbchoixfact{\xinteval{\tmplistnbchoixfact*(\TRLISTECHOIXlen-\i)}}%
+ \xdef\tmplistnbchoix{\tmplistnbchoix,\tmplistnbchoixfact}%nb choix petit à petit
+ }
+ %données utiles tout le temps
+ \getvaluefromlist{\tmplistnbchoix}{-1}[\nbeltstotal]%
+ \ifboolKV[arbrechoix]{TraitsNotice}%
+ %notice découpage
+ {%
+ \foreach \i in {1,...,\TRLISTECHOIXlen}{%
+ \draw[semithick,lightgray!50,densely dashed] ({\i*\LISTECHOIXinterniv},0) --++ (0,{\nbeltstotal*\LISTECHOIXinterfeuille}) ;
+ }%
+ }%
+ {}%
+ %boucle décroissante pour la création des nœuds
+ \foreach \TTT in {\TRLISTECHOIXlen,...,1}{%
+ \getvaluefromlist{\tmplistnbchoix}{\numexpr\TTT+1\relax}[\nbelts]%
+ \xdef\espchoiceV{\xintfloateval{(\nbeltstotal)/\nbelts}}%
+ \xdef\offsetchoiceV{\xintfloateval{0.5*\LISTECHOIXinterfeuille*(\nbeltstotal-(\nbelts-1)*\espchoiceV)}}%
+ \foreach \i in {1,...,\nbelts}{%
+ \coordinate (N-\TTT-\i) at ({(\TTT)*\LISTECHOIXinterniv},{\offsetchoiceV+(\nbelts-\i)*\LISTECHOIXinterfeuille*\espchoiceV});
+ }
+ \ifnum\TTT=\TRLISTECHOIXlen%
+ \coordinate (T-0-1) at ({0*\LISTECHOIXinterniv},{\offsetchoiceV+0.5*(\nbeltstotal-1)*\LISTECHOIXinterfeuille} );
+ \fi
+ }
+ %les sommets et les flèches ??
+ \ifnum\TRLISTECHOIXlen=4%
+ %N1
+ \IntNoeudArbreSansRemise{1}{1}{1}
+ \IntNoeudArbreSansRemise{1}{2}{2}
+ \IntNoeudArbreSansRemise{1}{3}{3}
+ \IntNoeudArbreSansRemise{1}{4}{4}
+ \IntAreteArbreSansRemise{0-1}{1-1}
+ \IntAreteArbreSansRemise{0-1}{1-2}
+ \IntAreteArbreSansRemise{0-1}{1-3}
+ \IntAreteArbreSansRemise{0-1}{1-4}
+ %N2
+ \IntNoeudArbreSansRemise{2}{1}{2}
+ \IntNoeudArbreSansRemise{2}{2}{3}
+ \IntNoeudArbreSansRemise{2}{3}{4}
+ \IntNoeudArbreSansRemise{2}{4}{1}
+ \IntNoeudArbreSansRemise{2}{5}{3}
+ \IntNoeudArbreSansRemise{2}{6}{4}
+ \IntNoeudArbreSansRemise{2}{7}{1}
+ \IntNoeudArbreSansRemise{2}{8}{2}
+ \IntNoeudArbreSansRemise{2}{9}{4}
+ \IntNoeudArbreSansRemise{2}{10}{1}
+ \IntNoeudArbreSansRemise{2}{11}{2}
+ \IntNoeudArbreSansRemise{2}{12}{3}
+ \IntAreteArbreSansRemise{1-1}{2-1}
+ \IntAreteArbreSansRemise{1-1}{2-2}
+ \IntAreteArbreSansRemise{1-1}{2-3}
+ \IntAreteArbreSansRemise{1-2}{2-4}
+ \IntAreteArbreSansRemise{1-2}{2-5}
+ \IntAreteArbreSansRemise{1-2}{2-6}
+ \IntAreteArbreSansRemise{1-3}{2-7}
+ \IntAreteArbreSansRemise{1-3}{2-8}
+ \IntAreteArbreSansRemise{1-3}{2-9}
+ \IntAreteArbreSansRemise{1-4}{2-10}
+ \IntAreteArbreSansRemise{1-4}{2-11}
+ \IntAreteArbreSansRemise{1-4}{2-12}
+ %N3
+ \IntNoeudArbreSansRemise{3}{1}{3}
+ \IntNoeudArbreSansRemise{3}{2}{4}
+ \IntNoeudArbreSansRemise{3}{3}{2}
+ \IntNoeudArbreSansRemise{3}{4}{4}
+ \IntNoeudArbreSansRemise{3}{5}{2}
+ \IntNoeudArbreSansRemise{3}{6}{3}
+ \IntNoeudArbreSansRemise{3}{7}{3}
+ \IntNoeudArbreSansRemise{3}{8}{4}
+ \IntNoeudArbreSansRemise{3}{9}{1}
+ \IntNoeudArbreSansRemise{3}{10}{4}
+ \IntNoeudArbreSansRemise{3}{11}{1}
+ \IntNoeudArbreSansRemise{3}{12}{3}
+ \IntNoeudArbreSansRemise{3}{13}{2}
+ \IntNoeudArbreSansRemise{3}{14}{4}
+ \IntNoeudArbreSansRemise{3}{15}{1}
+ \IntNoeudArbreSansRemise{3}{16}{4}
+ \IntNoeudArbreSansRemise{3}{17}{1}
+ \IntNoeudArbreSansRemise{3}{18}{2}
+ \IntNoeudArbreSansRemise{3}{19}{2}
+ \IntNoeudArbreSansRemise{3}{20}{3}
+ \IntNoeudArbreSansRemise{3}{21}{1}
+ \IntNoeudArbreSansRemise{3}{22}{3}
+ \IntNoeudArbreSansRemise{3}{23}{1}
+ \IntNoeudArbreSansRemise{3}{24}{2}
+ \IntAreteArbreSansRemise{2-1}{3-1}
+ \IntAreteArbreSansRemise{2-1}{3-2}
+ \IntAreteArbreSansRemise{2-2}{3-3}
+ \IntAreteArbreSansRemise{2-2}{3-4}
+ \IntAreteArbreSansRemise{2-3}{3-5}
+ \IntAreteArbreSansRemise{2-3}{3-6}
+ \IntAreteArbreSansRemise{2-4}{3-7}
+ \IntAreteArbreSansRemise{2-4}{3-8}
+ \IntAreteArbreSansRemise{2-5}{3-9}
+ \IntAreteArbreSansRemise{2-5}{3-10}
+ \IntAreteArbreSansRemise{2-6}{3-11}
+ \IntAreteArbreSansRemise{2-6}{3-12}
+ \IntAreteArbreSansRemise{2-7}{3-13}
+ \IntAreteArbreSansRemise{2-7}{3-14}
+ \IntAreteArbreSansRemise{2-8}{3-15}
+ \IntAreteArbreSansRemise{2-8}{3-16}
+ \IntAreteArbreSansRemise{2-9}{3-17}
+ \IntAreteArbreSansRemise{2-9}{3-18}
+ \IntAreteArbreSansRemise{2-10}{3-19}
+ \IntAreteArbreSansRemise{2-10}{3-20}
+ \IntAreteArbreSansRemise{2-11}{3-21}
+ \IntAreteArbreSansRemise{2-11}{3-22}
+ \IntAreteArbreSansRemise{2-12}{3-23}
+ \IntAreteArbreSansRemise{2-12}{3-24}
+ %N4
+ \IntNoeudArbreSansRemise{4}{1}{4}
+ \IntNoeudArbreSansRemise{4}{2}{3}
+ \IntNoeudArbreSansRemise{4}{3}{4}
+ \IntNoeudArbreSansRemise{4}{4}{2}
+ \IntNoeudArbreSansRemise{4}{5}{3}
+ \IntNoeudArbreSansRemise{4}{6}{2}
+ \IntNoeudArbreSansRemise{4}{7}{4}
+ \IntNoeudArbreSansRemise{4}{8}{3}
+ \IntNoeudArbreSansRemise{4}{9}{4}
+ \IntNoeudArbreSansRemise{4}{10}{1}
+ \IntNoeudArbreSansRemise{4}{11}{3}
+ \IntNoeudArbreSansRemise{4}{12}{1}
+ \IntNoeudArbreSansRemise{4}{13}{4}
+ \IntNoeudArbreSansRemise{4}{14}{2}
+ \IntNoeudArbreSansRemise{4}{15}{4}
+ \IntNoeudArbreSansRemise{4}{16}{1}
+ \IntNoeudArbreSansRemise{4}{17}{2}
+ \IntNoeudArbreSansRemise{4}{18}{1}
+ \IntNoeudArbreSansRemise{4}{19}{3}
+ \IntNoeudArbreSansRemise{4}{20}{2}
+ \IntNoeudArbreSansRemise{4}{21}{3}
+ \IntNoeudArbreSansRemise{4}{22}{1}
+ \IntNoeudArbreSansRemise{4}{23}{2}
+ \IntNoeudArbreSansRemise{4}{24}{1}
+ \IntAreteArbreSansRemise{3-1}{4-1}
+ \IntAreteArbreSansRemise{3-2}{4-2}
+ \IntAreteArbreSansRemise{3-3}{4-3}
+ \IntAreteArbreSansRemise{3-4}{4-4}
+ \IntAreteArbreSansRemise{3-5}{4-5}
+ \IntAreteArbreSansRemise{3-6}{4-6}
+ \IntAreteArbreSansRemise{3-7}{4-7}
+ \IntAreteArbreSansRemise{3-8}{4-8}
+ \IntAreteArbreSansRemise{3-9}{4-9}
+ \IntAreteArbreSansRemise{3-10}{4-10}
+ \IntAreteArbreSansRemise{3-11}{4-11}
+ \IntAreteArbreSansRemise{3-12}{4-12}
+ \IntAreteArbreSansRemise{3-13}{4-13}
+ \IntAreteArbreSansRemise{3-14}{4-14}
+ \IntAreteArbreSansRemise{3-15}{4-15}
+ \IntAreteArbreSansRemise{3-16}{4-16}
+ \IntAreteArbreSansRemise{3-17}{4-17}
+ \IntAreteArbreSansRemise{3-18}{4-18}
+ \IntAreteArbreSansRemise{3-19}{4-19}
+ \IntAreteArbreSansRemise{3-20}{4-20}
+ \IntAreteArbreSansRemise{3-21}{4-21}
+ \IntAreteArbreSansRemise{3-22}{4-22}
+ \IntAreteArbreSansRemise{3-23}{4-23}
+ \IntAreteArbreSansRemise{3-24}{4-24}
+ \fi
+ \ifnum\TRLISTECHOIXlen=3%
+ %N1
+ \IntNoeudArbreSansRemise{1}{1}{1}
+ \IntNoeudArbreSansRemise{1}{2}{2}
+ \IntNoeudArbreSansRemise{1}{3}{3}
+ \IntAreteArbreSansRemise{0-1}{1-1}
+ \IntAreteArbreSansRemise{0-1}{1-2}
+ \IntAreteArbreSansRemise{0-1}{1-3}
+ %N2
+ \IntNoeudArbreSansRemise{2}{1}{2}
+ \IntNoeudArbreSansRemise{2}{2}{3}
+ \IntNoeudArbreSansRemise{2}{3}{1}
+ \IntNoeudArbreSansRemise{2}{4}{3}
+ \IntNoeudArbreSansRemise{2}{5}{1}
+ \IntNoeudArbreSansRemise{2}{6}{2}
+ \IntAreteArbreSansRemise{1-1}{2-1}
+ \IntAreteArbreSansRemise{1-1}{2-2}
+ \IntAreteArbreSansRemise{1-2}{2-3}
+ \IntAreteArbreSansRemise{1-2}{2-4}
+ \IntAreteArbreSansRemise{1-3}{2-5}
+ \IntAreteArbreSansRemise{1-3}{2-6}
+ %N3
+ \IntNoeudArbreSansRemise{3}{1}{3}
+ \IntNoeudArbreSansRemise{3}{2}{2}
+ \IntNoeudArbreSansRemise{3}{3}{3}
+ \IntNoeudArbreSansRemise{3}{4}{1}
+ \IntNoeudArbreSansRemise{3}{5}{2}
+ \IntNoeudArbreSansRemise{3}{6}{1}
+ \IntAreteArbreSansRemise{2-1}{3-1}
+ \IntAreteArbreSansRemise{2-2}{3-2}
+ \IntAreteArbreSansRemise{2-3}{3-3}
+ \IntAreteArbreSansRemise{2-4}{3-4}
+ \IntAreteArbreSansRemise{2-5}{3-5}
+ \IntAreteArbreSansRemise{2-6}{3-6}
+ \fi
+ \ifnum\TRLISTECHOIXlen=2%
+ %N1
+ \IntNoeudArbreSansRemise{1}{1}{1}
+ \IntNoeudArbreSansRemise{1}{2}{2}
+ \IntAreteArbreSansRemise{0-1}{1-1}
+ \IntAreteArbreSansRemise{0-1}{1-2}
+ %N2
+ \IntNoeudArbreSansRemise{2}{1}{2}
+ \IntNoeudArbreSansRemise{2}{2}{1}
+ \IntAreteArbreSansRemise{1-1}{2-1}
+ \IntAreteArbreSansRemise{1-2}{2-2}
+ \fi
+ %notice
+ \IfEq{\LISTECHOIXnotice}{}%
+ {}%
+ {%
+ \foreach \notice [count=\i] in \LISTECHOIXnotice
+ {%
+ \draw[arbrechoixdeconotices] ({(\i-1)*\LISTECHOIXinterniv},0) -- ({(\i)*\LISTECHOIXinterniv},0) node[arbrechoixnotices] {\notice} ;
+ }
+ }%
+ %listerésultats
+ \ifboolKV[arbrechoix]{AffResultats}%
+ {%
+ \GeneratePermutations[\LISTECHOIXsepres]{#3}[\mylistofpermut]%on génère les permutations !
+ \foreach \i in {1,...,\nbeltstotal}{%
+ \draw (N-\TRLISTECHOIXlen-\i) node[arbrechoixresultats,right=\fpeval{0.5*\LISTECHOIXechelle*\LISTECHOIXinterniv}cm] {\getvaluefromlist*\mylistofpermut{\i}} ;
+ }
+ }%
+ {}%
+ \end{tikzpicture}%
+}
+\NewCommandCopy\pflarbrechoixssremise\ArbreChoixSansRemise
+
+\def\tmplistpermuttwo{{1,2},{2,1}}
+\def\tmplistpermutthree{{1,2,3},{1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1}}
+\def\tmplistpermutfour{{1,2,3,4},{1,2,4,3},{1,3,2,4},{1,3,4,2},{1,4,2,3},{1,4,3,2},{2,1,3,4},{2,1,4,3},{2,3,1,4},{2,3,4,1},{2,4,1,3},{2,4,3,1},{3,1,2,4},{3,1,4,2},{3,2,1,4},{3,2,4,1},{3,4,1,2},{3,4,2,1},{4,1,2,3},{4,1,3,2},{4,2,1,3},{4,2,3,1},{4,3,1,2},{4,3,2,1}}
+
+\NewDocumentCommand\GeneratePermutations{ O{-} m O{\mylistofpermut} }{%
+ \lenoflist{#2}[\resmylen]%
+ \ifnum\resmylen=2%
+ \xdef\tmplistindex{\tmplistpermuttwo}%
+ \fi%
+ \ifnum\resmylen=3%
+ \xdef\tmplistindex{\tmplistpermutthree}%
+ \fi%
+ \ifnum\resmylen=4%
+ \xdef\tmplistindex{\tmplistpermutfour}%
+ \fi%
+ \lenoflist{\tmplistindex}[\resmylenindex]%
+ \xdef\tmpstringperm{}%
+ \xdef#3{}%
+ \foreach \i in {1,...,\resmylenindex}{%
+ \getvaluefromlist{\tmplistindex}{\i}[\mytmplst]%
+ \lenoflist{\mytmplst}[\resmylentmptmp]%
+ \foreach \j [count=\iii] in \mytmplst {%
+ \ifnum\iii=1%
+ \xdef\tmpstringperm{\getvaluefromlist*{#2}{\j}}%
+ \else%
+ \xdef\tmpstringperm{\tmpstringperm#1\getvaluefromlist*{#2}{\j}}%
+ \fi%
+ }%
+ \ifnum\i=1%
+ \xdef#3{\tmpstringperm}%
+ \else%
+ \xdef#3{#3,\tmpstringperm}%
+ \fi%
+ }%
+}
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex
index 7bdc44ed02..0c8aced071 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-recreat.tex
@@ -1,5 +1,5 @@
% proflycee-tools-recreat.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
%%------FENÊTRE CALCUL FORMEL
@@ -236,6 +236,7 @@
}{}
\end{tikzpicture}
}
+\NewCommandCopy\pflsudomaths\SudoMaths
%=====FRACTALES
\usetikzlibrary{lindenmayersystems}
@@ -319,6 +320,7 @@
}%
\IfBooleanF{#1}{\end{tikzpicture}}%
}
+\NewCommandCopy\pflfractaltikz\FractaleTikz
\NewDocumentCommand\EtapesFloconKoch{ O{} D<>{} m }{%
\restoreKV[tikzfract]%
@@ -429,6 +431,7 @@
}{}%
\end{tikzpicture}
}
+\NewCommandCopy\pflchateaucartes\ChateauCartes
%====ALLUMETTES
\definecolor{BoisAllumette}{HTML}{E9D0B8}
@@ -466,6 +469,7 @@
\shade[draw,ball color=\MatchEndColor,rounded corners=0.1pt] ({\AlumLg-2*\LongueurGratte-2*\MatchOffset},0)--++(0,{0.1cm}) to[out=12.5,in=90]++({2*\LongueurGratte},{-0.1cm}) to[out=-90,in=-17.5]++({-2*\LongueurGratte+0.05cm},{-0.15cm}) --++ (-0.05cm,0.05cm) --cycle ;
\end{scope}
}
+\NewCommandCopy\pflallumette\PfLAllumette
\NewDocumentCommand\PfLAllumettes{ O{} m }{%
\setsepchar{ }%
@@ -475,6 +479,7 @@
\PfLAllumette[#1]{\diralum}
}%
}
+\NewCommandCopy\pflallumettes\PfLAllumettes
%====MACHINE À TRANSFORMER
\defKV[machtransf]{%
@@ -609,5 +614,128 @@
}%
\end{tikzpicture}
}
+\NewCommandCopy\pflmachtransf\MachineTransformer
+
+%====PYRAMIDE D'ORANGES
+\usetikzlibrary{shadings}
+\usepackage{simplekv}
+
+\setKVdefault[PyrBalls]{%
+ Couleur=gray,%
+ Rotation=-5,%
+ Echelle=1
+}
+
+\NewDocumentCommand\EmpilementBalles{ O{} m }{%
+ \restoreKV[PyrBalls]%
+ \setKV[PyrBalls]{#1}%
+ \IfSubStr{#2}{-}%
+ {%
+ \StrCut{#2}{-}{\pyrballsdeb}{\pyrballsfin}%
+ \foreach \i in {\pyrballsdeb,...,\pyrballsfin}{%
+ \begin{tikzpicture}[scale=\fpeval{0.5*\useKV[PyrBalls]{Echelle}},rotate={\useKV[PyrBalls]{Rotation}},transform shape]
+ \foreach \x in {\numexpr\i-1\relax,...,0}{
+ \foreach \y in {\x,...,\numexpr\i-1\relax}{
+ %côté gauche
+ \shade[ball color={\useKV[PyrBalls]{Couleur}},shading angle=50] (0.6*\x,-\y+0.3*\x) circle[radius=0.55] ;
+ %côté 'droit'
+ \shade[ball color={\useKV[PyrBalls]{Couleur}},shading angle=0] (-0.6*\x,-\y+0.3*\x) circle[radius=0.55] ;
+ }
+ }
+ \end{tikzpicture}%
+ }%
+ }%
+ {%
+ \begin{tikzpicture}[scale={\useKV[PyrBalls]{Echelle}},rotate={\useKV[PyrBalls]{Rotation}},transform shape]
+ \foreach \x in {\numexpr#2-1\relax,...,0}{
+ \foreach \y in {\x,...,\numexpr#2-1\relax}{
+ %côté gauche
+ \shade[ball color={\useKV[PyrBalls]{Couleur}},shading angle=50] (0.6*\x,-\y+0.3*\x) circle[radius=0.55] ;
+ %côté 'droit'
+ \shade[ball color={\useKV[PyrBalls]{Couleur}},shading angle=0] (-0.6*\x,-\y+0.3*\x) circle[radius=0.55] ;
+ }
+ }
+ \end{tikzpicture}%
+ }%
+}
+\NewCommandCopy\pflempilballes\EmpilementBalles
+
+%====DATES
+\IfPackageLoadedTF{datetime2}%
+ {}%
+ {%
+ \RequirePackage[fr-FR]{datetime2}
+ }%
+
+\RequirePackage{datetime2-calc}
+
+\newcount\tmpmyct
+
+\NewDocumentCommand\JourSelonDate{ s m }{%
+ \StrBehind[2]{#2}{/}[\tmptheyear]%
+ \StrBetween[1,2]{#2}{/}{/}[\tmpthemonth]%
+ \StrBefore[1]{#2}{/}[\tmptheday]%
+ \xdef\tmpdate{\tmptheyear-\tmpthemonth-\tmptheday}%
+ \DTMcomputedayofweekindex{\tmpdate}{\indexjdls}%
+ \IfStrEqCase{\indexjdls}{%
+ {0}{\IfBooleanTF{#1}{L}{l}undi}%
+ {1}{\IfBooleanTF{#1}{M}{m}ardi}%
+ {2}{\IfBooleanTF{#1}{M}{m}ercredi}%
+ {3}{\IfBooleanTF{#1}{J}{j}eudi}%
+ {4}{\IfBooleanTF{#1}{V}{v}endredi}%
+ {5}{\IfBooleanTF{#1}{S}{s}amedi}%
+ {6}{\IfBooleanTF{#1}{D}{d}imanche}%
+ }{}%
+}
+\NewCommandCopy\pfljourselondate\JourSelonDate
+
+\NewDocumentCommand\DateComplete{ s m }{%
+ \IfBooleanTF{#1}%
+ {%
+ \JourSelonDate*{#2} %
+ }%
+ {
+ \JourSelonDate{#2} %
+ }%
+ \xdef\tmpdateinit{\tmptheyear-\tmpthemonth-\tmptheday}%
+ \DTMsavedate{datecplt}{\tmpdateinit}%
+ \DTMusedate{datecplt}{}%
+}
+\NewCommandCopy\pfldatecomplet\DateComplete
+
+\NewDocumentCommand\NbJoursEntreDates{ s m m O{\nbjoursentre} }{%
+ \StrBehind[2]{#2}{/}[\tmptheyear]%
+ \StrBetween[1,2]{#2}{/}{/}[\tmpthemonth]%
+ \StrBefore[1]{#2}{/}[\tmptheday]%
+ \xdef\tmpdateA{\tmptheyear-\tmpthemonth-\tmptheday}%
+ \StrBehind[2]{#3}{/}[\tmptheyear]%
+ \StrBetween[1,2]{#3}{/}{/}[\tmpthemonth]%
+ \StrBefore[1]{#3}{/}[\tmptheday]%
+ \xdef\tmpdateB{\tmptheyear-\tmpthemonth-\tmptheday}%
+ \DTMsavedate{dateinitiale}{\tmpdateA}%
+ \DTMsavedate{datefinale}{\tmpdateB}%
+ \DTMsaveddatediff{dateinitiale}{datefinale}{\tmpmyct}%
+ \xdef#4{\fpeval{abs(\tmpmyct)}}%
+ \IfBooleanT{#1}{#4}%
+}
+\NewCommandCopy\pflnbjoursdates\NbJoursEntreDates
+
+\NewDocumentCommand\AjoutJoursDate{ s m m }{%
+ \StrBehind[2]{#2}{/}[\tmptheyear]%
+ \StrBetween[1,2]{#2}{/}{/}[\tmpthemonth]%
+ \StrBefore[1]{#2}{/}[\tmptheday]%
+ \xdef\tmpdateinit{\tmptheyear-\tmpthemonth-\tmptheday}%
+ \DTMsavedate{dateinitiale}{\tmpdateinit}%
+ \DTMsaveddateoffsettojulianday{dateinitiale}{#3}\tmpmyct%
+ \DTMsavejulianday{datefinale}{\number\tmpmyct}%
+ \IfBooleanTF{#1}%
+ {%
+ \DTMfetchday{datefinale}/\DTMfetchmonth{datefinale}/\DTMfetchyear{datefinale}{}%
+ }%
+ {%
+ \DTMusedate{datefinale}{}%
+ }%
+}
+\NewCommandCopy\pflajoutjoursdate\AjoutJoursDate
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex
index cd01f4393b..14464f1e16 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-stats.tex
@@ -1,7 +1,8 @@
% proflycee-tools-stats.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+%xxxxx Ajouts de clés pour les boxplot
%3.01a Courbe ECC
%2.6.8 Grille histogrammes non réguliers
%2.6.7 Histogrammes
@@ -74,6 +75,71 @@
\expandafter\def\csname\RegLinCoeffr\endcsname{\fpeval{\LXYvar/sqrt(\LXvar*\LYvar)}}
\expandafter\def\csname\RegLinCoeffrd\endcsname{\fpeval{\csname\RegLinCoeffr\endcsname*\csname\RegLinCoeffr\endcsname}}
}
+\NewCommandCopy\pflcalcreglin\CalculsRegLin
+
+\defKV[coeffregquad]{%
+ NomCoeffa=\def\RegQuadCoeffa{#1},%
+ NomCoeffb=\def\RegQuadCoeffb{#1},%
+ NomCoeffc=\def\RegQuadCoeffc{#1},%
+ NomXmin=\def\RegQuadCoeffXmin{#1},%
+ NomXmax=\def\RegQuadCoeffXmax{#1}
+}
+
+\setKVdefault[coeffregquad]{%
+ NomCoeffa=COEFFa,%
+ NomCoeffb=COEFFb,%
+ NomCoeffc=COEFFc,%
+ NomXmin=LXmin,%
+ NomXmax=LXmax
+}
+
+\newcommand\CalculsRegQuad[3][]{%
+ \useKVdefault[coeffregquad]%
+ \setKV[coeffregquad]{#1}% on paramètres les nouvelles clés et on les simplifie
+ %xmin et xmax
+ \expandafter\def\csname\RegQuadCoeffXmin\endcsname{\xintfloateval{min(#2)}}%
+ \expandafter\def\csname\RegQuadCoeffXmax\endcsname{\xintfloateval{max(#2)}}%
+ %listes des données
+ \def\xliste{#2}%
+ \def\yliste{#3}%
+ \readlist*\LX{\xliste}%
+ \readlist*\LY{\yliste}%
+ %taille des listes
+ \def\LNB{\inteval{\LXlen}}
+ %somme importantes
+ \xdef\LXSomme{0}%
+ \xdef\LXCSomme{0}%
+ \xdef\LYSomme{0}%
+ \xdef\LXXSomme{0}%
+ \xdef\LXYSomme{0}%
+ \xdef\LXXCSomme{0}%
+ \xdef\LXCXCSomme{0}%
+ \xdef\LXCYSomme{0}%
+ %calculs
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LXSomme{\xintfloateval{\LXSomme+\LX[\i]}}%
+ \xdef\LXCSomme{\xintfloateval{\LXCSomme+(\LX[\i])^2}}%
+ }%
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LYSomme{\xintfloateval{\LYSomme+\LY[\i]}}%
+ }%
+ \xdef\LXmoy{\xintfloateval{\LXSomme/\LNB}}%
+ \xdef\LYmoy{\xintfloateval{\LYSomme/\LNB}}%
+ \xdef\LXCmoy{\xintfloateval{\LXCSomme/\LNB}}%
+ %calculs suites
+ \foreach \i in {1,2,...,\LNB}{%
+ \xdef\LXXSomme{\xintfloateval{\LXXSomme+(\LX[\i]-\LXmoy)^2}}%
+ \xdef\LXYSomme{\xintfloateval{\LXYSomme+(\LX[\i]-\LXmoy)*(\LY[\i]-\LYmoy)}}%
+ \xdef\LXXCSomme{\xintfloateval{\LXXCSomme+(\LX[\i]-\LXmoy)*((\LX[\i])*(\LX[\i])-\LXCmoy)}}%
+ \xdef\LXCXCSomme{\xintfloateval{\LXCXCSomme+((\LX[\i])^2-\LXCmoy)^2}}%
+ \xdef\LXCYSomme{\xintfloateval{\LXCYSomme+((\LX[\i])^2-\LXCmoy)*(\LY[\i]-\LYmoy)}}%
+ }%
+ %COEFFS OK
+ \expandafter\def\csname\RegQuadCoeffb\endcsname{\xintfloateval{(\LXYSomme*\LXCXCSomme-\LXCYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2)}}%
+ \expandafter\def\csname\RegQuadCoeffa\endcsname{\xintfloateval{(\LXCYSomme*\LXXSomme-\LXYSomme*\LXXCSomme)/(\LXXSomme*\LXCXCSomme-(\LXXCSomme)^2)}}%
+ \expandafter\def\csname\RegQuadCoeffc\endcsname{\xintfloateval{\LYmoy-\csname\RegQuadCoeffb\endcsname*\LXmoy-\csname\RegQuadCoeffa\endcsname*\LXCmoy}}%
+}
+\NewCommandCopy\pflcalcregquad\CalculsRegQuad
%pour un nuage en TiKz
\defKV[nuagereglin]{%
@@ -136,15 +202,19 @@
Max=\def\BaMAxeMax{#1},%
Elargir=\def\BaMAxeElarg{#1},%
Epaisseur=\def\BaMAxeEpaisseur{#1},%
- Valeurs=\def\BaMAxeValeurs{#1}
+ Valeurs=\def\BaMAxeValeurs{#1},%
+ LabelOx=\def\BaMAxeLabelOx{#1}
}
\setKVdefault[boiteamoustachesaxe]{%
Elargir=0.05,%
Epaisseur=thick,%
- AffValeurs=false
+ AffValeurs=false,%
+ LabelOx={}
}
+\tikzset{valxboxplot/.style={below=3pt}}
+
\newcommand\BoiteMoustachesAxe[1][]{
\useKVdefault[boiteamoustachesaxe]
\setKV[boiteamoustachesaxe]{#1}
@@ -152,8 +222,12 @@
\def\BaMaxexmin{\fpeval{\BaMAxeMin-\BaMAxeElarg*\BaMaxelargeur}}
\def\BaMaxexmax{\fpeval{\BaMAxeMax+\BaMAxeElarg*\BaMaxelargeur}}
\draw[\BaMAxeEpaisseur,->,>=latex] (\BaMaxexmin,0) -- (\BaMaxexmax,0) ;
+ \IfEq{LabelOx}{}{}%
+ {%
+ \draw (\BaMaxexmax,0) node[right] {\BaMAxeLabelOx} ;
+ }%
\ifboolKV[boiteamoustachesaxe]{AffValeurs}
- {\foreach \x in \BaMAxeValeurs \draw[\BaMAxeEpaisseur] (\x,3pt)--(\x,-3pt) node[below=3pt] {\num{\x}} ;}
+ {\foreach \x in \BaMAxeValeurs \draw[\BaMAxeEpaisseur] (\x,3pt)--(\x,-3pt) node[valxboxplot] {\num{\x}} ;}
{}
}
@@ -192,6 +266,7 @@
}
{}
}
+\NewCommandCopy\pflboitemoustach\BoiteMoustaches
%%------HISTOGRAMME
\defKV[histostats]{%
@@ -432,6 +507,7 @@
\end{tikzpicture}%
}%
}
+\NewCommandCopy\pflhistogramme\Histogramme
\NewDocumentCommand\HistogrammeTikz{ O{} m }{%
\useKVdefault[histostats]%
@@ -482,6 +558,7 @@
}%
{}%
}
+\NewCommandCopy\pflhistotikz\HistogrammeTikz
%%----Courbe ECC
%\usetikzlibrary{intersections}
@@ -492,6 +569,7 @@
% \edef#3{\the\pgf@y}%
% }
+\makeatletter
\defKV[courbeECC]{%
Largeur=\def\ecc@larg@graph{#1},%
Hauteur=\def\ecc@haut@graph{#1},%
@@ -626,6 +704,7 @@
\end{tikzpicture}%
\CourbeECCStylesDefaut%
}
+\NewCommandCopy\pflcourbeecc\CourbeECC
\NewDocumentEnvironment{EnvCourbeECC}{ O{} m m }%
{%
@@ -733,6 +812,7 @@
\end{tikzpicture}%
\CourbeECCStylesDefaut%
}
+\makeatother
%détermination 'simple' des paramètres
\NewDocumentCommand\MedianeQuartilesECC{ m m }{%
@@ -775,4 +855,105 @@
}%
}
+%====Paramètres statistiques (stockage/affichage, sans rédaction)
+\NewDocumentCommand\DeterminerParamStats{ s m O{\monmin} O{\monquartileun} O{\mamediane} O{\monquartiletrois} O{\monmax} }{%
+ %traitement de la liste, *=effectifs
+ \IfBooleanTF{#1}%
+ {%
+ \setsepchar[.]{,./}%
+ \readlist*\listeTdonneesregroup{#2}%
+ \def\TMPLST{}%
+ \foreach \i in {1,...,\listeTdonneesregrouplen}{%
+ \itemtomacro\listeTdonneesregroup[\i,1]\myelt%
+ \itemtomacro\listeTdonneesregroup[\i,2]\mynbelt%
+ \foreach \j in {1,...,\mynbelt}{%
+ \xintifboolexpr{ \i*\j == 1}%
+ {%
+ \xdef\TMPLST{\myelt}%
+ }%
+ {%
+ \xdef\TMPLST{\TMPLST,\myelt}%
+ }%
+ }%
+ }%
+ }%
+ {%
+ \xdef\TMPLST{#2}%
+ \sortasclist{\TMPLST}%
+ }%
+ \definemylist{\TMPLST}{\listeTdonneesregroup}%
+ \lenofdeflist{listeTdonneesregroup}[\nbdonnees]%
+ %médiane
+ \xintifboolexpr{ \xintiiRem{\nbdonnees}{2} == 0 }%
+ {%
+ \xdef\tmpranga{\xintfloateval{\nbdonnees/2}}%\tmpranga
+ \xdef\tmprangb{\xintfloateval{\nbdonnees/2+1}}%\tmprangb
+ \getvaluefromdeflist{listeTdonneesregroup}{\tmpranga}[\myvala]%
+ \getvaluefromdeflist{listeTdonneesregroup}{\tmprangb}[\myvalb]%
+ \xdef#5{\xintfloateval{(\myvala+\myvalb)/2}}%
+ }%
+ {%
+ \xdef\tmprang{\xintfloateval{(\nbdonnees+1)/2}}%
+ \getvaluefromdeflist{listeTdonneesregroup}{\tmprang}[#5]%
+ }%
+ %quartileun
+ \xdef\tmprangqa{\xintfloateval{ceil(0.25*\nbdonnees)}}%\tmpranga
+ \getvaluefromdeflist{listeTdonneesregroup}{\tmprangqa}[#4]%
+ %quartiletrois
+ \xdef\tmprangqc{\xintfloateval{ceil(0.75*\nbdonnees)}}%\tmpranga
+ \getvaluefromdeflist{listeTdonneesregroup}{\tmprangqc}[#6]%
+ %min/max
+ \minoflist{\TMPLST}[#3]%
+ \maxoflist{\TMPLST}[#7]%
+ %moyenne
+ \meanofdeflist{listeTdonneesregroup}[\mamoyenne]%
+ %écart-type
+ \xdef\monecarttype{0}%
+ \foreach \i in {1,...,\nbdonnees}{%
+ \getvaluefromdeflist{listeTdonneesregroup}{\i}[\myval]%
+ \xdef\monecarttype{\xintfloateval{\monecarttype+(\myval-\mamoyenne)^2}}%
+ }%
+ \xdef\monecarttype{\xintfloateval{sqrt(\monecarttype/\nbdonnees)}}%
+}
+\NewCommandCopy\pflparamstats\DeterminerParamStats
+
+\NewDocumentCommand\DeterminerMoyEctype{ s m O{\mamoyenne} O{\monecarttype} }{%
+ %traitement de la liste, *=effectifs
+ \IfBooleanTF{#1}%
+ {%
+ \setsepchar[.]{,./}%
+ \readlist*\listeTdonneesregroup{#2}%
+ \def\TMPLST{}%
+ \foreach \i in {1,...,\listeTdonneesregrouplen}{%
+ \itemtomacro\listeTdonneesregroup[\i,1]\myelt%
+ \itemtomacro\listeTdonneesregroup[\i,2]\mynbelt%
+ \foreach \j in {1,...,\mynbelt}{%
+ \xintifboolexpr{ \i*\j == 1}%
+ {%
+ \xdef\TMPLST{\myelt}%
+ }%
+ {%
+ \xdef\TMPLST{\TMPLST,\myelt}%
+ }%
+ }%
+ }%
+ }%
+ {%
+ \xdef\TMPLST{#2}%
+ \sortasclist{\TMPLST}%
+ }%
+ \definemylist{\TMPLST}{\listeTdonneesregroup}%
+ \lenofdeflist{listeTdonneesregroup}[\nbdonnees]%
+ %moyenne
+ \meanofdeflist{listeTdonneesregroup}[#3]%
+ %écart-type
+ \xdef#4{0}%
+ \foreach \i in {1,...,\nbdonnees}{%
+ \getvaluefromdeflist{listeTdonneesregroup}{\i}[\myval]%
+ \xdef#4{\xintfloateval{#4+(\myval-\mamoyenne)^2}}%
+ }%
+ \xdef#4{\xintfloateval{sqrt(#4/\nbdonnees)}}%
+}
+\NewCommandCopy\pflmoyectype\DeterminerMoyEctype
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-suites.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-suites.tex
index 9319c40816..d9b2d18bf1 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-suites.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-suites.tex
@@ -1,5 +1,5 @@
% proflycee-tools-suites.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
%%------CabWeb
@@ -51,6 +51,7 @@
\def\i{\fpeval{\y}}%
}
}
+\NewCommandCopy\pfltoilerecurr\ToileRecurrence
%%------CALCSRECUR
\NewDocumentCommand\CalculInterneTermeRecurrence{ m m m m }{%pas forcément utile
@@ -104,6 +105,7 @@
}%
}{}%
}
+\NewCommandCopy\pflcalcseuil\CalculSeuil
\defKV[calculsuiterecur]{%
No=\def\SRninit{#1},%
@@ -138,6 +140,7 @@
%\IfStrEq{\SRformat}{Decimal}{\num{\xintfloateval{\vartmp}}}{}%
%\IfStrEq{\SRformat}{BrutDecimal}{\xintFloatToDecimal{\vartmp}}{}%
}
+\NewCommandCopy\pflcalcrecurr\CalculTermeRecurrence
\defKV[suiteseuil]{%
No=\def\SEUILindiceinit{#1},%
@@ -203,5 +206,6 @@
}%
}%
}
+\NewCommandCopy\pflsolseuil\SolutionSeuil
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex
index 6efa608f73..3f06ffe103 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-trigo.tex
@@ -1,5 +1,5 @@
% proflycee-tools-trigo.tex
-% Copyright 2023-2024 Cédric Pierquet
+% Copyright 2023-2025 Cédric Pierquet
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
%%------CercleTrigo
@@ -35,7 +35,8 @@
Equationsin=false,%
cos=45,%
sin=30,%
- CouleurSol=blue
+ CouleurSol=blue,%
+ ValeursTan=false
}
\newcommand\CercleTrigo[1][]{%
@@ -43,6 +44,28 @@
\setKV[cercletrigo]{#1}
\tikzset{PLval/.style={inner sep=1pt,font=\PLcerclevaleurs,fill=\PLcerclefond}}
\tikzset{PLagl/.style={inner sep=1pt,font=\PLcercleangles,fill=\PLcerclefond}}
+ %tangente ?
+ \ifboolKV[cercletrigo]{ValeursTan}%
+ {%
+ \draw[\PLcerclethick,dotted,gray] (30:\PLcerclerayon)--({\PLcerclerayon},{sqrt(3)/3*\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (45:\PLcerclerayon)--({\PLcerclerayon},{\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (60:\PLcerclerayon)--({\PLcerclerayon},{sqrt(3)*\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (-30:\PLcerclerayon)--({\PLcerclerayon},{-sqrt(3)/3*\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (-45:\PLcerclerayon)--({\PLcerclerayon},{-\PLcerclerayon}) ;
+ \draw[\PLcerclethick,dotted,gray] (-60:\PLcerclerayon)--({\PLcerclerayon},{-sqrt(3)*\PLcerclerayon}) ;
+ \draw[\PLcerclethick] ({\PLcerclerayon},{-1.8*\PLcerclerayon}) -- ({\PLcerclerayon},{1.8*\PLcerclerayon}) ;
+ \ifboolKV[cercletrigo]{AffValeurs}
+ {%
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$1$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{-\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$-1$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{sqrt(3)*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$\sqrt{3}$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{-sqrt(3)*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$-\sqrt{3}$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{sqrt(3)/3*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$\tfrac{\sqrt{3}}{3}$} ;
+ \draw[] ([xshift=-2pt]{\PLcerclerayon},{-sqrt(3)/3*\PLcerclerayon})--++(4pt,0) node[right=2pt,PLval] {$-\tfrac{\sqrt{3}}{3}$} ;
+ }%
+ {}%
+ }%
+ {}%
%valeurs remarquables
\ifboolKV[cercletrigo]{AffAngles}
{%valeursdudessus
@@ -138,6 +161,7 @@
}%
{}
}
+\NewCommandCopy\pflcercletrigo\CercleTrigo
%%------MESUREPPALE
\setKVdefault[MesurePpale]{%
@@ -195,6 +219,7 @@
\pi}{\num{\MPdenominateur}} \ifboolKV[MesurePpale]{Brut}{}{\: \ifboolKV[MesurePpale]{Crochets}{[2\pi]}{(2\pi)}}%
}%
}
+\NewCommandCopy\pflmesppale\MesurePrincipale
%%------LIGNES TRIGOS
\setKVdefault[Lgntrig]{%
@@ -757,5 +782,6 @@
}%
{}%
}
+\NewCommandCopy\pfllignetrig\LigneTrigo
\endinput \ No newline at end of file