Create multiple path style from parent to children in a TikZtree












2















I now how to create a diagram like this:





After that, I succeed in creating the path from the root to its children so it looks like this:





Now, I'm trying to make it look like this:





I created this code:



documentclass[utf8]{article}
usepackage{tikz}
usetikzlibrary{arrows,shapes,positioning,shadows,trees}

tikzset{
basic/.style = {draw, text width=15em, drop shadow, rectangle},
root/.style = {basic, rounded corners=2pt, thin, align=center,
fill=green!30},
level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
text width=8em},
level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
}

begin{document}
begin{tikzpicture}[
every node/.style={anchor=center, align=center},
level 1/.style={sibling distance=12em},
edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
edge from parent/.style={->,draw},
>=latex]

% root of the the initial tree, level 1
node[root] {Drawing diagrams}
% The first level, as children of the initial tree
child {node[level 2] (c1) {Defining node and arrow styles}}
child {node[level 2] (c2) {Positioning the nodes}}
child {node[level 2] (c3) {Drawing arrows between nodes}};

% The second level, relatively positioned nodes
begin{scope}[every node/.style={level 3}]
node [below of = c1, xshift=15pt] (c11) {Setting shape};
node [below of = c11] (c12) {Choosing color};
node [below of = c12] (c13) {Adding shading};

node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
node [below of = c21] (c22) {Relatively};
node [below of = c22] (c23) {Absolutely};
node [below of = c23] (c24) {Using overlays};

node [below of = c3, xshift=15pt] (c31) {Default arrows};
node [below of = c31] (c32) {Arrow library};
node [below of = c32] (c33) {Resizing tips};
node [below of = c33] (c34) {Shortening};
node [below of = c34] (c35) {Bending};
end{scope}

% lines from each level 1 node to every one of its "children"
foreach value in {1,2,3}
draw[->] (c1.west) -| (-1em,0em) |- (c1value.west);

foreach value in {1,...,4}
draw[->] (c2.west) -| (-1em,0em) |- (c2value.west);

foreach value in {1,...,5}
draw[->] (c3.west) -| (-1em,0em) |- (c3value.west);
end{tikzpicture}
end{document}


But it just create this mess:





Where did it went wrong?










