Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 3

13 Aug '18, 09:54

Questionmark's gravatar image

Questionmark
1212

File - Tree Darstellung in einer Tabelle

Wie kann ich eine FILE Struktur in einer Tabelle darstellen/anzeigen. Anbei ein Code (Netzfund) den ich teilweise adaptiert habe. Dieser Code zeigt eine File Tree Struktur. Jetzt zu meiner Frage kann ich diese Struktur in meiner Tabelle (siehe unten) anzeigen lassen? Zb: in der Spalte 1? Vollständiges Minimalbeispiel: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \tikzstyle{every node}=[draw=black,thick,anchor=west] \tikzstyle{selected}=[draw=red,fill=red!30] \tikzstyle{optional}=[dashed,fill=gray!50] \begin{tikzpicture}[% grow via three points={one child at (0.5,-0.7) and two children at (0.5,-0.7) and (0.5,-1.4)}, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] \node {texmf} child { node {S1*1}} child { node {S2*3}} child { node {S2*3}} child { node [selected] {S*ALL} child { node [optional] {latex}} child { node {plain}} } child [missing] {} child [missing] {} child [missing] {} child { node {S END}}; \end{tikzpicture} \end{document} Anbei meine Tabelle (kein Standalone Code - sorry) \begin{longtable}{@{\extracolsep{\fill}}|C{3.2cm}|L{4.5cm}|L{8cm}|} \caption{} \\ \hline \textbf{a} & \textbf{a a a} & \textbf{a a a} \\ \hline \addlinespace[1pt] \hline \endfirsthead \multicolumn{3}{c}{(a of a)} \\ \hline \textbf{a a} & \textbf{a a a} & \textbf{a a a} \\ \hline \addlinespace[1pt] \hline \endhead \multicolumn{3}{c}{(To be continued)} \endfoot \endlastfoot 01a & 01\_gws (a) & \\ \hline 02a & 02\_aws (a) & \\ \hline aa & 14a & \\\cline{2-3} & v & \\ \hline ... &... & ...\\ \hline \end{longtable} UPDATE: Anbei mein lauffähiges Beispiel! Leider werden keine hlines bzw | Striche dargestellt. Kann ich weiters das "aaa" nicht mittig sondern nach oben oben-linksbündig positionieren? \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \usepackage{longtable} %Large tables (longtable) \usepackage{tikz,booktabs} \usepackage{tabularx} \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcommand{\ltab}{\raggedright\arraybackslash} % Tabellenabschnitt linksbündig \newcommand{\ctab}{\centering\arraybackslash} % Tabellenabschnitt zentriert \newcommand{\rtab}{\raggedleft\arraybackslash} % Tabellenabschnitt rechtsbündig %\renewcommand*{\footfont}{\normalfont} %\renewcommand*{\headfont}{\normalfont} \begin{document} \tikzstyle{every node}=[draw=black,thick,anchor=west] \tikzstyle{selected}=[draw=red,fill=red!30] \tikzstyle{optional}=[dashed,fill=gray!50] \begin{longtable}{@{\extracolsep{\fill}}|C{3.2cm}|L{4.5cm}|L{8cm}|} \caption{} \\ \hline %\textbf{a} & \textbf{a a a} & \textbf{a a a} \\ <- ursprüngliche Zeile %Einfügen in der 1 Zeile/ 1 Spalte diesen File-Tree % % % % % % % % % % % % % % % % % % % % % % % % % % % \begin{tikzpicture}[% grow via three points={one child at (0.5,-0.7) and two children at (0.5,-0.7) and (0.5,-1.4)}, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] \node {texmf} child { node {S1*1}} child { node {S2*3}} child { node {S2*3}} child { node [selected] {S*ALL} child { node [optional] {latex}} child { node {plain}} } child [missing] {} child [missing] {} child [missing] {} child { node {S END}}; \end{tikzpicture} & \textbf{a a a} & \textbf{a a a} \\ % % %ENDE % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % \hline \addlinespace[1pt] \hline \endfirsthead \multicolumn{3}{c}{(a of a)} \\ \hline \textbf{a a} & \textbf{a a a} & \textbf{a a a} \\ \hline \addlinespace[1pt] \hline \endhead \multicolumn{3}{c}{(To be continued)} \endfoot \endlastfoot 01a & 01\_gws (a) & \\ \hline 02a & 02\_aws (a) & \\ \hline aa & 14a & \\\cline{2-3} & v & \\ \hline ... &... & ...\\ \hline \end{longtable} \end{document} [![alt text][1]][1] [1]: https://texwelt.de/wissen/upfiles/aaa.PNG
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

13 Aug '18, 09:45

