SPB Git

Repository Public MIT Research preview

S11-F02-arbre-chemins.tex 2.3 KB 32 lines latex

1% S11-F02 — L'arbre des fichiers du laboratoire et le bac à sable.2% Idée : un chemin est un trajet dans un arbre. Le bac à sable est UN sous-arbre ; « .. » permet3% d'en sortir, d'où l'intérêt de savoir où l'on est (pwd) avant d'agir.4% L'arbre, sa disposition et les comptes viennent de l'état du simulateur (S11-F02-donnees.tex).5\input{S11-F02-donnees.tex}%6\begin{tikzpicture}[x=1mm, y=1mm]7  \tikzset{s11 dossier/.style={atlas block, font=\ttfamily\AtlasSizeTiny, inner xsep=3.2pt, inner ysep=2.6pt, anchor=west},8           s11 fichier/.style={atlas label, font=\ttfamily\AtlasSizeTiny, anchor=west, inner xsep=2pt}}9  \newcommand{\AtlasFigArbreDossier}[4]{\node[s11 dossier] (#1) at (#3,#4) {#2};}10  \newcommand{\AtlasFigArbreBac}[4]{\node[s11 dossier, draw=atlasFlow, line width=1.4pt] (#1) at (#3,#4) {#2};}11  \newcommand{\AtlasFigArbreFichier}[4]{\node[s11 fichier] (#1) at (#3,#4) {#2};}12  \newcommand{\AtlasFigArbreLien}[2]{\draw[atlas link] (#1.east) -- ++(2.2,0) |- (#2.west);}13  % Le bac à sable : un sous-arbre, entouré d'une frontière14  \draw[atlas boundary, rounded corners=4pt] (51,\AtlasFigArbreBacBas-4.6) rectangle (141,\AtlasFigArbreBacHaut+5.2);15  \node[atlas tag=atlasHazard, anchor=west] at (56,\AtlasFigArbreBacHaut+5.2)16    {BAC À SABLE : \AtlasFigArbreDossiersBac\ dossiers, \AtlasFigArbreFichiersBac\ fichiers, rien d'autre};17  \AtlasFigArbreNoeuds18  \AtlasFigArbreLiens19  % Repères20  \node[atlas note, text=atlasFlow, anchor=north west] at (53.5,\AtlasFigArbreBacBas+13.2) {vous êtes ici (\texttt{pwd})};21  \draw[atlas arrow, line width=.9pt] (58,\AtlasFigArbreBacBas+13.4) -- (\AtlasFigArbreBacNoeud.south -| 58,0);22  \node[atlas note, anchor=west] at (103,8) {hors du bac : on n'y touche pas};23  \node[atlas note, anchor=north west, text width=47mm] at (0,49.5)24    {\textbf{Chemin absolu} : part de la racine \texttt{/}\\[.4mm]25     {\ttfamily\color{atlasFg}/home/camille/atelier/\\ \ \ notes/mardi.txt}};26  \node[atlas note, anchor=north west, text width=47mm] at (0,35)27    {\textbf{Chemin relatif} : part d'où l'on est\\[.4mm]28     {\ttfamily\color{atlasFg}\AtlasFigArbreRelatif}};29  \node[atlas note, anchor=south west, text width=49mm] at (0,-.5)30    {\texttt{..} remonte d'un cran : \texttt{\color{atlasHazard}../documents} sort du bac};31\end{tikzpicture}32
Files main
Menu

Theme