diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/proflycee')
16 files changed, 102 insertions, 106 deletions
diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty index 555bc5c1259..cd11a8d3d54 100644 --- a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty +++ b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty @@ -3,7 +3,8 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2023/11/10 3.00e Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee}[2023/11/18 3.00f Aide pour l'utilisation de LaTeX en lycee] +% 3.00f Conversion d'une écriture décimale périodique en fraction (avec rédaction éventuelle) % 3.00e Ajout des 'machines à transformer' + Correction d'un nom de commande (cc ProfCollege ^^) % 3.00d Ajout de commandes pour des chateaux de cartes et des allumettes % 3.00c Ajout de chiffrements (César + Affine + Hill) diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-aleatoire.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-aleatoire.tex index c1d167f0589..ab5fa85c512 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-aleatoire.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-aleatoire.tex @@ -1,12 +1,6 @@ % proflycee-tools-aleatoire.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------EnsembleList \defKV[kvensemble]{% diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex index 4057fe37dda..00f6f0206aa 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex @@ -1,12 +1,6 @@ % proflycee-tools-analyse.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------SimplFrac nouvelle version \NewDocumentCommand\ConversionFraction{ s O{} m }{% @@ -629,4 +623,89 @@ {}% } +%====FRACTION PÉRIODIQUE +\defKV[FracPeriod]{Inconnue=\def\FracPerVar{#1}} +\setKVdefault[FracPeriod]{Enonce=true,d=true,Inconnue=x,Solution=false,Brut=true,Simple=false} + +\NewDocumentCommand\FractionPeriode{ O{} m m }{%on verra pour la mise en forme après... + %clés + \restoreKV[FracPeriod]% revenir au valeurs par défaut + \setKV[FracPeriod]{#1}% lit les arguments optionnels + %les variables utiles + \IfEndWith{#2}{.}% + {% + \StrBefore{#2}{.}[\tmp@avt]% + \xdef\tmp@apr{0}% + \xdef\tmp@len@apr{0}% + }% + {% + \StrCut{#2}{.}{\tmp@avt}{\tmp@apr}% + \StrLen{\tmp@apr}[\tmp@len@apr]% + }% + \StrLen{#3}[\tmp@len@per]% + %raccourcis + \IfEndWith{#2}{.}% + {% + \xdef\tmp@enonce{\num{\tmp@avt}{,}\overline{#3}}% + }% + {% + \xdef\tmp@enonce{\num{#2}\overline{#3}}% + }% + %calculs + \xdef\tmp@num@brut{\xintieval{10**(\tmp@len@per+\tmp@len@apr)*\tmp@avt+10**(\tmp@len@per)*\tmp@apr-10**(\tmp@len@apr)*\tmp@avt+(#3)-\tmp@apr}}% + \xdef\tmp@denom@brut{\xintieval{10**(\tmp@len@per+\tmp@len@apr)-10**(\tmp@len@apr)}}% + \xdef\tmp@pgcd{\xinteval{gcd(\tmp@num@brut,\tmp@denom@brut)}}% + %résolution OK + \ifboolKV[FracPeriod]{Solution}% + {% + %phrase d'accroche + \xintifboolexpr{\tmp@len@apr == 0}% + {% + \noindent On note $\FracPerVar=\tmp@enonce$.\par + \noindent La première égalité est donc \[\boxed{\FracPerVar=\tmp@enonce} \quad (1)\] + }% + {% + \noindent On note $\FracPerVar=\tmp@enonce$.\par + }% + \xintifboolexpr{\tmp@len@apr == 0}% + {}% + {% + \noindent On \textit{ramène} la période près de la virgule en multipliant par $10^{\tmp@len@apr}$ : \[\boxed{10^{\tmp@len@apr}\times\FracPerVar=\num{\xinteval{\tmp@avt*10**(\tmp@len@apr)+\tmp@apr}}{,}\overline{#3}} \quad (1)\] + }% + \noindent On \textit{décale} la période avant la virgule, en multipliant l'égalité (1) par $10^{\tmp@len@per}$ : \[10^{\tmp@len@per}\xintifboolexpr{\tmp@len@apr == 0}{}{\times10^{\tmp@len@apr}}\times\FracPerVar=10^{\tmp@len@per}\times\num{\xinteval{\tmp@avt*10**(\tmp@len@apr)+\tmp@apr}}{,}\overline{#3} \Rightarrow \boxed{10^{\xinteval{\tmp@len@per+\tmp@len@apr}}\times\FracPerVar = \num{\xintieval{10**(\tmp@len@per)*(\tmp@avt*10**(\tmp@len@apr)+\tmp@apr)+#3}}{,}\overline{#3}} \quad (2)\] + %soustraction + On soustrait les deux égalités, $(2)-(1)$, ce qui permet d'\textit{enlever} la partie décimale : + \begin{align*} + 10^{\xinteval{\tmp@len@per+\tmp@len@apr}}\times\FracPerVar-\xintifboolexpr{\tmp@len@apr == 0}{}{10^{\tmp@len@apr}\times}\FracPerVar = \num{\xintieval{10**(\tmp@len@per)*(\tmp@avt*10**(\tmp@len@apr)+\tmp@apr)+#3}}{,}\overline{#3} -\num{\xinteval{\tmp@avt*10**(\tmp@len@apr)+\tmp@apr}}{,}\overline{#3} &\Rightarrow \big(10^{\xinteval{\tmp@len@per+\tmp@len@apr}}-\xintifboolexpr{\tmp@len@apr == 0}{1}{10^{\tmp@len@apr}}\big)\times\FracPerVar = \num{\xintieval{10**(\tmp@len@per)*(\tmp@avt*10**(\tmp@len@apr)+\tmp@apr)+#3}} - \num{\xintieval{\tmp@avt*10**(\tmp@len@apr)+\tmp@apr}} \\ + \phantom{10^{\xinteval{\tmp@len@per+\tmp@len@apr}}\times\FracPerVar-10^{\tmp@len@apr}\times\FracPerVar = \num{\xintieval{10**(\tmp@len@per)*(\tmp@avt*10**(\tmp@len@apr)+\tmp@apr)+#3}}{,}\overline{#3} -\num{\xinteval{\tmp@avt*10**(\tmp@len@apr)+\tmp@apr}}{,}\overline{#3}} &\Rightarrow \num{\xinteval{10**(\tmp@len@per+\tmp@len@apr)-10**(\tmp@len@apr)}}\times\FracPerVar=\num{\xintieval{10**(\tmp@len@per)*(\tmp@avt*10**(\tmp@len@apr)+\tmp@apr)+#3- (\tmp@avt*10**(\tmp@len@apr)+\tmp@apr)}} \\ + &\Rightarrow\FracPerVar = \ifboolKV[FracPeriod]{d}{\displaystyle}{}\frac{\num{\tmp@num@brut}}{\num{\tmp@denom@brut}} + \end{align*} + %affichage(s) OK + \noindent Ainsi on a \ensuremath{\tmp@enonce = \ifboolKV[FracPeriod]{d}{\displaystyle}{}\frac{\num{\tmp@num@brut}}{\num{\tmp@denom@brut}} \xintifboolexpr{\tmp@pgcd == 1}{}{=\ifboolKV[FracPeriod]{d}{\displaystyle}{}\frac{\num{\xintieval{\tmp@num@brut/\tmp@pgcd}}}{\num{\xintieval{\tmp@denom@brut/\tmp@pgcd}}}}% + }.\par% + }% + {}% + \ifboolKV[FracPeriod]{Brut}% + {% + \xdef\FracPerNum{\tmp@num@brut}% + \xdef\FracPerDenom{\tmp@denom@brut}% + \xdef\FracPerNumSimpl{\xintieval{(\tmp@num@brut)/gcd(\tmp@num@brut,\tmp@denom@brut)}}% + \xdef\FracPerDenomSimpl{\xintieval{(\tmp@denom@brut)/gcd(\tmp@num@brut,\tmp@denom@brut)}}% + }% + {}% + \ifboolKV[FracPeriod]{Simple}% + {% + %affichage(s) OK + \noindent\ensuremath{% + \ifboolKV[FracPeriod]{Enonce}% + {% + \tmp@enonce = + }% + {}% + \ifboolKV[FracPeriod]{d}{\displaystyle}{}\frac{\num{\tmp@num@brut}}{\num{\tmp@denom@brut}} \xintifboolexpr{\tmp@pgcd == 1}{}{=\ifboolKV[FracPeriod]{d}{\displaystyle}{}\frac{\num{\xintieval{\tmp@num@brut/\tmp@pgcd}}}{\num{\xintieval{\tmp@denom@brut/\tmp@pgcd}}}}% + }\par% + }% + {}% +} + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex index fcff96116f7..cabba276fb0 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex @@ -1,12 +1,6 @@ % proflycee-tools-arithm.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \RequirePackage{ifthen} \RequirePackage{modulus} diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-ecritures.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-ecritures.tex index 2db6379ed61..ec26d66da2b 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-ecritures.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-ecritures.tex @@ -1,12 +1,6 @@ % proflycee-tools-ecritures.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %===PACKAGE \RequirePackage{interval} diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-geom.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-geom.tex index b49e23440d7..eb898aa85af 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-geom.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-geom.tex @@ -1,12 +1,6 @@ % proflycee-tools-geom.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------PaveDroitTikZ \defKV[paramspave]{% diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex index 25c206b76f1..f6695cacd20 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-graphiques.tex @@ -1,12 +1,6 @@ % proflycee-tools-graphiques.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------SPLINES %commande utile pour extraire des infos d'une liste diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex index adcc03f0288..c6be201f710 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex @@ -1,12 +1,6 @@ % proflycee-tools-listings.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %2.7.5 Ajout de clés pour PythonLst + Couleurs optionnelles pour PseudoCode %2.7.3 Correction de la couleur des bordures diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex index 49407898c4e..87c152c1916 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-minted.tex @@ -1,12 +1,6 @@ % proflycee-tools-minted.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt % 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/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex index 5c48f5e69a1..ca63b2db897 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-piton.tex @@ -1,12 +1,6 @@ % proflycee-tools-piton.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %2.7.6 Correction du comportement de la console, avec une meilleure gestion de la largeur ^^ (merci à ablasz ;-)) %2.7.5 Ajout d'un argument optionnel pour commencer les codes python à un numéro de ligne différent de 1 diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex index 37cd0a47939..963ac25f7a7 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-probas.tex @@ -1,12 +1,6 @@ % proflycee-tools-probas.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------LOISPROBAS %calculs "simples" diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex index ea2dbf60660..ba19e702233 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-pythontex.tex @@ -1,12 +1,6 @@ % proflycee-tools-pythontex.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %2.7.5 Argument optionnel pour commencer la numérotation à une autre ligne que 1 %2.7.3 Correction de la couleur des bordures diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex index 880ac4cbb3b..b80cc6fef6f 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-recreat.tex @@ -1,12 +1,6 @@ % proflycee-tools-recreat.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------FENÊTRE CALCUL FORMEL \newcommand\CFchap{\textasciicircum} diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex index 26c12c2c135..eafa4c59099 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-stats.tex @@ -1,12 +1,6 @@ % proflycee-tools-stats.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %2.6.8 Grille histogrammes non réguliers %2.6.7 Histogrammes diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-suites.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-suites.tex index 5cdd3234e3f..f83f215d012 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-suites.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-suites.tex @@ -1,12 +1,6 @@ % proflycee-tools-suites.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------CabWeb \defKV[webrecurr]{% diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-trigo.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-trigo.tex index cd85a0ed440..24ec136ca5c 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-trigo.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-trigo.tex @@ -1,12 +1,6 @@ % proflycee-tools-trigo.tex % Copyright 2023 Cédric Pierquet -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt %%------CercleTrigo \defKV[cercletrigo]{% |