texlive[64698] Master/texmf-dist: proflycee (13oct22)
commits+karl at tug.org
commits+karl at tug.org
Thu Oct 13 22:37:15 CEST 2022
Revision: 64698
http://tug.org/svn/texlive?view=revision&revision=64698
Author: karl
Date: 2022-10-13 22:37:15 +0200 (Thu, 13 Oct 2022)
Log Message:
-----------
proflycee (13oct22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
Modified: trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex 2022-10-13 20:37:01 UTC (rev 64697)
+++ trunk/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex 2022-10-13 20:37:15 UTC (rev 64698)
@@ -8,6 +8,7 @@
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
+\usepackage{amsmath,amssymb}
\usepackage[upright]{fourier}
\usepackage[scaled=0.875]{helvet}
\renewcommand\ttdefault{lmtt}
@@ -62,8 +63,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\PLversion{1.3.1}
-\def\PLdate{7 Octobre 2022}
+\def\PLversion{1.3.3}
+\def\PLdate{12 Octobre 2022}
\tcbset{vignettes/.style={%
nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
@@ -83,6 +84,9 @@
\newtcblisting{codetex}[1][]{%
colback=white,colframe=red!75!black,title={\small \faCode} Code \LaTeX,fonttitle=\sffamily\bfseries,left=3pt,right=3pt,top=2pt,bottom=2pt,#1}
+\newtcolorbox{codeattention}[1][]{%
+ colback=Yellow!50,colframe=Yellow!50!Black,title={\small \faBomb} Attention,fonttitle=\sffamily\bfseries,left=3pt,right=3pt,top=2pt,bottom=2pt,#1}
+
\newtcolorbox{codesortie}[1][]{%
colback=white,colframe=red!75!black,title={\small \faArrowAltCircleRight[regular]} Sortie \LaTeX,fonttitle=\sffamily\bfseries,left=3pt,right=3pt,top=2pt,bottom=2pt,#1}
@@ -239,6 +243,8 @@
Des commandes pour effectuer des calculs de probas (lois binomiale, exponentielle, de Poisson, normale).
+Une commande pour, en \TikZ, créer des arbres de probas \og classiques \fg.
+
\vspace{1.5cm}
\hfill{}\textit{Merci à Anne pour ses retours et sa relecture !}
@@ -335,9 +341,9 @@
\subsection{Options du package}
-\begin{codeinfo}
+\begin{codeattention}
Par défaut, \ctex{minted} est chargé et donc la compilation nécessite d'utiliser \textsf{shell-escape}. Cependant, si vous ne \underline{souhaitez pas} utiliser les commandes nécessitant \ctex{minted} vous pouvez charger le package \ctex{ProfLycee} avec l'option \Cle{nominted}.
-\end{codeinfo}
+\end{codeattention}
\begin{codetex}[listing only]
...
@@ -3214,6 +3220,166 @@
\newpage
+\section{Arbres de probabilités \og classiques \fg}\label{arbresprobas}
+
+\subsection{Introduction}
+
+\begin{codeidee}
+L'idée est de proposer des commandes pour créer des arbres de probabilités classiques (et homogènes), en \TikZ, de format :
+
+\begin{itemize}
+ \item $2\times2$ ou $2\times3$ ;
+ \item $3\times2$ ou $3\times3$.
+\end{itemize}
+
+Les (deux) commandes sont donc liées à un environnement \ctex{tikzpicture}, et elles créent les nœuds de l'arbre, pour exploitation ultérieure éventuelle.
+\end{codeidee}
+
+\begin{codetex}[listing only]
+%commande simple pour tracé de l'arbre
+\PLarbre[<options>]{<donnees>}
+
+%environnement pour tracé et exploitation éventuelle
+\begin{PLenvarbre}[<options>]{<donnees>}
+ <code tikz supplémentaire>
+\end{PLenvarbre}
+\end{codetex}
+
+\subsection{Options et arguments}
+
+\begin{codeinfo}
+Les \Cle{donnees} seront à préciser sous forme \ctex{<sommet1>/<proba1>/<position1>,<sommet2>/<proba2>/<position2>,...} avec comme \og sens de lecture \fg{} de la gauche vers la droite puis du haut vers le bas (on balaye les \textit{sous-arbres}), avec comme possibilités :
+
+\begin{itemize}
+ \item une donnée \Cle{<proba>} peuvent être laissé vide ;
+ \item une donnée \Cle{<position>} peut valoir \Cle{above} (au-dessus), \Cle{below} (en-dessous) ou être laissée \Cle{vide} (sur).
+\end{itemize}
+\end{codeinfo}
+
+\begin{codecles}
+Quelques \Cle{Clés} (communes) pour les deux commandes :
+
+\begin{itemize}
+ \item la clé \Cle{unite} pour préciser l'unité de l'environnement \TikZ{} ; \hfill~défaut \Cle{1cm}
+ \item la clé \Cle{espniv} pour l'espace (H) entre les étages ; \hfill~défaut \Cle{3.25}
+ \item la clé \Cle{espfeuille} pour l'espace (V) entre les feuilles ; \hfill~défaut \Cle{1}
+ \item la clé \Cle{type} pour le format, parmi \Cle{2x2} ou \Cle{2x3} ou \Cle{3x2} ou \Cle{3x3} ; \hfill~défaut \Cle{2x2}
+ \item la clé \Cle{police} pour la police des nœuds ; \hfill~défaut \Cle{\textbackslash{}normalfont\textbackslash{}normalsize}
+ \item la clé \Cle{policeprobas} pour la police des probas ; \hfill~défaut \Cle{\textbackslash{}normalfont\textbackslash{}small}
+ \item le booléen \Cle{inclineprobas} pour incliner les probas ; \hfill~défaut \Cle{true}
+ \item le booléen \Cle{fleche} pour afficher une flèche sur les branches ; \hfill~défaut \Cle{false}
+ \item la clé \Cle{styletrait} pour les branches, en langage \TikZ{} ; \hfill~défaut \Cle{vide}
+ \item la clé \Cle{eptrait} pour l'épaisseur des branches, en langage \TikZ{} ; \hfill~défaut \Cle{semithick}
+\end{itemize}
+\end{codecles}
+
+\begin{codetex}[listing only]
+\def\ArbreDeuxDeux{
+ $A$/\num{0.5}/,
+ $B$/\num{0.4}/,
+ $\overline{B}$/.../,
+ $\overline{A}$/.../,
+ $B$/.../,
+ $\overline{B}$/$\frac{1}{3}$/
+}
+
+\PLarbre{\ArbreDeuxDeux}
+
+%des éléménts, en gris, ont été rajoutés pour illustrer certaines options
+\end{codetex}
+
+\begin{codesortie}
+\begin{PLenvarbre}{$A$/\num{0.5}/,$B$/\num{0.4}/,$\overline{B}$/.../,$\overline{A}$/.../,$B$/.../,$\overline{B}$/$\frac{1}{3}$/}
+ \draw[lightgray] (R) node[left,font=\ttfamily\small] {(R)} ;
+ \draw[lightgray] (A11) node[below,font=\ttfamily\small] {(A11)} ;
+ \draw[lightgray] (A12) node[below,font=\ttfamily\small] {(A12)} ;
+ \draw[lightgray] (A21) node[below,font=\ttfamily\small] {(A21)} ;
+ \draw[lightgray] (A22) node[below,font=\ttfamily\small] {(A22)} ;
+ \draw[lightgray] (A23) node[below,font=\ttfamily\small] {(A23)} ;
+ \draw[lightgray] (A24) node[below,font=\ttfamily\small] {(A24)} ;
+ \draw[lightgray,<->] (0,-4) -- (3.25,-4) node[midway,below,font=\ttfamily\small] {espniv} ;
+ \draw[lightgray,<->] (3.25,-4) -- (6.5,-4) node[midway,below,font=\ttfamily\small] {espniv} ;
+ \draw[lightgray,<->] (7,0) -- (7,-1) node[midway,right,font=\ttfamily\small] {espfeuille} ;
+ \draw[lightgray,<->] (7,-1) -- (7,-2) node[midway,right,font=\ttfamily\small] {espfeuille} ;
+ \draw[lightgray,<->] (7,-2) -- (7,-3) node[midway,right,font=\ttfamily\small] {espfeuille} ;
+\end{PLenvarbre}
+\end{codesortie}
+
+\begin{codeinfo}
+Les nœuds crées par les commandes sont :
+
+\begin{itemize}
+ \item \ctex{R} pour la racine ;
+ \item \ctex{A1x} pour les nœuds du 1\up{er} niveau (de haut en bas) ;
+ \item \ctex{A2x} pour les nœuds du 2\up{d} niveau (de haut en bas).
+\end{itemize}
+\end{codeinfo}
+
+\subsection{Exemples complémentaires}
+
+\begin{codetex}[listing only]
+\def\ArbreTroisDeux{
+ $A_1$/\num{0.5}/above,
+ $B$/\num{0.4}/above,
+ $\overline{B}$/.../below,
+ $A_2$/.../above,
+ $B$/.../above,
+ $\overline{B}$/$\frac{1}{3}$/below,
+ $A_3$/.../below,
+ $B$/.../above,
+ $\overline{B}$/$\frac{4}{15}$/below
+}
+
+\begin{PLenvarbre}[type=3x2,fleche,espniv=5,espfeuille=1.25]{\ArbreTroisDeux}
+ \draw[ForestGreen,->] (A24)--($(A24)+(2.5,0)$) node[right,font=\sffamily] {code tikz rajouté} ;
+\end{PLenvarbre}
+\end{codetex}
+
+\begin{codesortie}
+\begin{PLenvarbre}[type=3x2,fleche,espniv=5,espfeuille=1.25]{$A_1$/\num{0.5}/above,$B$/\num{0.4}/above,$\overline{B}$/.../below,$A_2$/.../above,$B$/.../above,$\overline{B}$/$\frac{1}{3}$/below,$A_3$/.../below,$B$/.../above,$\overline{B}$/$\frac{4}{15}$/below}
+ \draw[ForestGreen,->] (A24)--($(A24)+(2.5,0)$) node[right,font=\sffamily] {code tikz rajouté} ;
+\end{PLenvarbre}
+\end{codesortie}
+
+\begin{codetex}[listing only]
+\def\ArbreDeuxTrois{
+ $A$/\num{0.05}/above,
+ $B_1$/\num{0.4}/above,
+ $B_2$/\num{0.35}/,
+ $B_3$//below,
+ $\overline{A}$/.../below,
+ $B_1$/$\frac{2}{15}$/above,
+ $B_2$/.../,
+ $B_3$/$\frac{1}{3}$/below
+}
+\PLarbre[type=2x3,inclineprobas=false,espfeuille=1.15]{\ArbreDeuxTrois}
+
+\def\ArbreTroisTrois{
+ $A_1$/\num{0.05}/,
+ $B_1$/{1/3}/,
+ $B_2$/{1/3}/,
+ $B_3$/{1/3}/,
+ $A_2$/\num{0.80}/,
+ $B_1$/{1/3}/,
+ $B_2$/{1/3}/,
+ $B_3$/{1/3}/,
+ $A_3$/\num{0.15}/,
+ $B_1$/{1/3}/,
+ $B_2$/{1/3}/,
+ $B_3$/{1/3}/
+}
+
+\PLarbre[type=3x3,styletrait={densely dashed},espfeuille=0.7,policeprobas=\scriptsize,police=\small]{\ArbreTroisTrois}
+\end{codetex}
+
+\begin{codesortie}
+\PLarbre[type=2x3,inclineprobas=false,espfeuille=1.15]{$A$/\num{0.05}/above,$B_1$/\num{0.4}/above,$B_2$/\num{0.35}/,$B_3$//below,$\overline{A}$/.../below,$B_1$/$\frac{2}{15}$/above,$B_2$/.../,$B_3$/$\frac{1}{3}$/below}
+~~
+\PLarbre[type=3x3,styletrait={densely dashed},espfeuille=0.7,policeprobas=\scriptsize,police=\small]{$A_1$/\num{0.05}/,$B_1$/{1/3}/,$B_2$/{1/3}/,$B_3$/{1/3}/,$A_2$/\num{0.80}/,$B_1$/{1/3}/,$B_2$/{1/3}/,$B_3$/{1/3}/,$A_3$/\num{0.15}/,$B_1$/{1/3}/,$B_2$/{1/3}/,$B_3$/{1/3}/}
+\end{codesortie}
+
+\newpage
+
\part{Outils divers et variés}
\section{Fractions, ensembles}
@@ -3687,8 +3853,8 @@
\begin{itemize}
\item le booléen \Cle{affbase} qui permet d'afficher ou non la base des nombres ; \hfill{}défaut \Cle{true}
- \item le booléen \Cle{details} qui permet d'afficher ou le détail par bloc de 4 ; \hfill{}défaut \Cle{true}
- \item la clé \Cle{trait} qui permet de modifier l'épaisseur du crochet. \hfill{}défaut \Cle{0.5pt}
+ \item le booléen \Cle{details} qui permet d'afficher ou le détail par bloc de 4. \hfill{}défaut \Cle{true}
+ %\item la clé \Cle{trait} qui permet de modifier l'épaisseur du crochet. \hfill{}défaut \Cle{0.5pt}
\end{itemize}
Le formatage est géré par le package \ctex{sinuitx}, le mieux est de positionner la commande dans un environnement mathématique.
@@ -3697,8 +3863,6 @@
\begin{codetex}[listing only]
%conversion avec détails et affichage de la base
$\PLconvbinhex{110011111}$
-%conversion avec détails et affichage, et modif taille crochet
-$\PLconvbinhex[trait=1.5pt]{110011111}$
%conversion sans détails et affichage de la base
$\PLconvbinhex[details=false]{110011111}$
%conversion sans détails et sans affichage de la base
@@ -3708,8 +3872,6 @@
\begin{codesortie}
$\PLconvbinhex{110011111}$
-$\PLconvbinhex[trait=1.5pt]{110011111}$
-
$\PLconvbinhex[details=false]{110011111}$
$\PLconvbinhex[affbase=false,details=false]{110011111}$
@@ -3818,7 +3980,8 @@
\item la clé \Cle{decalh} pour gérer le décalage H du \og rectangle \fg{}, qui peut être donné soit sous la forme \Cle{esp} ou soit sous la forme \Cle{espgauche/espdroite}; \hfill{}défaut \Cle{2pt}
\item la clé \Cle{decalv} pour le décalage vertical du \og rectangle \fg{} ; \hfill{}défaut \Cle{3pt}
\item la clé \Cle{noeud} pour le préfixe du nœud du premier et du dernier reste (pour utilisation en \TikZ) ; \hfill{}défaut \Cle{EEE}
- \item le booléen \Cle{rect} pour afficher ou non le \og rectangle \fg{} des restes. \hfill{}défaut \Cle{true}
+ \item le booléen \Cle{rect} pour afficher ou non le \og rectangle \fg{} des restes ; \hfill{}défaut \Cle{true}
+ \item le booléen \Cle{couleurres} pour afficher ou non la conversion en couleur (identique au rectangle). \hfill{}défaut \Cle{false}
\end{itemize}
\end{codecles}
@@ -3833,7 +3996,7 @@
\PLconvDepuisDec[couleur=Goldenrod,decalh=6pt/2pt]{1012}{16}
%conversion avec nœud personnalisé et réutilisation
-\PLconvDepuisDec[couleur=ForestGreen,noeud=TEST]{100}{9}
+\PLconvDepuisDec[couleur=ForestGreen,couleurres,noeud=TEST]{100}{9}.
\begin{tikzpicture}
\draw[overlay,ForestGreen,thick,->] (TEST2.south east) to[bend right] ++ (3cm,-1cm) node[right] {test } ;
\end{tikzpicture}
@@ -3852,7 +4015,7 @@
\medskip
-On obtient donc \PLconvDepuisDec[couleur=ForestGreen,noeud=TEST]{100}{9}
+On obtient donc \PLconvDepuisDec[couleur=ForestGreen,couleurres,noeud=TEST]{100}{9}.
\begin{tikzpicture}
\draw[overlay,ForestGreen,thick,->] (TEST2.south east) to[bend right] ++ (3cm,-1cm) node[right] {test } ;
\end{tikzpicture}
@@ -4025,14 +4188,12 @@
\end{filecontents*}
\begin{center}
- \renewcommand\arraystretch{1.25}
- \begin{tabular}{|c|c|c|c|}
- \hline
- \multicolumn{4}{|c|}{Notice} \\ \hline
- A & B & C & D \\ \hline
- 45 & 22 & 1 & 7 \\ \hline
- Noir & Vert & Jaune & Rouge \\ \hline
- \end{tabular}
+ \begin{tblr}{colspec={*{4}{Q[1.25cm,c,m]}},hlines,vlines,rows={1.15em}}
+ \SetCell[c=4]{c} Notice & & & \\
+ A & B & C & D \\
+ 45 & 22 & 1 & 7 \\
+ Noir & Vert & Jaune & Rouge \\
+ \end{tblr}
\end{center}
\hfill\begin{tikzpicture}[scale=0.9]
@@ -4157,13 +4318,18 @@
\end{filecontents*}
\begin{center}
- \renewcommand\arraystretch{1.25}
- \begin{tabular}{|c|c|c|c|c|c|}
- \hline
- \multicolumn{6}{|c|}{Notice} \\ \hline
- 1 & 2 & 3 & 5 & 6 & 9 \\ \hline
- Rouge & Marron & Jaune & Noir & Bleu & Blanc \\ \hline
- \end{tabular}
+ \begin{tblr}{colspec={*{6}{Q[1.25cm,c,m]}},hlines,vlines,rows={1.15em}}
+ \SetCell[c=6]{c} Notice & & & & & \\
+ 1 & 2 & 3 & 5 & 6 & 9 \\
+ Rouge & Marron & Jaune & Noir & Bleu & Blanc \\
+ \end{tblr}
+% \renewcommand\arraystretch{1.25}
+% \begin{tabular}{|c|c|c|c|c|c|}
+% \hline
+% \multicolumn{6}{|c|}{Notice} \\ \hline
+% 1 & 2 & 3 & 5 & 6 & 9 \\ \hline
+% Rouge & Marron & Jaune & Noir & Bleu & Blanc \\ \hline
+% \end{tabular}
\end{center}
\begin{center}
@@ -4432,11 +4598,15 @@
\part{Historique}
+{\small \bverb|v1.3.3|~:~~~~Ajout d'un environnement pour des arbres de probas classiques, en \TikZ{} (page \pageref{arbresprobas})
+
+{\small \bverb|v1.3.2|~:~~~~Correction d'un bug sur les conversions bintohex avec lualatex (page \pageref{conversions})
+
{\small \bverb|v1.3.1|~:~~~~Ajout d'une option pour ne pas afficher les bordures des corrections de pixelart (page \pageref{pixelart})
{\small \bverb|v1.3.0|~:~~~~Commande pour présenter une conversion depuis la base 10 (page \pageref{convrestes})
-{\small \bverb|v1.2.9|~:~~~~Correction des commandes avec simplekv
+{\small \bverb|v1.2.9|~:~~~~Correction des commandes avec \textsf{simplekv}
{\small \bverb|v1.2.8|~:~~~~Ajout d'une librairie \TikZ{} oubliée, et remise en forme de la documentation
@@ -4460,7 +4630,7 @@
{\small \bverb|v1.1.8|~:~~~~Style "Mainlevée" basique pour \TikZ (page \pageref{mainlevee})
-{\small \bverb|v1.1.7|~:~~~~Conversions bin/hex/dec (basées sur \ctex{xintbinhex}) avec quelques détails (page \pageref{conversions})
+{\small \bverb|v1.1.7|~:~~~~Conversions bin/hex/dec (basées sur \textsf{xintbinhex}) avec quelques détails (page \pageref{conversions})
{\small \bverb|v1.1.6|~:~~~~Ajout d'une commande pour déterminer les paramètres d'une régression linéaire par moindres carrés (page \pageref{reglin})
@@ -4482,15 +4652,15 @@
{\small \bverb|v1.0.6|~:~~~~Ajout d'une option \textsf{nominted} pour ne pas charger (pas besoin de compiler avec \textsf{shell-escape})
-{\small \bverb|v1.0.5|~:~~~~Ajout d'un environnement pour Python (minted) (page \pageref{pytminted})
+{\small \bverb|v1.0.5|~:~~~~Ajout d'un environnement pour Python (\textsf{minted}) (page \pageref{pytminted})
{\small \bverb|v1.0.4|~:~~~~Ajout des environnements pour Terminal (win, osx, unix) (page \pageref{terms})
{\small \bverb|v1.0.3|~:~~~~Ajout des environnements pour PseudoCode (page \pageref{pseudocode})
-{\small \bverb|v1.0.2|~:~~~~Ajout des environnements pour Python (pythontex) (page \pageref{pythontex})
+{\small \bverb|v1.0.2|~:~~~~Ajout des environnements pour Python (\textsf{pythontex}) (page \pageref{pythontex})
-{\small \bverb|v1.0.1|~:~~~~Modification mineure liée au chargement de \ctex{xcolor}
+{\small \bverb|v1.0.1|~:~~~~Modification mineure liée au chargement de \textsf{xcolor}
{\small \bverb|v1.0 |~:~~~~Version initiale}
Modified: trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty 2022-10-13 20:37:01 UTC (rev 64697)
+++ trunk/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty 2022-10-13 20:37:15 UTC (rev 64698)
@@ -3,7 +3,9 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2022/10/07 v1.3.1 - Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2022/10/12 v1.3.3 - Aide pour l'utilisation de LaTeX en lycee]
+% 1.3.2 Ajout de commandes pour des arbres de probas classiques, en tikz
+% 1.3.1 Correction d'une commande liée à la conversion bintohex (suppression clé trait)
% 1.3.1 Ajout d'une option pour ne pas afficher les bords des cases en pixelart
% 1.3.0 Ajout d'une commande pour mettre en forme une conversion depuis la base 10
% 1.2.9 Correction d'une incompatibilité avec simplekv (clés vides...)
@@ -1422,15 +1424,14 @@
}
%bin->hexa avec blocs de 4 chiffres
-\defKV[CONVBINHEX]{%
- trait=\def\epcrochet{#1}
-}
+%\defKV[CONVBINHEX]{%
+% trait=\def\epcrochet{#1}
+%}
\setKVdefault[CONVBINHEX]{%
- trait=0.5pt,%
+ %trait=0.5pt,%
affbase=true,%
details=true
}
-
%bourrage de 0 avant
\ExplSyntaxOn
\NewExpandableDocumentCommand{\PLstrzeros}{m}
@@ -1442,10 +1443,6 @@
}
\ExplSyntaxOff
-%conversion (visuelle) d'un bloc de 4 chiffres binaires
-\newcommand\PLconvblocbinhex[2][0.5pt]{%
- \underbracket[#1]{#2}_{\xintBinToHex{#2}}
-}
%la conversion complète
\newcommand\PLconvbinhex[2][]{%
@@ -1468,19 +1465,19 @@
\newcount\cpt
\cpt0
\loop\ifnum \cpt<\nbblocs
- \def\iinit{\fpeval{4*\cpt+1}}
- \def\ifinal{\fpeval{4*(\cpt+1)}}
- \StrMid{\resinter}{\iinit}{\ifinal}[\blocinter]
- \PLconvblocbinhex[\epcrochet]{\blocinter}
+ \def\iinit{\fpeval{4*\cpt+1}}%
+ \def\ifinal{\fpeval{4*(\cpt+1)}}%
+ \StrMid{\resinter}{\iinit}{\ifinal}[\blocinter]%
+ {\underbracket{\blocinter}_{\xintBinToHex{\blocinter}}\,}
\advance\cpt by 1
\repeat
- =
+ \!=
}%
{}
\xintBinToHex{\chbrut}\ifboolKV[CONVBINHEX]{affbase}{_{16}}{}
}
-%bin/hexa->dec avec écriture polynomiale
+%bin/hexa/bin->dec avec écriture polynomiale
\defKV[CONVTODEC]{%
basedep=\def\basedepart{#1}
}
@@ -1491,6 +1488,12 @@
zeros=true
}
+\ExplSyntaxOn
+\newcommand\convertbasetobasedix[2]{%
+ \int_from_base:nn {#1}{#2}
+}
+\ExplSyntaxOff
+
\newcommand\PLconvtodec[2][]{%
\useKVdefault[CONVTODEC]
\setKV[CONVTODEC]{#1}% on paramètres les nouvelles clés et on les simplifie
@@ -1554,6 +1557,38 @@
{}
}
+\newcommand\PLconvversdix[3][]{%1=options,%2=nb,%3=basedep
+ \useKVdefault[CONVTODEC]
+ \setKV[CONVTODEC]{#1}% on paramètres les nouvelles clés et on les simplifie
+ \def\NBdepart{#2}
+ \def\basedepart{#3}
+ \StrLen{\NBdepart}[\nbchiffres]
+ \StrChar{\NBdepart}{1}[\chiffre]
+ \NBdepart\ifboolKV[CONVTODEC]{affbase}{_{\basedepart}}{} =
+ \ifboolKV[CONVTODEC]{details}{%
+ \xintHexToDec{\chiffre}\times\basedepart^{\inteval{\nbchiffres-1}}%
+ \newcount\cpt
+ \cpt2
+ \loop\ifnum \cpt<\inteval{\nbchiffres+1}
+ \def\puiss{\inteval{\nbchiffres-\cpt}}
+ \StrChar{\NBdepart}{\cpt}[\chiffre]
+ \ifboolKV[CONVTODEC]{zeros}%
+ {%
+ +\xintHexToDec{\chiffre}\times\basedepart^{\puiss}%
+ }
+ {
+ \ifnum\xintHexToDec{\chiffre} > 0
+ +\xintHexToDec{\chiffre}\times\basedepart^{\puiss}%
+ \fi
+ }
+ \advance\cpt by 1
+ \repeat
+ =
+ }
+ {}
+ \num{\convertbasetobasedix{#2}{#3}}\ifboolKV[CONVTODEC]{affbase}{_{10}}{}
+}
+
%==============MainLevée TikZ========== OK !!
\tikzset{%
mainlevee/.style args={#1et#2}{decorate,decoration={random steps, segment length=#1,amplitude=#2}},
@@ -2360,7 +2395,8 @@
decalh=2pt,%
decalv=3pt,%
rect=true,%
- noeud=EEE
+ noeud=EEE,%
+ couleurres=false
}
\newcommand\PLconvDepuisDec[3][]{%
@@ -2385,17 +2421,415 @@
%dernière
\xdef\ValQ{\fpeval{trunc(\ValTMP/#3,0)}}\xdef\ValR{\fpeval{\ValTMP-#3*\ValQ}}%
\\ \num{\ValTMP}\uppercase{&}\num{\ValB}\times\num{\ValQ}\uppercase{&}\PLnoeud{\PLConvNoeud2}{\num{\ValR}}
- \end{array} \right| \Rightarrow \num{#2}_{10}=\convertbasedixtobase{#2}{#3}_{#3}}
+ \end{array} \right| \Rightarrow \num{#2}_{10}=\ifboolKV[convfromten]{couleurres}{\mathcolor{\PLConvCouleur}{\convertbasedixtobase{#2}{#3}_{#3}}}{\convertbasedixtobase{#2}{#3}_{#3}}}%
\ifboolKV[convfromten]{rect}%
{%
\IfSubStr{\PLConvDecalH}{/}%
{\StrCut{\PLConvDecalH}{/}{\PLConvDecalHg}{\PLConvDecalHd}}%
- {\def\PLConvDecalHg{\PLConvDecalH}\def\PLConvDecalHd{\PLConvDecalH}}
+ {\def\PLConvDecalHg{\PLConvDecalH}\def\PLConvDecalHd{\PLConvDecalH}}%
\begin{tikzpicture}
\draw[overlay,rounded corners=4pt,\PLConvCouleur,thick] ($(\PLConvNoeud1.north west)+(-\PLConvDecalHg,\PLConvDecalV)$) rectangle ($(\PLConvNoeud2.south east)+(\PLConvDecalHd,-\PLConvDecalV)$) ;
\draw[overlay,rounded corners=4pt,\PLConvCouleur,thick,->,>=latex] ($(\PLConvNoeud2.east)+(\PLConvDecalHd,0)$)--++(0,{0.75\baselineskip}) ;
- \end{tikzpicture}
- }{}
+ \end{tikzpicture}%
+ }{}%
}
+%===============ARBRESPROBAS=========== OK !!
+\defKV[PLTIKZARBRE]{%
+ unite=\def\PLAPunite{#1},%
+ espniv=\def\PLAPespniv{#1},%
+ espfeuille=\def\PLAPespfeuille{#1},%
+ type=\def\PLAPtype{#1},%
+ police=\def\PLAPfont{#1},%
+ policeprobas=\def\PLAPfontproba{#1},%
+ styletrait=\def\PLAPtypetrait{#1},%
+ eptrait=\def\PLAPeptrait{#1}
+}
+
+\setKVdefault[PLTIKZARBRE]{%
+ unite=1cm,%
+ espniv=3.25,%
+ espfeuille=1,%
+ type=2x2,%
+ police=\normalfont\normalsize,%
+ policeprobas=\normalfont\small,%
+ inclineprobas=true,%
+ fleche=false,%
+ styletrait={},%
+ eptrait=semithick
+}
+
+\NewDocumentCommand\PLarbre{ O{} m }{%1=options,2=libellés
+ \useKVdefault[PLTIKZARBRE]%
+ \setKV[PLTIKZARBRE]{#1}%
+ \setsepchar[.]{,./}%
+ \readlist*\PLARBREDONNES{#2}%
+ \begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite]
+ %styles
+ \tikzstyle{noeud} = [font=\PLAPfont]
+ \tikzstyle{probas}= [font=\PLAPfontproba]
+ \ifboolKV[PLTIKZARBRE]{inclineprobas}
+ {\tikzstyle{PLetiquette}=[pos=0.525,sloped,fill=white]}
+ {\tikzstyle{PLetiquette}=[pos=0.525,fill=white]}
+ \ifboolKV[PLTIKZARBRE]{fleche}
+ {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait]}
+ {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait]}
+ %arbre2x2
+ \IfEq{\PLAPtype}{2x2}
+ {%
+ \coordinate (R) at ({0*\PLAPespniv},{-1.5*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-0.5*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-2.5*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (A12)--(A23) ;}
+ {\draw[PLfleche] (A12)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ }{}
+ %arbre3x2
+ \IfEq{\PLAPtype}{3x2}
+ {%
+ %sommets
+ \coordinate (R) at ({0*\PLAPespniv},{-2.5*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-0.5*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-2.5*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \node[noeud] (A13) at ({1*\PLAPespniv},{-4.5*\PLAPespfeuille}) {\PLARBREDONNES[7,1]};
+ \node[noeud] (A25) at ({2*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[8,1]};
+ \node[noeud] (A26) at ({2*\PLAPespniv},{-5*\PLAPespfeuille}) {\PLARBREDONNES[9,1]};
+ %branches
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (A12)--(A23) ;}
+ {\draw[PLfleche] (A12)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ \IfEq{\PLARBREDONNES[7,2]}{}
+ {\draw[PLfleche] (R)--(A13) ;}
+ {\draw[PLfleche] (R)--(A13) node[probas,PLetiquette,{\PLARBREDONNES[7,3]}] {{\PLARBREDONNES[7,2]}} ;}
+ \IfEq{\PLARBREDONNES[8,2]}{}
+ {\draw[PLfleche] (A13)--(A25) ;}
+ {\draw[PLfleche] (A13)--(A25) node[probas,PLetiquette,{\PLARBREDONNES[8,3]}] {{\PLARBREDONNES[8,2]}} ;}
+ \IfEq{\PLARBREDONNES[9,2]}{}
+ {\draw[PLfleche] (A13)--(A26) ;}
+ {\draw[PLfleche] (A13)--(A26) node[probas,PLetiquette,{\PLARBREDONNES[9,3]}] {{\PLARBREDONNES[9,2]}} ;}
+ }{}
+ %arbre2x3
+ \IfEq{\PLAPtype}{2x3}
+ {%
+ %sommets
+ \coordinate (R) at ({0*\PLAPespniv},{-2.5*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \node[noeud] (A25) at ({2*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[7,1]};
+ \node[noeud] (A26) at ({2*\PLAPespniv},{-5*\PLAPespfeuille}) {\PLARBREDONNES[8,1]};
+ %branches
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (A11)--(A23) ;}
+ {\draw[PLfleche] (A11)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ \IfEq{\PLARBREDONNES[7,2]}{}
+ {\draw[PLfleche] (A12)--(A25) ;}
+ {\draw[PLfleche] (A12)--(A25) node[probas,PLetiquette,{\PLARBREDONNES[7,3]}] {{\PLARBREDONNES[7,2]}} ;}
+ \IfEq{\PLARBREDONNES[8,2]}{}
+ {\draw[PLfleche] (A12)--(A26) ;}
+ {\draw[PLfleche] (A12)--(A26) node[probas,PLetiquette,{\PLARBREDONNES[8,3]}] {{\PLARBREDONNES[8,2]}} ;}
+ }{}
+ %arbre2x3
+ \IfEq{\PLAPtype}{3x3}
+ {%
+ %sommets
+ \coordinate (R) at ({0*\PLAPespniv},{-4*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A13) at ({1*\PLAPespniv},{-7*\PLAPespfeuille}) {\PLARBREDONNES[10,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \node[noeud] (A25) at ({2*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[7,1]};
+ \node[noeud] (A26) at ({2*\PLAPespniv},{-5*\PLAPespfeuille}) {\PLARBREDONNES[8,1]};
+ \node[noeud] (A27) at ({2*\PLAPespniv},{-6*\PLAPespfeuille}) {\PLARBREDONNES[10,1]};
+ \node[noeud] (A28) at ({2*\PLAPespniv},{-7*\PLAPespfeuille}) {\PLARBREDONNES[11,1]};
+ \node[noeud] (A29) at ({2*\PLAPespniv},{-8*\PLAPespfeuille}) {\PLARBREDONNES[12,1]};
+ %branches
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[9,2]}{}
+ {\draw[PLfleche] (R)--(A13) ;}
+ {\draw[PLfleche] (R)--(A13) node[probas,PLetiquette,{\PLARBREDONNES[9,3]}] {{\PLARBREDONNES[9,2]}} ;}
+ %N2
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (A11)--(A23) ;}
+ {\draw[PLfleche] (A11)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ \IfEq{\PLARBREDONNES[7,2]}{}
+ {\draw[PLfleche] (A12)--(A25) ;}
+ {\draw[PLfleche] (A12)--(A25) node[probas,PLetiquette,{\PLARBREDONNES[7,3]}] {{\PLARBREDONNES[7,2]}} ;}
+ \IfEq{\PLARBREDONNES[8,2]}{}
+ {\draw[PLfleche] (A12)--(A26) ;}
+ {\draw[PLfleche] (A12)--(A26) node[probas,PLetiquette,{\PLARBREDONNES[8,3]}] {{\PLARBREDONNES[8,2]}} ;}
+ \IfEq{\PLARBREDONNES[10,2]}{}
+ {\draw[PLfleche] (A13)--(A27) ;}
+ {\draw[PLfleche] (A13)--(A27) node[probas,PLetiquette,{\PLARBREDONNES[10,3]}] {{\PLARBREDONNES[10,2]}} ;}
+ \IfEq{\PLARBREDONNES[11,2]}{}
+ {\draw[PLfleche] (A13)--(A28) ;}
+ {\draw[PLfleche] (A13)--(A28) node[probas,PLetiquette,{\PLARBREDONNES[11,3]}] {{\PLARBREDONNES[11,2]}} ;}
+ \IfEq{\PLARBREDONNES[12,2]}{}
+ {\draw[PLfleche] (A13)--(A29) ;}
+ {\draw[PLfleche] (A13)--(A29) node[probas,PLetiquette,{\PLARBREDONNES[12,3]}] {{\PLARBREDONNES[12,2]}} ;}
+ }{}
+ \end{tikzpicture}
+}
+
+\NewDocumentEnvironment{PLenvarbre}{ O{} m }%1=options,2=libellés
+{
+ \useKVdefault[PLTIKZARBRE]
+ \setKV[PLTIKZARBRE]{#1}
+ \setsepchar[.]{,./}%
+ \readlist*\PLARBREDONNES{#2}
+ \begin{tikzpicture}[x=\PLAPunite,y=\PLAPunite]
+ %styles
+ \tikzstyle{noeud} = [font=\PLAPfont]
+ \tikzstyle{probas}= [font=\PLAPfontproba]
+ \ifboolKV[PLTIKZARBRE]{inclineprobas}
+ {\tikzstyle{PLetiquette}=[pos=0.525,sloped,fill=white]}
+ {\tikzstyle{PLetiquette}=[pos=0.525,fill=white]}
+ \ifboolKV[PLTIKZARBRE]{fleche}
+ {\tikzstyle{PLfleche}=[->,>=latex,\PLAPtypetrait,\PLAPeptrait]}
+ {\tikzstyle{PLfleche}=[\PLAPtypetrait,\PLAPeptrait]}
+ %arbre2x2
+ \IfEq{\PLAPtype}{2x2}
+ {%
+ \coordinate (R) at ({0*\PLAPespniv},{-1.5*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-0.5*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-2.5*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (A12)--(A23) ;}
+ {\draw[PLfleche] (A12)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ }{}
+ %arbre3x2
+ \IfEq{\PLAPtype}{3x2}
+ {%
+ %sommets
+ \coordinate (R) at ({0*\PLAPespniv},{-2.5*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-0.5*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-2.5*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \node[noeud] (A13) at ({1*\PLAPespniv},{-4.5*\PLAPespfeuille}) {\PLARBREDONNES[7,1]};
+ \node[noeud] (A25) at ({2*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[8,1]};
+ \node[noeud] (A26) at ({2*\PLAPespniv},{-5*\PLAPespfeuille}) {\PLARBREDONNES[9,1]};
+ %branches
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (A12)--(A23) ;}
+ {\draw[PLfleche] (A12)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ \IfEq{\PLARBREDONNES[7,2]}{}
+ {\draw[PLfleche] (R)--(A13) ;}
+ {\draw[PLfleche] (R)--(A13) node[probas,PLetiquette,{\PLARBREDONNES[7,3]}] {{\PLARBREDONNES[7,2]}} ;}
+ \IfEq{\PLARBREDONNES[8,2]}{}
+ {\draw[PLfleche] (A13)--(A25) ;}
+ {\draw[PLfleche] (A13)--(A25) node[probas,PLetiquette,{\PLARBREDONNES[8,3]}] {{\PLARBREDONNES[8,2]}} ;}
+ \IfEq{\PLARBREDONNES[9,2]}{}
+ {\draw[PLfleche] (A13)--(A26) ;}
+ {\draw[PLfleche] (A13)--(A26) node[probas,PLetiquette,{\PLARBREDONNES[9,3]}] {{\PLARBREDONNES[9,2]}} ;}
+ }{}
+ %arbre2x3
+ \IfEq{\PLAPtype}{2x3}
+ {%
+ %sommets
+ \coordinate (R) at ({0*\PLAPespniv},{-2.5*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \node[noeud] (A25) at ({2*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[7,1]};
+ \node[noeud] (A26) at ({2*\PLAPespniv},{-5*\PLAPespfeuille}) {\PLARBREDONNES[8,1]};
+ %branches
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (A11)--(A23) ;}
+ {\draw[PLfleche] (A11)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ \IfEq{\PLARBREDONNES[7,2]}{}
+ {\draw[PLfleche] (A12)--(A25) ;}
+ {\draw[PLfleche] (A12)--(A25) node[probas,PLetiquette,{\PLARBREDONNES[7,3]}] {{\PLARBREDONNES[7,2]}} ;}
+ \IfEq{\PLARBREDONNES[8,2]}{}
+ {\draw[PLfleche] (A12)--(A26) ;}
+ {\draw[PLfleche] (A12)--(A26) node[probas,PLetiquette,{\PLARBREDONNES[8,3]}] {{\PLARBREDONNES[8,2]}} ;}
+ }{}
+ %arbre2x3
+ \IfEq{\PLAPtype}{3x3}
+ {%
+ %sommets
+ \coordinate (R) at ({0*\PLAPespniv},{-4*\PLAPespfeuille}) ;
+ \node[noeud] (A11) at ({1*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[1,1]};
+ \node[noeud] (A12) at ({1*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[5,1]};
+ \node[noeud] (A13) at ({1*\PLAPespniv},{-7*\PLAPespfeuille}) {\PLARBREDONNES[10,1]};
+ \node[noeud] (A21) at ({2*\PLAPespniv},{-0*\PLAPespfeuille}) {\PLARBREDONNES[2,1]};
+ \node[noeud] (A22) at ({2*\PLAPespniv},{-1*\PLAPespfeuille}) {\PLARBREDONNES[3,1]};
+ \node[noeud] (A23) at ({2*\PLAPespniv},{-2*\PLAPespfeuille}) {\PLARBREDONNES[4,1]};
+ \node[noeud] (A24) at ({2*\PLAPespniv},{-3*\PLAPespfeuille}) {\PLARBREDONNES[6,1]};
+ \node[noeud] (A25) at ({2*\PLAPespniv},{-4*\PLAPespfeuille}) {\PLARBREDONNES[7,1]};
+ \node[noeud] (A26) at ({2*\PLAPespniv},{-5*\PLAPespfeuille}) {\PLARBREDONNES[8,1]};
+ \node[noeud] (A27) at ({2*\PLAPespniv},{-6*\PLAPespfeuille}) {\PLARBREDONNES[10,1]};
+ \node[noeud] (A28) at ({2*\PLAPespniv},{-7*\PLAPespfeuille}) {\PLARBREDONNES[11,1]};
+ \node[noeud] (A29) at ({2*\PLAPespniv},{-8*\PLAPespfeuille}) {\PLARBREDONNES[12,1]};
+ %branches
+ \IfEq{\PLARBREDONNES[1,2]}{}
+ {\draw[PLfleche] (R)--(A11) ;}
+ {\draw[PLfleche] (R)--(A11) node[probas,PLetiquette,{\PLARBREDONNES[1,3]}] {{\PLARBREDONNES[1,2]}} ;}
+ \IfEq{\PLARBREDONNES[5,2]}{}
+ {\draw[PLfleche] (R)--(A12) ;}
+ {\draw[PLfleche] (R)--(A12) node[probas,PLetiquette,{\PLARBREDONNES[5,3]}] {{\PLARBREDONNES[5,2]}} ;}
+ \IfEq{\PLARBREDONNES[9,2]}{}
+ {\draw[PLfleche] (R)--(A13) ;}
+ {\draw[PLfleche] (R)--(A13) node[probas,PLetiquette,{\PLARBREDONNES[9,3]}] {{\PLARBREDONNES[9,2]}} ;}
+ %N2
+ \IfEq{\PLARBREDONNES[2,2]}{}
+ {\draw[PLfleche] (A11)--(A21) ;}
+ {\draw[PLfleche] (A11)--(A21) node[probas,PLetiquette,{\PLARBREDONNES[2,3]}] {{\PLARBREDONNES[2,2]}} ;}
+ \IfEq{\PLARBREDONNES[3,2]}{}
+ {\draw[PLfleche] (A11)--(A22) ;}
+ {\draw[PLfleche] (A11)--(A22) node[probas,PLetiquette,{\PLARBREDONNES[3,3]}] {{\PLARBREDONNES[3,2]}} ;}
+ \IfEq{\PLARBREDONNES[4,2]}{}
+ {\draw[PLfleche] (A11)--(A23) ;}
+ {\draw[PLfleche] (A11)--(A23) node[probas,PLetiquette,{\PLARBREDONNES[4,3]}] {{\PLARBREDONNES[4,2]}} ;}
+ \IfEq{\PLARBREDONNES[6,2]}{}
+ {\draw[PLfleche] (A12)--(A24) ;}
+ {\draw[PLfleche] (A12)--(A24) node[probas,PLetiquette,{\PLARBREDONNES[6,3]}] {{\PLARBREDONNES[6,2]}} ;}
+ \IfEq{\PLARBREDONNES[7,2]}{}
+ {\draw[PLfleche] (A12)--(A25) ;}
+ {\draw[PLfleche] (A12)--(A25) node[probas,PLetiquette,{\PLARBREDONNES[7,3]}] {{\PLARBREDONNES[7,2]}} ;}
+ \IfEq{\PLARBREDONNES[8,2]}{}
+ {\draw[PLfleche] (A12)--(A26) ;}
+ {\draw[PLfleche] (A12)--(A26) node[probas,PLetiquette,{\PLARBREDONNES[8,3]}] {{\PLARBREDONNES[8,2]}} ;}
+ \IfEq{\PLARBREDONNES[10,2]}{}
+ {\draw[PLfleche] (A13)--(A27) ;}
+ {\draw[PLfleche] (A13)--(A27) node[probas,PLetiquette,{\PLARBREDONNES[10,3]}] {{\PLARBREDONNES[10,2]}} ;}
+ \IfEq{\PLARBREDONNES[11,2]}{}
+ {\draw[PLfleche] (A13)--(A28) ;}
+ {\draw[PLfleche] (A13)--(A28) node[probas,PLetiquette,{\PLARBREDONNES[11,3]}] {{\PLARBREDONNES[11,2]}} ;}
+ \IfEq{\PLARBREDONNES[12,2]}{}
+ {\draw[PLfleche] (A13)--(A29) ;}
+ {\draw[PLfleche] (A13)--(A29) node[probas,PLetiquette,{\PLARBREDONNES[12,3]}] {{\PLARBREDONNES[12,2]}} ;}
+ }{}
+ }
+ {
+ \end{tikzpicture}
+}
+
\endinput
\ No newline at end of file
More information about the tex-live-commits
mailing list.