share|improve this question



























    2















    I now how to create a diagram like this:





    After that, I succeed in creating the path from the root to its children so it looks like this:





    Now, I'm trying to make it look like this:





    I created this code:



    documentclass[utf8]{article}
    usepackage{tikz}
    usetikzlibrary{arrows,shapes,positioning,shadows,trees}

    tikzset{
    basic/.style = {draw, text width=15em, drop shadow, rectangle},
    root/.style = {basic, rounded corners=2pt, thin, align=center,
    fill=green!30},
    level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
    text width=8em},
    level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
    }

    begin{document}
    begin{tikzpicture}[
    every node/.style={anchor=center, align=center},
    level 1/.style={sibling distance=12em},
    edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
    edge from parent/.style={->,draw},
    >=latex]

    % root of the the initial tree, level 1
    node[root] {Drawing diagrams}
    % The first level, as children of the initial tree
    child {node[level 2] (c1) {Defining node and arrow styles}}
    child {node[level 2] (c2) {Positioning the nodes}}
    child {node[level 2] (c3) {Drawing arrows between nodes}};

    % The second level, relatively positioned nodes
    begin{scope}[every node/.style={level 3}]
    node [below of = c1, xshift=15pt] (c11) {Setting shape};
    node [below of = c11] (c12) {Choosing color};
    node [below of = c12] (c13) {Adding shading};

    node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
    node [below of = c21] (c22) {Relatively};
    node [below of = c22] (c23) {Absolutely};
    node [below of = c23] (c24) {Using overlays};

    node [below of = c3, xshift=15pt] (c31) {Default arrows};
    node [below of = c31] (c32) {Arrow library};
    node [below of = c32] (c33) {Resizing tips};
    node [below of = c33] (c34) {Shortening};
    node [below of = c34] (c35) {Bending};
    end{scope}

    % lines from each level 1 node to every one of its "children"
    foreach value in {1,2,3}
    draw[->] (c1.west) -| (-1em,0em) |- (c1value.west);

    foreach value in {1,...,4}
    draw[->] (c2.west) -| (-1em,0em) |- (c2value.west);

    foreach value in {1,...,5}
    draw[->] (c3.west) -| (-1em,0em) |- (c3value.west);
    end{tikzpicture}
    end{document}


    But it just create this mess:





    Where did it went wrong?










    share|improve this question

























      2












      2








      2


      1






      I now how to create a diagram like this:





      After that, I succeed in creating the path from the root to its children so it looks like this:





      Now, I'm trying to make it look like this:





      I created this code:



      documentclass[utf8]{article}
      usepackage{tikz}
      usetikzlibrary{arrows,shapes,positioning,shadows,trees}

      tikzset{
      basic/.style = {draw, text width=15em, drop shadow, rectangle},
      root/.style = {basic, rounded corners=2pt, thin, align=center,
      fill=green!30},
      level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
      text width=8em},
      level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
      }

      begin{document}
      begin{tikzpicture}[
      every node/.style={anchor=center, align=center},
      level 1/.style={sibling distance=12em},
      edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
      edge from parent/.style={->,draw},
      >=latex]

      % root of the the initial tree, level 1
      node[root] {Drawing diagrams}
      % The first level, as children of the initial tree
      child {node[level 2] (c1) {Defining node and arrow styles}}
      child {node[level 2] (c2) {Positioning the nodes}}
      child {node[level 2] (c3) {Drawing arrows between nodes}};

      % The second level, relatively positioned nodes
      begin{scope}[every node/.style={level 3}]
      node [below of = c1, xshift=15pt] (c11) {Setting shape};
      node [below of = c11] (c12) {Choosing color};
      node [below of = c12] (c13) {Adding shading};

      node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
      node [below of = c21] (c22) {Relatively};
      node [below of = c22] (c23) {Absolutely};
      node [below of = c23] (c24) {Using overlays};

      node [below of = c3, xshift=15pt] (c31) {Default arrows};
      node [below of = c31] (c32) {Arrow library};
      node [below of = c32] (c33) {Resizing tips};
      node [below of = c33] (c34) {Shortening};
      node [below of = c34] (c35) {Bending};
      end{scope}

      % lines from each level 1 node to every one of its "children"
      foreach value in {1,2,3}
      draw[->] (c1.west) -| (-1em,0em) |- (c1value.west);

      foreach value in {1,...,4}
      draw[->] (c2.west) -| (-1em,0em) |- (c2value.west);

      foreach value in {1,...,5}
      draw[->] (c3.west) -| (-1em,0em) |- (c3value.west);
      end{tikzpicture}
      end{document}


      But it just create this mess:





      Where did it went wrong?










      share|improve this question














      I now how to create a diagram like this:





      After that, I succeed in creating the path from the root to its children so it looks like this:





      Now, I'm trying to make it look like this:





      I created this code:



      documentclass[utf8]{article}
      usepackage{tikz}
      usetikzlibrary{arrows,shapes,positioning,shadows,trees}

      tikzset{
      basic/.style = {draw, text width=15em, drop shadow, rectangle},
      root/.style = {basic, rounded corners=2pt, thin, align=center,
      fill=green!30},
      level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
      text width=8em},
      level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
      }

      begin{document}
      begin{tikzpicture}[
      every node/.style={anchor=center, align=center},
      level 1/.style={sibling distance=12em},
      edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
      edge from parent/.style={->,draw},
      >=latex]

      % root of the the initial tree, level 1
      node[root] {Drawing diagrams}
      % The first level, as children of the initial tree
      child {node[level 2] (c1) {Defining node and arrow styles}}
      child {node[level 2] (c2) {Positioning the nodes}}
      child {node[level 2] (c3) {Drawing arrows between nodes}};

      % The second level, relatively positioned nodes
      begin{scope}[every node/.style={level 3}]
      node [below of = c1, xshift=15pt] (c11) {Setting shape};
      node [below of = c11] (c12) {Choosing color};
      node [below of = c12] (c13) {Adding shading};

      node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
      node [below of = c21] (c22) {Relatively};
      node [below of = c22] (c23) {Absolutely};
      node [below of = c23] (c24) {Using overlays};

      node [below of = c3, xshift=15pt] (c31) {Default arrows};
      node [below of = c31] (c32) {Arrow library};
      node [below of = c32] (c33) {Resizing tips};
      node [below of = c33] (c34) {Shortening};
      node [below of = c34] (c35) {Bending};
      end{scope}

      % lines from each level 1 node to every one of its "children"
      foreach value in {1,2,3}
      draw[->] (c1.west) -| (-1em,0em) |- (c1value.west);

      foreach value in {1,...,4}
      draw[->] (c2.west) -| (-1em,0em) |- (c2value.west);

      foreach value in {1,...,5}
      draw[->] (c3.west) -| (-1em,0em) |- (c3value.west);
      end{tikzpicture}
      end{document}


      But it just create this mess:





      Where did it went wrong?







      tikz-trees






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 6 at 19:57









      Vinccool96Vinccool96

      1329




      1329






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You were almost there: just add 3 times ++ in the last three draw commands.



          documentclass[utf8]{article}
          usepackage{tikz}
          usetikzlibrary{arrows,shapes,positioning,shadows,trees}

          tikzset{
          basic/.style = {draw, text width=15em, drop shadow, rectangle},
          root/.style = {basic, rounded corners=2pt, thin, align=center,
          fill=green!30},
          level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
          text width=8em},
          level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
          }

          begin{document}
          begin{tikzpicture}[
          every node/.style={anchor=center, align=center},
          level 1/.style={sibling distance=12em},
          edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
          edge from parent/.style={->,draw},
          >=latex]

          % root of the the initial tree, level 1
          node[root] {Drawing diagrams}
          % The first level, as children of the initial tree
          child {node[level 2] (c1) {Defining node and arrow styles}}
          child {node[level 2] (c2) {Positioning the nodes}}
          child {node[level 2] (c3) {Drawing arrows between nodes}};

          % The second level, relatively positioned nodes
          begin{scope}[every node/.style={level 3}]
          node [below of = c1, xshift=15pt] (c11) {Setting shape};
          node [below of = c11] (c12) {Choosing color};
          node [below of = c12] (c13) {Adding shading};

          node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
          node [below of = c21] (c22) {Relatively};
          node [below of = c22] (c23) {Absolutely};
          node [below of = c23] (c24) {Using overlays};

          node [below of = c3, xshift=15pt] (c31) {Default arrows};
          node [below of = c31] (c32) {Arrow library};
          node [below of = c32] (c33) {Resizing tips};
          node [below of = c33] (c34) {Shortening};
          node [below of = c34] (c35) {Bending};
          end{scope}

          % lines from each level 1 node to every one of its "children"
          foreach value in {1,2,3}
          draw[->] (c1.west) -| ++(-1em,0em) |- (c1value.west);

          foreach value in {1,...,4}
          draw[->] (c2.west) -| ++(-1em,0em) |- (c2value.west);

          foreach value in {1,...,5}
          draw[->] (c3.west) -| ++(-1em,0em) |- (c3value.west);
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer



















          • 1





            It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

            – Vinccool96
            Mar 6 at 20:03



















          2














          Like this?



          documentclass[utf8]{article}
          usepackage{tikz}
          usetikzlibrary{arrows,shapes,positioning,shadows,trees}

          tikzset{
          basic/.style = {draw, text width=15em, drop shadow, rectangle},
          root/.style = {basic, rounded corners=2pt, thin, align=center,
          fill=green!30},
          level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
          text width=8em},
          level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
          }

          begin{document}
          begin{tikzpicture}[
          every node/.style={anchor=center, align=center},
          level 1/.style={sibling distance=12em},
          edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
          edge from parent/.style={->,draw},
          >=latex]

          % root of the the initial tree, level 1
          node[root] {Drawing diagrams}
          % The first level, as children of the initial tree
          child {node[level 2] (c1) {Defining node and arrow styles}}
          child {node[level 2] (c2) {Positioning the nodes}}
          child {node[level 2] (c3) {Drawing arrows between nodes}};

          % The second level, relatively positioned nodes
          begin{scope}[every node/.style={level 3}]
          node [below of = c1, xshift=15pt] (c11) {Setting shape};
          node [below of = c11] (c12) {Choosing color};
          node [below of = c12] (c13) {Adding shading};

          node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
          node [below of = c21] (c22) {Relatively};
          node [below of = c22] (c23) {Absolutely};
          node [below of = c23] (c24) {Using overlays};

          node [below of = c3, xshift=15pt] (c31) {Default arrows};
          node [below of = c31] (c32) {Arrow library};
          node [below of = c32] (c33) {Resizing tips};
          node [below of = c33] (c34) {Shortening};
          node [below of = c34] (c35) {Bending};
          end{scope}

          % lines from each level 1 node to every one of its "children"
          foreach value in {1,2,3}
          draw[->] (c1.west)--([xshift=-5mm]c1.west) |- (c1value.west);

          foreach value in {1,...,4}
          draw[->] (c2.west)--([xshift=-5mm]c2.west) |- (c2value.west);

          foreach value in {1,...,5}
          draw[->] (c3.west)--([xshift=-5mm]c3.west) |- (c3value.west);
          end{tikzpicture}
          end{document}


          screenshot






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "85"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478082%2fcreate-multiple-path-style-from-parent-to-children-in-a-tikztree%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You were almost there: just add 3 times ++ in the last three draw commands.



            documentclass[utf8]{article}
            usepackage{tikz}
            usetikzlibrary{arrows,shapes,positioning,shadows,trees}

            tikzset{
            basic/.style = {draw, text width=15em, drop shadow, rectangle},
            root/.style = {basic, rounded corners=2pt, thin, align=center,
            fill=green!30},
            level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
            text width=8em},
            level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
            }

            begin{document}
            begin{tikzpicture}[
            every node/.style={anchor=center, align=center},
            level 1/.style={sibling distance=12em},
            edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
            edge from parent/.style={->,draw},
            >=latex]

            % root of the the initial tree, level 1
            node[root] {Drawing diagrams}
            % The first level, as children of the initial tree
            child {node[level 2] (c1) {Defining node and arrow styles}}
            child {node[level 2] (c2) {Positioning the nodes}}
            child {node[level 2] (c3) {Drawing arrows between nodes}};

            % The second level, relatively positioned nodes
            begin{scope}[every node/.style={level 3}]
            node [below of = c1, xshift=15pt] (c11) {Setting shape};
            node [below of = c11] (c12) {Choosing color};
            node [below of = c12] (c13) {Adding shading};

            node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
            node [below of = c21] (c22) {Relatively};
            node [below of = c22] (c23) {Absolutely};
            node [below of = c23] (c24) {Using overlays};

            node [below of = c3, xshift=15pt] (c31) {Default arrows};
            node [below of = c31] (c32) {Arrow library};
            node [below of = c32] (c33) {Resizing tips};
            node [below of = c33] (c34) {Shortening};
            node [below of = c34] (c35) {Bending};
            end{scope}

            % lines from each level 1 node to every one of its "children"
            foreach value in {1,2,3}
            draw[->] (c1.west) -| ++(-1em,0em) |- (c1value.west);

            foreach value in {1,...,4}
            draw[->] (c2.west) -| ++(-1em,0em) |- (c2value.west);

            foreach value in {1,...,5}
            draw[->] (c3.west) -| ++(-1em,0em) |- (c3value.west);
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer



















            • 1





              It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

              – Vinccool96
              Mar 6 at 20:03
















            2














            You were almost there: just add 3 times ++ in the last three draw commands.



            documentclass[utf8]{article}
            usepackage{tikz}
            usetikzlibrary{arrows,shapes,positioning,shadows,trees}

            tikzset{
            basic/.style = {draw, text width=15em, drop shadow, rectangle},
            root/.style = {basic, rounded corners=2pt, thin, align=center,
            fill=green!30},
            level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
            text width=8em},
            level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
            }

            begin{document}
            begin{tikzpicture}[
            every node/.style={anchor=center, align=center},
            level 1/.style={sibling distance=12em},
            edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
            edge from parent/.style={->,draw},
            >=latex]

            % root of the the initial tree, level 1
            node[root] {Drawing diagrams}
            % The first level, as children of the initial tree
            child {node[level 2] (c1) {Defining node and arrow styles}}
            child {node[level 2] (c2) {Positioning the nodes}}
            child {node[level 2] (c3) {Drawing arrows between nodes}};

            % The second level, relatively positioned nodes
            begin{scope}[every node/.style={level 3}]
            node [below of = c1, xshift=15pt] (c11) {Setting shape};
            node [below of = c11] (c12) {Choosing color};
            node [below of = c12] (c13) {Adding shading};

            node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
            node [below of = c21] (c22) {Relatively};
            node [below of = c22] (c23) {Absolutely};
            node [below of = c23] (c24) {Using overlays};

            node [below of = c3, xshift=15pt] (c31) {Default arrows};
            node [below of = c31] (c32) {Arrow library};
            node [below of = c32] (c33) {Resizing tips};
            node [below of = c33] (c34) {Shortening};
            node [below of = c34] (c35) {Bending};
            end{scope}

            % lines from each level 1 node to every one of its "children"
            foreach value in {1,2,3}
            draw[->] (c1.west) -| ++(-1em,0em) |- (c1value.west);

            foreach value in {1,...,4}
            draw[->] (c2.west) -| ++(-1em,0em) |- (c2value.west);

            foreach value in {1,...,5}
            draw[->] (c3.west) -| ++(-1em,0em) |- (c3value.west);
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer



















            • 1





              It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

              – Vinccool96
              Mar 6 at 20:03














            2












            2








            2







            You were almost there: just add 3 times ++ in the last three draw commands.



            documentclass[utf8]{article}
            usepackage{tikz}
            usetikzlibrary{arrows,shapes,positioning,shadows,trees}

            tikzset{
            basic/.style = {draw, text width=15em, drop shadow, rectangle},
            root/.style = {basic, rounded corners=2pt, thin, align=center,
            fill=green!30},
            level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
            text width=8em},
            level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
            }

            begin{document}
            begin{tikzpicture}[
            every node/.style={anchor=center, align=center},
            level 1/.style={sibling distance=12em},
            edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
            edge from parent/.style={->,draw},
            >=latex]

            % root of the the initial tree, level 1
            node[root] {Drawing diagrams}
            % The first level, as children of the initial tree
            child {node[level 2] (c1) {Defining node and arrow styles}}
            child {node[level 2] (c2) {Positioning the nodes}}
            child {node[level 2] (c3) {Drawing arrows between nodes}};

            % The second level, relatively positioned nodes
            begin{scope}[every node/.style={level 3}]
            node [below of = c1, xshift=15pt] (c11) {Setting shape};
            node [below of = c11] (c12) {Choosing color};
            node [below of = c12] (c13) {Adding shading};

            node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
            node [below of = c21] (c22) {Relatively};
            node [below of = c22] (c23) {Absolutely};
            node [below of = c23] (c24) {Using overlays};

            node [below of = c3, xshift=15pt] (c31) {Default arrows};
            node [below of = c31] (c32) {Arrow library};
            node [below of = c32] (c33) {Resizing tips};
            node [below of = c33] (c34) {Shortening};
            node [below of = c34] (c35) {Bending};
            end{scope}

            % lines from each level 1 node to every one of its "children"
            foreach value in {1,2,3}
            draw[->] (c1.west) -| ++(-1em,0em) |- (c1value.west);

            foreach value in {1,...,4}
            draw[->] (c2.west) -| ++(-1em,0em) |- (c2value.west);

            foreach value in {1,...,5}
            draw[->] (c3.west) -| ++(-1em,0em) |- (c3value.west);
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer













            You were almost there: just add 3 times ++ in the last three draw commands.



            documentclass[utf8]{article}
            usepackage{tikz}
            usetikzlibrary{arrows,shapes,positioning,shadows,trees}

            tikzset{
            basic/.style = {draw, text width=15em, drop shadow, rectangle},
            root/.style = {basic, rounded corners=2pt, thin, align=center,
            fill=green!30},
            level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
            text width=8em},
            level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
            }

            begin{document}
            begin{tikzpicture}[
            every node/.style={anchor=center, align=center},
            level 1/.style={sibling distance=12em},
            edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
            edge from parent/.style={->,draw},
            >=latex]

            % root of the the initial tree, level 1
            node[root] {Drawing diagrams}
            % The first level, as children of the initial tree
            child {node[level 2] (c1) {Defining node and arrow styles}}
            child {node[level 2] (c2) {Positioning the nodes}}
            child {node[level 2] (c3) {Drawing arrows between nodes}};

            % The second level, relatively positioned nodes
            begin{scope}[every node/.style={level 3}]
            node [below of = c1, xshift=15pt] (c11) {Setting shape};
            node [below of = c11] (c12) {Choosing color};
            node [below of = c12] (c13) {Adding shading};

            node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
            node [below of = c21] (c22) {Relatively};
            node [below of = c22] (c23) {Absolutely};
            node [below of = c23] (c24) {Using overlays};

            node [below of = c3, xshift=15pt] (c31) {Default arrows};
            node [below of = c31] (c32) {Arrow library};
            node [below of = c32] (c33) {Resizing tips};
            node [below of = c33] (c34) {Shortening};
            node [below of = c34] (c35) {Bending};
            end{scope}

            % lines from each level 1 node to every one of its "children"
            foreach value in {1,2,3}
            draw[->] (c1.west) -| ++(-1em,0em) |- (c1value.west);

            foreach value in {1,...,4}
            draw[->] (c2.west) -| ++(-1em,0em) |- (c2value.west);

            foreach value in {1,...,5}
            draw[->] (c3.west) -| ++(-1em,0em) |- (c3value.west);
            end{tikzpicture}
            end{document}


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 6 at 20:01









            marmotmarmot

            108k5132250




            108k5132250








            • 1





              It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

              – Vinccool96
              Mar 6 at 20:03














            • 1





              It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

              – Vinccool96
              Mar 6 at 20:03








            1




            1





            It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

            – Vinccool96
            Mar 6 at 20:03





            It works! Thank you very much. I'll mark your answer when I'll be able to in 10 minutes.

            – Vinccool96
            Mar 6 at 20:03











            2














            Like this?



            documentclass[utf8]{article}
            usepackage{tikz}
            usetikzlibrary{arrows,shapes,positioning,shadows,trees}

            tikzset{
            basic/.style = {draw, text width=15em, drop shadow, rectangle},
            root/.style = {basic, rounded corners=2pt, thin, align=center,
            fill=green!30},
            level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
            text width=8em},
            level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
            }

            begin{document}
            begin{tikzpicture}[
            every node/.style={anchor=center, align=center},
            level 1/.style={sibling distance=12em},
            edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
            edge from parent/.style={->,draw},
            >=latex]

            % root of the the initial tree, level 1
            node[root] {Drawing diagrams}
            % The first level, as children of the initial tree
            child {node[level 2] (c1) {Defining node and arrow styles}}
            child {node[level 2] (c2) {Positioning the nodes}}
            child {node[level 2] (c3) {Drawing arrows between nodes}};

            % The second level, relatively positioned nodes
            begin{scope}[every node/.style={level 3}]
            node [below of = c1, xshift=15pt] (c11) {Setting shape};
            node [below of = c11] (c12) {Choosing color};
            node [below of = c12] (c13) {Adding shading};

            node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
            node [below of = c21] (c22) {Relatively};
            node [below of = c22] (c23) {Absolutely};
            node [below of = c23] (c24) {Using overlays};

            node [below of = c3, xshift=15pt] (c31) {Default arrows};
            node [below of = c31] (c32) {Arrow library};
            node [below of = c32] (c33) {Resizing tips};
            node [below of = c33] (c34) {Shortening};
            node [below of = c34] (c35) {Bending};
            end{scope}

            % lines from each level 1 node to every one of its "children"
            foreach value in {1,2,3}
            draw[->] (c1.west)--([xshift=-5mm]c1.west) |- (c1value.west);

            foreach value in {1,...,4}
            draw[->] (c2.west)--([xshift=-5mm]c2.west) |- (c2value.west);

            foreach value in {1,...,5}
            draw[->] (c3.west)--([xshift=-5mm]c3.west) |- (c3value.west);
            end{tikzpicture}
            end{document}


            screenshot






            share|improve this answer




























              2














              Like this?



              documentclass[utf8]{article}
              usepackage{tikz}
              usetikzlibrary{arrows,shapes,positioning,shadows,trees}

              tikzset{
              basic/.style = {draw, text width=15em, drop shadow, rectangle},
              root/.style = {basic, rounded corners=2pt, thin, align=center,
              fill=green!30},
              level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
              text width=8em},
              level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
              }

              begin{document}
              begin{tikzpicture}[
              every node/.style={anchor=center, align=center},
              level 1/.style={sibling distance=12em},
              edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
              edge from parent/.style={->,draw},
              >=latex]

              % root of the the initial tree, level 1
              node[root] {Drawing diagrams}
              % The first level, as children of the initial tree
              child {node[level 2] (c1) {Defining node and arrow styles}}
              child {node[level 2] (c2) {Positioning the nodes}}
              child {node[level 2] (c3) {Drawing arrows between nodes}};

              % The second level, relatively positioned nodes
              begin{scope}[every node/.style={level 3}]
              node [below of = c1, xshift=15pt] (c11) {Setting shape};
              node [below of = c11] (c12) {Choosing color};
              node [below of = c12] (c13) {Adding shading};

              node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
              node [below of = c21] (c22) {Relatively};
              node [below of = c22] (c23) {Absolutely};
              node [below of = c23] (c24) {Using overlays};

              node [below of = c3, xshift=15pt] (c31) {Default arrows};
              node [below of = c31] (c32) {Arrow library};
              node [below of = c32] (c33) {Resizing tips};
              node [below of = c33] (c34) {Shortening};
              node [below of = c34] (c35) {Bending};
              end{scope}

              % lines from each level 1 node to every one of its "children"
              foreach value in {1,2,3}
              draw[->] (c1.west)--([xshift=-5mm]c1.west) |- (c1value.west);

              foreach value in {1,...,4}
              draw[->] (c2.west)--([xshift=-5mm]c2.west) |- (c2value.west);

              foreach value in {1,...,5}
              draw[->] (c3.west)--([xshift=-5mm]c3.west) |- (c3value.west);
              end{tikzpicture}
              end{document}


              screenshot






              share|improve this answer


























                2












                2








                2







                Like this?



                documentclass[utf8]{article}
                usepackage{tikz}
                usetikzlibrary{arrows,shapes,positioning,shadows,trees}

                tikzset{
                basic/.style = {draw, text width=15em, drop shadow, rectangle},
                root/.style = {basic, rounded corners=2pt, thin, align=center,
                fill=green!30},
                level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
                text width=8em},
                level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
                }

                begin{document}
                begin{tikzpicture}[
                every node/.style={anchor=center, align=center},
                level 1/.style={sibling distance=12em},
                edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
                edge from parent/.style={->,draw},
                >=latex]

                % root of the the initial tree, level 1
                node[root] {Drawing diagrams}
                % The first level, as children of the initial tree
                child {node[level 2] (c1) {Defining node and arrow styles}}
                child {node[level 2] (c2) {Positioning the nodes}}
                child {node[level 2] (c3) {Drawing arrows between nodes}};

                % The second level, relatively positioned nodes
                begin{scope}[every node/.style={level 3}]
                node [below of = c1, xshift=15pt] (c11) {Setting shape};
                node [below of = c11] (c12) {Choosing color};
                node [below of = c12] (c13) {Adding shading};

                node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
                node [below of = c21] (c22) {Relatively};
                node [below of = c22] (c23) {Absolutely};
                node [below of = c23] (c24) {Using overlays};

                node [below of = c3, xshift=15pt] (c31) {Default arrows};
                node [below of = c31] (c32) {Arrow library};
                node [below of = c32] (c33) {Resizing tips};
                node [below of = c33] (c34) {Shortening};
                node [below of = c34] (c35) {Bending};
                end{scope}

                % lines from each level 1 node to every one of its "children"
                foreach value in {1,2,3}
                draw[->] (c1.west)--([xshift=-5mm]c1.west) |- (c1value.west);

                foreach value in {1,...,4}
                draw[->] (c2.west)--([xshift=-5mm]c2.west) |- (c2value.west);

                foreach value in {1,...,5}
                draw[->] (c3.west)--([xshift=-5mm]c3.west) |- (c3value.west);
                end{tikzpicture}
                end{document}


                screenshot






                share|improve this answer













                Like this?



                documentclass[utf8]{article}
                usepackage{tikz}
                usetikzlibrary{arrows,shapes,positioning,shadows,trees}

                tikzset{
                basic/.style = {draw, text width=15em, drop shadow, rectangle},
                root/.style = {basic, rounded corners=2pt, thin, align=center,
                fill=green!30},
                level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
                text width=8em},
                level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
                }

                begin{document}
                begin{tikzpicture}[
                every node/.style={anchor=center, align=center},
                level 1/.style={sibling distance=12em},
                edge from parent path={(tikzparentnode.south) |- (0em,2em) -| (tikzchildnode.north)},
                edge from parent/.style={->,draw},
                >=latex]

                % root of the the initial tree, level 1
                node[root] {Drawing diagrams}
                % The first level, as children of the initial tree
                child {node[level 2] (c1) {Defining node and arrow styles}}
                child {node[level 2] (c2) {Positioning the nodes}}
                child {node[level 2] (c3) {Drawing arrows between nodes}};

                % The second level, relatively positioned nodes
                begin{scope}[every node/.style={level 3}]
                node [below of = c1, xshift=15pt] (c11) {Setting shape};
                node [below of = c11] (c12) {Choosing color};
                node [below of = c12] (c13) {Adding shading};

                node [below of = c2, xshift=15pt] (c21) {Using a Matrix};
                node [below of = c21] (c22) {Relatively};
                node [below of = c22] (c23) {Absolutely};
                node [below of = c23] (c24) {Using overlays};

                node [below of = c3, xshift=15pt] (c31) {Default arrows};
                node [below of = c31] (c32) {Arrow library};
                node [below of = c32] (c33) {Resizing tips};
                node [below of = c33] (c34) {Shortening};
                node [below of = c34] (c35) {Bending};
                end{scope}

                % lines from each level 1 node to every one of its "children"
                foreach value in {1,2,3}
                draw[->] (c1.west)--([xshift=-5mm]c1.west) |- (c1value.west);

                foreach value in {1,...,4}
                draw[->] (c2.west)--([xshift=-5mm]c2.west) |- (c2value.west);

                foreach value in {1,...,5}
                draw[->] (c3.west)--([xshift=-5mm]c3.west) |- (c3value.west);
                end{tikzpicture}
                end{document}


                screenshot







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 6 at 20:07









                AndréCAndréC

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478082%2fcreate-multiple-path-style-from-parent-to-children-in-a-tikztree%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents