| 1 |
% !TeX TXS-program:compile = txs:///lualatex |
| 2 |
|
| 3 |
\documentclass[french,11pt,a4paper]{article} |
| 4 |
%\usepackage[utf8]{inputenc} |
| 5 |
%\usepackage[T1]{fontenc} |
| 6 |
\usepackage{amsmath,amssymb} |
| 7 |
\usepackage{fontspec} |
| 8 |
\setmonofont[Scale=MatchLowercase]{Inconsolatazi4} |
| 9 |
\usepackage{tkz-bernoulli} |
| 10 |
\usepackage{nicefrac} |
| 11 |
\usepackage{enumitem} |
| 12 |
\usepackage{codehigh} |
| 13 |
\usepackage{multicol} |
| 14 |
\usepackage{tabularray} |
| 15 |
\usepackage{lipsum} |
| 16 |
\usepackage{fancyvrb} |
| 17 |
\usepackage{fancyhdr} |
| 18 |
\usepackage{fontawesome5} |
| 19 |
\fancyhf{} |
| 20 |
\renewcommand{\headrulewidth}{0pt} |
| 21 |
%\rhead{\sffamily\small\affloetalab[Legende]} |
| 22 |
\lfoot{\sffamily\small [tkz-bernoulli]} |
| 23 |
\cfoot{\sffamily\small - \thepage{} -} |
| 24 |
\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}} |
| 25 |
\usepackage{hologo} |
| 26 |
\providecommand\tikzlogo{Ti\textit{k}Z} |
| 27 |
\providecommand\TeXLive{\TeX{}Live\xspace} |
| 28 |
\providecommand\PSTricks{\textsf{PSTricks}\xspace} |
| 29 |
\let\pstricks\PSTricks |
| 30 |
\let\TikZ\tikzlogo |
| 31 |
|
| 32 |
\usepackage{hyperref} |
| 33 |
\urlstyle{same} |
| 34 |
\hypersetup{pdfborder=0 0 0} |
| 35 |
\usepackage[margin=1.5cm]{geometry} |
| 36 |
\setlength{\parindent}{0pt} |
| 37 |
\def\TPversion{0.1.3} |
| 38 |
\def\TPdate{5 novembre 2023} |
| 39 |
\usepackage{tcolorbox} |
| 40 |
\tcbuselibrary{skins,hooks} |
| 41 |
\usepackage{soul} |
| 42 |
\sethlcolor{lightgray!25} |
| 43 |
\NewDocumentCommand\MontreCode{ m }{% |
| 44 |
\hl{\vphantom{\texttt{pf}}\texttt{#1}}% |
| 45 |
} |
| 46 |
\usepackage{siunitx} |
| 47 |
\sisetup{locale=FR} |
| 48 |
\usepackage{babel} |
| 49 |
|
| 50 |
\begin{document} |
| 51 |
|
| 52 |
\pagestyle{fancy} |
| 53 |
|
| 54 |
\thispagestyle{empty} |
| 55 |
|
| 56 |
\begin{center} |
| 57 |
\begin{minipage}{0.88\linewidth} |
| 58 |
\begin{tcolorbox}[colframe=yellow,colback=yellow!15] |
| 59 |
\begin{center} |
| 60 |
\begin{tabular}{c} |
| 61 |
{\Huge \texttt{tkz-bernoulli}}\\ |
| 62 |
\\ |
| 63 |
{\LARGE Présenter, grâce à \MontreCode{tikz},} \\ |
| 64 |
{\LARGE des arbres de Bernoulli.} \\ |
| 65 |
\\ |
| 66 |
{\LARGE $\rhd$ Commandes [fr] ou [en] $\lhd$} \\ |
| 67 |
\\ |
| 68 |
{\small \texttt{Version \TPversion{} -- \TPdate}} |
| 69 |
\end{tabular} |
| 70 |
\end{center} |
| 71 |
\end{tcolorbox} |
| 72 |
\end{minipage} |
| 73 |
\end{center} |
| 74 |
|
| 75 |
\begin{center} |
| 76 |
\begin{tabular}{c} |
| 77 |
\texttt{Cédric Pierquet}\\ |
| 78 |
{\ttfamily c pierquet -- at -- outlook . fr}\\ |
| 79 |
\texttt{\url{https://github.com/cpierquet/tkz-bernoulli}} \\ |
| 80 |
\end{tabular} |
| 81 |
\end{center} |
| 82 |
|
| 83 |
\hrule |
| 84 |
|
| 85 |
\vfill |
| 86 |
|
| 87 |
Présenter, avec personnalisations possibles, un arbre de Bernoulli. |
| 88 |
|
| 89 |
\vfill |
| 90 |
|
| 91 |
\begin{tcolorbox}[colframe=lightgray,colback=white] |
| 92 |
\MontreCode{\textbackslash tkzSchemBernoulli*} |
| 93 |
|
| 94 |
\hfill\tkzSchemBernoulli*\hfill~ |
| 95 |
\end{tcolorbox} |
| 96 |
|
| 97 |
\vspace*{5mm} |
| 98 |
|
| 99 |
\begin{tcolorbox}[colframe=lightgray,colback=white] |
| 100 |
\MontreCode{\textbackslash tkzSchemBernoulli*} |
| 101 |
|
| 102 |
\phantom{\texttt{~~~~}}\MontreCode{[N=2,EspNiv=3,EspFeuil=1.25,NoticeProbas=\{\textbackslash num{0.75}/\textbackslash num\{0.25\}\},Evts=\{\$E\$/\$\textbackslash overline\{E\}\$\}]} |
| 103 |
|
| 104 |
\tikzstyle{BernProbaS} = [text=violet,fill=white,sloped,midway,font=\scriptsize] |
| 105 |
\tikzstyle{BernProbaE} = [text=red,fill=white,sloped,midway,font=\scriptsize] |
| 106 |
\tikzstyle{BernBranche} = [semithick,blue,->] |
| 107 |
\hfill\tkzSchemBernoulli*[N=2,EspNiv=3,EspFeuil=1.25,Notice,Racine=false,Probas={\num{0.75}/\num{0.25}},Evts={$E$/$\overline{E}$}]\hfill~ |
| 108 |
\tkzSchemBernStyleDefaut |
| 109 |
\end{tcolorbox} |
| 110 |
|
| 111 |
\vfill~ |
| 112 |
|
| 113 |
\pagebreak |
| 114 |
|
| 115 |
\phantomsection |
| 116 |
|
| 117 |
\hypertarget{matoc}{} |
| 118 |
|
| 119 |
\tableofcontents |
| 120 |
|
| 121 |
\vspace*{5mm} |
| 122 |
|
| 123 |
\hrule |
| 124 |
|
| 125 |
\vspace*{5mm} |
| 126 |
|
| 127 |
\section{Le package tkz-bernoulli} |
| 128 |
|
| 129 |
\subsection{Introduction} |
| 130 |
|
| 131 |
L'idée du package \MontreCode{tkz-bernoulli} est de proposer des commandes pour représenter un schéma de Bernoulli, dans le cadre d'une loi binomiale par exemple, avec la possibilité de : |
| 132 |
|
| 133 |
\begin{itemize} |
| 134 |
\item personnaliser les dimensions et styles ; |
| 135 |
\item rajouter des éléments a posteriori, grâce aux nœuds créés. |
| 136 |
\end{itemize} |
| 137 |
|
| 138 |
\subsection{Chargement} |
| 139 |
|
| 140 |
Le package se charge dans le préambule, via \MontreCode{\textbackslash usepackage\{tkz-bernoulli\}}. |
| 141 |
|
| 142 |
Les seuls packages chargés sont : |
| 143 |
|
| 144 |
\begin{itemize} |
| 145 |
\item \MontreCode{xstring}, \MontreCode{pgffor} et \MontreCode{simplekv} ; |
| 146 |
\item \MontreCode{xintexpr} et \MontreCode{xintbinhex} ; |
| 147 |
\item \MontreCode{tikz} avec la librairie \MontreCode{calc}. |
| 148 |
\end{itemize} |
| 149 |
|
| 150 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 151 |
\usepackage{tkz-bernoulli} |
| 152 |
\end{codehigh} |
| 153 |
|
| 154 |
{\small\faAngleDoubleRight}~\MontreCode{tkz-bernoulli} est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}. |
| 155 |
|
| 156 |
\subsection{Commandes disponibles} |
| 157 |
|
| 158 |
Les commandes proposées par le package \MontreCode{tkz-bernoulli} sont : |
| 159 |
|
| 160 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 161 |
%commande à insérer dans un environnement tikzpicture, pour rajouts éventuels |
| 162 |
\begin{tikzpicture} |
| 163 |
\tkzSchemBernoulli |
| 164 |
\end{tikzpicture} |
| 165 |
\end{codehigh} |
| 166 |
|
| 167 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 168 |
%commande autonome |
| 169 |
\tkzSchemBernoulli* |
| 170 |
\end{codehigh} |
| 171 |
|
| 172 |
\subsection{Styles par défaut} |
| 173 |
|
| 174 |
Le package propose des styles prédéfinis, pour : |
| 175 |
|
| 176 |
\begin{itemize} |
| 177 |
\item la racine et les nœuds ; |
| 178 |
\item les branches ; |
| 179 |
\item les probabilités. |
| 180 |
\end{itemize} |
| 181 |
|
| 182 |
Pour modifier, en \textit{profondeur}, le style de l'arbre, il suffira de redéfinir les styles suivants (une commande est disponible pour remettre tous les styles par défaut) : |
| 183 |
|
| 184 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 185 |
%style par défaut des branches |
| 186 |
\tikzstyle{BernBranche} = [semithick] |
| 187 |
|
| 188 |
%style par défaut du label de la racine, si affichée |
| 189 |
\tikzstyle{BernRacine} = [inner sep=2pt] |
| 190 |
|
| 191 |
%styles par défaut des noeuds relatifs à Succès/Échec |
| 192 |
\tikzstyle{BernNoeudS} = [inner sep=2pt] |
| 193 |
\tikzstyle{BernNoeudE} = [inner sep=2pt] |
| 194 |
|
| 195 |
%styles par défaut des probas relatives à Succès/Échec |
| 196 |
\tikzstyle{BernProbaS} = [fill=white,midway,font=\footnotesize,inner sep=1.5pt] |
| 197 |
\tikzstyle{BernProbaE} = [fill=white,midway,font=\footnotesize,inner sep=1.5pt] |
| 198 |
|
| 199 |
%style par défaut des valeurs prises par la v.a. |
| 200 |
\tikzstyle{BernNotice} = [inner sep=2pt,text=teal,right=1em] |
| 201 |
\end{codehigh} |
| 202 |
|
| 203 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 204 |
%commande de remise des styles par défaut |
| 205 |
\tkzSchemBernStyleDefaut |
| 206 |
\end{codehigh} |
| 207 |
|
| 208 |
\section{Les commandes} |
| 209 |
|
| 210 |
\subsection{Commande à insérer dans un environnement tikzpicture} |
| 211 |
|
| 212 |
La commande dédiée pour insertion dans un environnement \textsf{tikzpicture} est \MontreCode{\textbackslash tkzSchemBernoulli} : |
| 213 |
|
| 214 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 215 |
%commande à insérer dans un environnement tikzpicture, pour rajouts éventuels |
| 216 |
\begin{tikzpicture} |
| 217 |
\tkzSchemBernoulli[clés] |
| 218 |
\end{tikzpicture} |
| 219 |
\end{codehigh} |
| 220 |
|
| 221 |
Concernant cette commande : |
| 222 |
|
| 223 |
\begin{itemize} |
| 224 |
\item les clés disponibles sont : |
| 225 |
\begin{itemize} |
| 226 |
\item \MontreCode{EspNiv} := espace horizontal entre les niveaux (\MontreCode{2.25} par défaut) ; |
| 227 |
\item \MontreCode{EspFeuil} := espace vertical entre les éléments du dernier niveau (\MontreCode{1} par défaut) ; |
| 228 |
\item \MontreCode{Evts} := nom des évènements Succès/Échec (\MontreCode{\$S\$/\$E\$} par défaut) ; |
| 229 |
\item \MontreCode{Probas} := probabilités (\MontreCode{\$p\$/\$1-p\$} par défaut) ; |
| 230 |
\item \MontreCode{AffProbas} := booléen pour afficher les probabilités (\MontreCode{true} par défaut) ; |
| 231 |
\item \MontreCode{Racine} := nom qui apparaît pour la racine(\MontreCode{\$\textbackslash Omega\$} par défaut, ou \MontreCode{false} pour désactiver) ; |
| 232 |
\item \MontreCode{Aide} := booléen pour afficher les noms des nœuds créés (\MontreCode{false} par défaut) ; |
| 233 |
\item \MontreCode{Notice} := booléen pour afficher les valeurs prises par la v.a. (\MontreCode{false} par défaut) ; |
| 234 |
\item \MontreCode{Var} := nom de la v.a. pour la notice (\MontreCode{X} par défaut) ; |
| 235 |
\item \MontreCode{N} := paramètre $n$ du schéma de Bernoulli (\MontreCode{3} par défaut). |
| 236 |
%\item \MontreCode{Indice} := booléen (expérimental !!) pour forcer l'affichage de l'indice du niveau pour les succès/échecs, au quel cas les évènements doivent utiliser \MontreCode{\_i} (mais pas dans un \MontreCode{\textbackslash overline}\ldots) ! (\MontreCode{false} par défaut). |
| 237 |
\end{itemize} |
| 238 |
\end{itemize} |
| 239 |
|
| 240 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 241 |
\begin{tikzpicture} |
| 242 |
\tkzSchemBernoulli |
| 243 |
\end{tikzpicture} |
| 244 |
\end{demohigh} |
| 245 |
|
| 246 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 247 |
%les nœuds sont nommés sous la forme (B<niveau>-<numéro>) |
| 248 |
\begin{tikzpicture} |
| 249 |
\tkzSchemBernoulli[Aide,Notice,AffProbas=false,EspNiv=3.25,EspFeuil=0.75,N=4] |
| 250 |
\end{tikzpicture} |
| 251 |
\end{demohigh} |
| 252 |
|
| 253 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 254 |
%\usepackage{nicefrac} |
| 255 |
\begin{tikzpicture} |
| 256 |
\tkzSchemBernoulli[% |
| 257 |
Evts={$A$/$\overline{A}$},% |
| 258 |
EspFeuil=0.75,% |
| 259 |
Probas={$\nicefrac{1}{6}$/$\nicefrac{5}{6}$}] |
| 260 |
\end{tikzpicture} |
| 261 |
\end{demohigh} |
| 262 |
|
| 263 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 264 |
%en utilisant des indices, dépendant du niveau \i |
| 265 |
\begin{tikzpicture} |
| 266 |
\tkzSchemBernoulli[Evts={$S_{\i}$/$\overline{S_{\i}}$}] |
| 267 |
\end{tikzpicture} |
| 268 |
\end{demohigh} |
| 269 |
|
| 270 |
\subsection{Commande autonome} |
| 271 |
|
| 272 |
La commande dédiée pour insertion autonome est \MontreCode{\textbackslash tkzSchemBernoulli*} : |
| 273 |
|
| 274 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 275 |
%commande autonome |
| 276 |
\tkzSchemBernoulli*[clés]<options tikz> |
| 277 |
\end{codehigh} |
| 278 |
|
| 279 |
Concernant cette commande : |
| 280 |
|
| 281 |
\begin{itemize} |
| 282 |
\item l'environnement \textsf{tikzpicture} est automatiquement créé ; |
| 283 |
\item les \textsf{clés} sont les mêmes que pour la commande non étoilée ; |
| 284 |
\item des \MontreCode{<options tikz>}, optionnels, peuvent être passées à l'environnement \textsf{tikzpicture}. |
| 285 |
\end{itemize} |
| 286 |
|
| 287 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 288 |
\tkzSchemBernoulli* |
| 289 |
\end{demohigh} |
| 290 |
|
| 291 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 292 |
\tkzSchemBernoulli*[Notice,AffProbas=false,EspNiv=3.25,EspFeuil=0.75,N=4,Aide] |
| 293 |
\end{demohigh} |
| 294 |
|
| 295 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 296 |
%\usepackage{nicefrac} |
| 297 |
\tkzSchemBernoulli*[% |
| 298 |
N=6,EspFeuil=0.35,Notice,% |
| 299 |
Probas={$\nicefrac{1}{6}$/$\nicefrac{5}{6}$}] |
| 300 |
<scale=0.75,every node/.style={scale=0.5}> |
| 301 |
\end{demohigh} |
| 302 |
|
| 303 |
\pagebreak |
| 304 |
|
| 305 |
\subsection{Mofication avancée des styles} |
| 306 |
|
| 307 |
Les \textsf{clés} relatives aux commandes précédentes permettent de modifier l'aspect \textit{global} de l'arbre, mais les styles particuliers des éléments peuvent également être modifiés, comme indiqué au début de cette documentation. |
| 308 |
|
| 309 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 310 |
\tikzstyle{BernBranche} = [thick,red,->] |
| 311 |
\tikzstyle{BernRacine} = [] |
| 312 |
\tikzstyle{BernNoeudS} = [draw,rectangle,inner sep=1.5pt] |
| 313 |
\tikzstyle{BernNoeudE} = [draw,rectangle,inner sep=1.5pt] |
| 314 |
\tikzstyle{BernProbaS} = [text=teal,midway,fill=cyan!5,inner sep=1.5pt] |
| 315 |
\tikzstyle{BernProbaE} = [text=orange,midway,fill=purple!5,inner sep=1.5pt] |
| 316 |
\tkzSchemBernoulli* |
| 317 |
\end{demohigh} |
| 318 |
|
| 319 |
\subsection{La commande pour une épreuve de Bernoulli} |
| 320 |
|
| 321 |
Il existe une commande, \MontreCode{\textbackslash tkzEpreuvBernoulli}, pour afficher un arbre \textit{simple}, avec le même fonctionnement que les arbres \textit{complets}. |
| 322 |
|
| 323 |
Certaines clés n'ont pas d'effet, donc il n'y aura pas de d'explications dédiées pour cette commande. |
| 324 |
|
| 325 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 326 |
%commande dans un environnement tikzpicture |
| 327 |
\begin{tikzpicture} |
| 328 |
\tkzEpreuvBernoulli[clés] |
| 329 |
\end{tikzpicture} |
| 330 |
\end{codehigh} |
| 331 |
|
| 332 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 333 |
\begin{tikzpicture} |
| 334 |
\tkzEpreuvBernoulli |
| 335 |
\end{tikzpicture} |
| 336 |
~~ |
| 337 |
\begin{tikzpicture} |
| 338 |
\tkzEpreuvBernoulli[Racine=false] |
| 339 |
\end{tikzpicture} |
| 340 |
\end{demohigh} |
| 341 |
|
| 342 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 343 |
%commande autonome |
| 344 |
\tkzEpreuvBernoulli*[clés] |
| 345 |
\end{codehigh} |
| 346 |
|
| 347 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 348 |
\tkzEpreuvBernoulli*[Probas={$p$/$q$}] |
| 349 |
~~ |
| 350 |
\tkzEpreuvBernoulli* |
| 351 |
\end{demohigh} |
| 352 |
|
| 353 |
\pagebreak |
| 354 |
|
| 355 |
\section{English commands} |
| 356 |
|
| 357 |
\subsection{Introduction} |
| 358 |
|
| 359 |
There's also english versions of the commands and keys : |
| 360 |
|
| 361 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 362 |
%command in an environment tikzpicture |
| 363 |
\begin{tikzpicture} |
| 364 |
\tkzBernoulliTree[keys] |
| 365 |
\end{tikzpicture} |
| 366 |
\end{codehigh} |
| 367 |
|
| 368 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 369 |
%stand-alone command |
| 370 |
\tkzBernoulliTree*[keys]<tikz options> |
| 371 |
\end{codehigh} |
| 372 |
|
| 373 |
Default styles are given by : |
| 374 |
|
| 375 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 376 |
%style for edges |
| 377 |
\tikzstyle{BernEdge} = [semithick] |
| 378 |
|
| 379 |
%style for root (if displayed) |
| 380 |
\tikzstyle{BernRoot} = [inner sep=2pt] |
| 381 |
|
| 382 |
%styles for nodes Success/Failure |
| 383 |
\tikzstyle{BernNodeS} = [inner sep=2pt] |
| 384 |
\tikzstyle{BernNodeF} = [inner sep=2pt] |
| 385 |
|
| 386 |
%styles for probas Success/Failure |
| 387 |
\tikzstyle{BernProbS} = [fill=white,midway,font=\footnotesize,inner sep=2pt] |
| 388 |
\tikzstyle{BernProbF} = [fill=white,midway,font=\footnotesize,inner sep=2pt] |
| 389 |
|
| 390 |
%style for values taken by X |
| 391 |
\tikzstyle{BernGuide} = [inner sep=2pt,text=teal,right=1em] |
| 392 |
\end{codehigh} |
| 393 |
|
| 394 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 395 |
%command to restore default styles |
| 396 |
\tkzBernTreeStyleDefault |
| 397 |
\end{codehigh} |
| 398 |
|
| 399 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 400 |
%command in an environment tikzpicture for a single Bernoulli trial |
| 401 |
\begin{tikzpicture} |
| 402 |
tkzBernoulliTrial[keys] |
| 403 |
\end{tikzpicture} |
| 404 |
\end{codehigh} |
| 405 |
|
| 406 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 407 |
\begin{tikzpicture} |
| 408 |
\tkzBernoulliTrial |
| 409 |
\end{tikzpicture} |
| 410 |
~~ |
| 411 |
\begin{tikzpicture} |
| 412 |
\tkzBernoulliTrial[Root=false] |
| 413 |
\end{tikzpicture} |
| 414 |
\end{demohigh} |
| 415 |
|
| 416 |
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 417 |
%stand-alone command for a single Bernoulli trial |
| 418 |
\tkzBernoulliTrial*[keys] |
| 419 |
\end{codehigh} |
| 420 |
|
| 421 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 422 |
\tkzBernoulliTrial*[Probs={$p$/$q$}] |
| 423 |
~~ |
| 424 |
\tkzBernoulliTrial* |
| 425 |
\end{demohigh} |
| 426 |
|
| 427 |
\subsection{Examples} |
| 428 |
|
| 429 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 430 |
\begin{tikzpicture} |
| 431 |
\tkzBernoulliTree |
| 432 |
\end{tikzpicture} |
| 433 |
\end{demohigh} |
| 434 |
|
| 435 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 436 |
\tkzBernoulliTree*[Help,ShowProbs=false,LevelSep=3.25,NodeSep=0.75,N=4,Guide,Var=Z] |
| 437 |
\end{demohigh} |
| 438 |
|
| 439 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 440 |
%\usepackage{nicefrac} |
| 441 |
\tikzstyle{BernEdge} = [thick,red,->] |
| 442 |
\tikzstyle{BernRoot} = [] |
| 443 |
\tikzstyle{BernNodeS} = [draw,rectangle,fill=yellow,inner sep=1.5pt] |
| 444 |
\tikzstyle{BernNodeF} = [draw,rectangle,fill=orange,inner sep=1.5pt] |
| 445 |
\tikzstyle{BernProbS} = [text=teal,midway,fill=cyan!5,inner sep=1.5pt] |
| 446 |
\tikzstyle{BernProbF} = [text=orange,midway,fill=purple!5,inner sep=1.5pt] |
| 447 |
\tikzstyle{BernGuide} = [draw,rectangle,inner sep=2pt,text=green,right=2em] |
| 448 |
\tkzBernoulliTree*[% |
| 449 |
Events={$A$/$\overline{A}$},% |
| 450 |
NodeSep=0.75,Guide,% |
| 451 |
Probs={$\nicefrac{1}{6}$/$\nicefrac{5}{6}$}] |
| 452 |
\end{demohigh} |
| 453 |
|
| 454 |
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10] |
| 455 |
%with index for the levels \i |
| 456 |
\begin{tikzpicture} |
| 457 |
\tkzBernoulliTree[Events={$S_{\i}$/$\overline{S_{\i}}$}] |
| 458 |
\end{tikzpicture} |
| 459 |
\end{demohigh} |
| 460 |
|
| 461 |
\pagebreak |
| 462 |
|
| 463 |
\section{Historique} |
| 464 |
|
| 465 |
{\small \texttt{v0.1.3 : }Correction de la documentation} |
| 466 |
|
| 467 |
{\small \texttt{v0.1.1 : }Commande pour une épreuve de Bernoulli} |
| 468 |
|
| 469 |
{\small \texttt{v0.1.0 : }Version initiale} |
| 470 |
\end{document} |