Questionmark's gravatar image

Questionmark
1212

File - Tree Darstellung in einer Tabelle

Wie kann ich eine FILE Struktur in einer Tabelle darstellen/anzeigen. Anbei ein Code (Netzfund) den ich teilweise adaptiert habe. Dieser Code zeigt eine File Tree Struktur. Jetzt zu meiner Frage kann ich diese Struktur in meiner Tabelle (siehe unten) anzeigen lassen? Zb: in der Spalte 1? Vollständiges Minimalbeispiel: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \tikzstyle{every node}=[draw=black,thick,anchor=west] \tikzstyle{selected}=[draw=red,fill=red!30] \tikzstyle{optional}=[dashed,fill=gray!50] \begin{tikzpicture}[% grow via three points={one child at (0.5,-0.7) and two children at (0.5,-0.7) and (0.5,-1.4)}, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] \node {texmf} child { node {S1*1}} child { node {S2*3}} child { node {S2*3}} child { node [selected] {S*ALL} child { node [optional] {latex}} child { node {plain}} } child [missing] {} child [missing] {} child [missing] {} child { node {S END}}; \end{tikzpicture} \end{document} Anbei meine Tabelle (kein Standalone Code - sorry) \begin{longtable}{@{\extracolsep{\fill}}|C{3.2cm}|L{4.5cm}|L{8cm}|} \caption{} \\ \hline \textbf{a} & \textbf{a a a} & \textbf{a a a} \\ \hline \addlinespace[1pt] \hline \endfirsthead \multicolumn{3}{c}{(a of a)} \\ \hline \textbf{a a} & \textbf{a a a} & \textbf{a a a} \\ \hline \addlinespace[1pt] \hline \endhead \multicolumn{3}{c}{(To be continued)} \endfoot \endlastfoot 01a & 01\_gws (a) & \\ \hline 02a & 02\_aws (a) & \\ \hline aa & 14a & \\\cline{2-3} & v & \\ \hline ... &... & ...\\ \hline \end{longtable}\end{longtable} UPDATE: Anbei mein lauffähiges Beispiel! Leider werden keine hlines bzw | Striche dargestellt. Kann ich weiters das "aaa" nicht mittig sondern nach oben positionieren? \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \usepackage{longtable} %Large tables (longtable) \usepackage{tikz,booktabs} \usepackage{tabularx} \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \newcommand{\ltab}{\raggedright\arraybackslash} % Tabellenabschnitt linksbündig \newcommand{\ctab}{\centering\arraybackslash} % Tabellenabschnitt zentriert \newcommand{\rtab}{\raggedleft\arraybackslash} % Tabellenabschnitt rechtsbündig %\renewcommand*{\footfont}{\normalfont} %\renewcommand*{\headfont}{\normalfont} \begin{document} \tikzstyle{every node}=[draw=black,thick,anchor=west] \tikzstyle{selected}=[draw=red,fill=red!30] \tikzstyle{optional}=[dashed,fill=gray!50] \begin{longtable}{@{\extracolsep{\fill}}|C{3.2cm}|L{4.5cm}|L{8cm}|} \caption{} \\ \hline %\textbf{a} & \textbf{a a a} & \textbf{a a a} \\ <- ursprüngliche Zeile %Einfügen in der 1 Zeile/ 1 Spalte diesen File-Tree % % % % % % % % % % % % % % % % % % % % % % % % % % % \begin{tikzpicture}[% grow via three points={one child at (0.5,-0.7) and two children at (0.5,-0.7) and (0.5,-1.4)}, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] \node {texmf} child { node {S1*1}} child { node {S2*3}} child { node {S2*3}} child { node [selected] {S*ALL} child { node [optional] {latex}} child { node {plain}} } child [missing] {} child [missing] {} child [missing] {} child { node {S END}}; \end{tikzpicture} & \textbf{a a a} & \textbf{a a a} \\ % % %ENDE % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % \hline \addlinespace[1pt] \hline \endfirsthead \multicolumn{3}{c}{(a of a)} \\ \hline \textbf{a a} & \textbf{a a a} & \textbf{a a a} \\ \hline \addlinespace[1pt] \hline \endhead \multicolumn{3}{c}{(To be continued)} \endfoot \endlastfoot 01a & 01\_gws (a) & \\ \hline 02a & 02\_aws (a) & \\ \hline aa & 14a & \\\cline{2-3} & v & \\ \hline ... &... & ...\\ \hline \end{longtable} \end{document} [![alt text][1]][1] [1]: https://texwelt.de/wissen/upfiles/aaa.PNG
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

10 Aug '18, 13:32

Questionmark's gravatar image

Questionmark
1212