Crossing branches in tikz-qtree












2















I'm translating a manual of syntax and they have some examples of non-valid structures. The first one I was able to reproduce, but not the second.



This is what I'm trying to reproduce:



enter image description here



My current code is the following:



documentclass{article}
usepackage{tikz-qtree}

begin{document}

begin{figure}[h]
centering

textbf{a}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
tikzset{every tree node/.style={align=center,anchor=base}}
tikzset{level 1+/.style={level distance=2baselineskip}}
tikzset{frontier/.style={distance from root=6baselineskip}}
Tree [.a [.b ] [.c ] ]
begin{scope}[grow'=up,yshift=-1.7cm]
Tree [.d [.b ] [.c ] ]
end{scope}
end{tikzpicture}qquad

textbf{b}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
Tree ??????????????????
end{figure}

end{document}









share|improve this question







New contributor




Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    I'm translating a manual of syntax and they have some examples of non-valid structures. The first one I was able to reproduce, but not the second.



    This is what I'm trying to reproduce:



    enter image description here



    My current code is the following:



    documentclass{article}
    usepackage{tikz-qtree}

    begin{document}

    begin{figure}[h]
    centering

    textbf{a}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
    tikzset{every tree node/.style={align=center,anchor=base}}
    tikzset{level 1+/.style={level distance=2baselineskip}}
    tikzset{frontier/.style={distance from root=6baselineskip}}
    Tree [.a [.b ] [.c ] ]
    begin{scope}[grow'=up,yshift=-1.7cm]
    Tree [.d [.b ] [.c ] ]
    end{scope}
    end{tikzpicture}qquad

    textbf{b}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
    Tree ??????????????????
    end{figure}

    end{document}









    share|improve this question







    New contributor




    Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      2












      2








      2








      I'm translating a manual of syntax and they have some examples of non-valid structures. The first one I was able to reproduce, but not the second.



      This is what I'm trying to reproduce:



      enter image description here



      My current code is the following:



      documentclass{article}
      usepackage{tikz-qtree}

      begin{document}

      begin{figure}[h]
      centering

      textbf{a}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
      tikzset{every tree node/.style={align=center,anchor=base}}
      tikzset{level 1+/.style={level distance=2baselineskip}}
      tikzset{frontier/.style={distance from root=6baselineskip}}
      Tree [.a [.b ] [.c ] ]
      begin{scope}[grow'=up,yshift=-1.7cm]
      Tree [.d [.b ] [.c ] ]
      end{scope}
      end{tikzpicture}qquad

      textbf{b}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
      Tree ??????????????????
      end{figure}

      end{document}









      share|improve this question







      New contributor




      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm translating a manual of syntax and they have some examples of non-valid structures. The first one I was able to reproduce, but not the second.



      This is what I'm trying to reproduce:



      enter image description here



      My current code is the following:



      documentclass{article}
      usepackage{tikz-qtree}

      begin{document}

      begin{figure}[h]
      centering

      textbf{a}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
      tikzset{every tree node/.style={align=center,anchor=base}}
      tikzset{level 1+/.style={level distance=2baselineskip}}
      tikzset{frontier/.style={distance from root=6baselineskip}}
      Tree [.a [.b ] [.c ] ]
      begin{scope}[grow'=up,yshift=-1.7cm]
      Tree [.d [.b ] [.c ] ]
      end{scope}
      end{tikzpicture}qquad

      textbf{b}) begin{tikzpicture}[level distance=30pt,sibling distance=5mm]
      Tree ??????????????????
      end{figure}

      end{document}






      linguistics tikz-qtree qtree






      share|improve this question







      New contributor




      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 hour ago









      Ricardo Ricardo

      132




      132




      New contributor




      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Ricardo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          2














          These do not necessarily look like trees, so I would not necessarily recommend to use a library specialized on trees for that.



          documentclass{article}
          usepackage{subfig}
          usepackage{tikz}
          usetikzlibrary{matrix}
          begin{document}

          begin{figure}[h]
          centering
          subfloat{begin{tikzpicture}
          matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
          nodes={align=center,inner sep=2pt},ampersand replacement=&]
          {
          & a & \
          b & & c\
          & d &\
          };
          draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
          (mat-2-1.south) -- (mat-3-2.north) -- (mat-2-3.south);
          end{tikzpicture}}
          qquad
          subfloat{begin{tikzpicture}
          matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
          nodes={align=center},ampersand replacement=&]
          {
          & a & \
          b & & c\
          e & & d\
          };
          draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
          (mat-2-1) -- (mat-3-3) (mat-2-3) -- (mat-3-1);
          end{tikzpicture}}
          end{figure}
          end{document}


          enter image description here






          share|improve this answer
























          • Perfect, thank you!

            – Ricardo
            28 mins ago



















          1














          An alternative to marmot's nice answer:



          documentclass{article}
          usepackage{tikz}
          usepackage{subcaption}
          begin{document}
          begin{figure}
          centering
          begin{subfigure}[t]{0.5textwidth}
          centering
          begin{tikzpicture}[y=1.5cm]
          node (a) at (0,0) {a};
          node (b) at (-1,-1) {b};
          node (c) at (1,-1) {c};
          node (d) at (0,-2) {d};
          draw (b.north)--(a.south)--(c.north);
          draw (b.south)--(d.north)--(c.south);
          end{tikzpicture}
          caption{}
          end{subfigure}%
          begin{subfigure}[t]{0.5textwidth}
          centering
          begin{tikzpicture}[y=1.5cm]
          node (a) at (0,0) {a};
          node (b) at (-1,-1) {b};
          node (c) at (1,-1) {c};
          node (d) at (1,-2) {d};
          node (e) at (-1,-2) {e};
          draw (b.north)--(a.south)--(c.north);
          draw (b.south)--(d.north);
          draw (c.south)--(e.north);
          end{tikzpicture}
          caption{}
          end{subfigure}
          end{figure}
          end{document}


          enter image description here



          But I prefer this



          documentclass{article}
          usepackage{tikz}
          usepackage{subcaption}
          begin{document}
          begin{figure}
          centering
          begin{subfigure}[t]{0.5textwidth}
          centering
          begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
          node (a) at (0,0) {a};
          node (b) at (-1,-1) {b};
          node (c) at (1,-1) {c};
          node (d) at (0,-2) {d};
          draw (b)--(a)--(c)--(d)--(b);
          end{tikzpicture}
          caption{}
          end{subfigure}%
          begin{subfigure}[t]{0.5textwidth}
          centering
          begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
          node (a) at (0,0) {a};
          node (b) at (-1,-1) {b};
          node (c) at (1,-1) {c};
          node (d) at (1,-2) {d};
          node (e) at (-1,-2) {e};
          draw (d)--(b)--(a)--(c)--(e);
          end{tikzpicture}
          caption{}
          end{subfigure}
          end{figure}
          end{document}


          enter image description here






          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
            });


            }
            });






            Ricardo is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475938%2fcrossing-branches-in-tikz-qtree%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














            These do not necessarily look like trees, so I would not necessarily recommend to use a library specialized on trees for that.



            documentclass{article}
            usepackage{subfig}
            usepackage{tikz}
            usetikzlibrary{matrix}
            begin{document}

            begin{figure}[h]
            centering
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center,inner sep=2pt},ampersand replacement=&]
            {
            & a & \
            b & & c\
            & d &\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1.south) -- (mat-3-2.north) -- (mat-2-3.south);
            end{tikzpicture}}
            qquad
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center},ampersand replacement=&]
            {
            & a & \
            b & & c\
            e & & d\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1) -- (mat-3-3) (mat-2-3) -- (mat-3-1);
            end{tikzpicture}}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer
























            • Perfect, thank you!

              – Ricardo
              28 mins ago
















            2














            These do not necessarily look like trees, so I would not necessarily recommend to use a library specialized on trees for that.



            documentclass{article}
            usepackage{subfig}
            usepackage{tikz}
            usetikzlibrary{matrix}
            begin{document}

            begin{figure}[h]
            centering
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center,inner sep=2pt},ampersand replacement=&]
            {
            & a & \
            b & & c\
            & d &\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1.south) -- (mat-3-2.north) -- (mat-2-3.south);
            end{tikzpicture}}
            qquad
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center},ampersand replacement=&]
            {
            & a & \
            b & & c\
            e & & d\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1) -- (mat-3-3) (mat-2-3) -- (mat-3-1);
            end{tikzpicture}}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer
























            • Perfect, thank you!

              – Ricardo
              28 mins ago














            2












            2








            2







            These do not necessarily look like trees, so I would not necessarily recommend to use a library specialized on trees for that.



            documentclass{article}
            usepackage{subfig}
            usepackage{tikz}
            usetikzlibrary{matrix}
            begin{document}

            begin{figure}[h]
            centering
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center,inner sep=2pt},ampersand replacement=&]
            {
            & a & \
            b & & c\
            & d &\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1.south) -- (mat-3-2.north) -- (mat-2-3.south);
            end{tikzpicture}}
            qquad
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center},ampersand replacement=&]
            {
            & a & \
            b & & c\
            e & & d\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1) -- (mat-3-3) (mat-2-3) -- (mat-3-1);
            end{tikzpicture}}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer













            These do not necessarily look like trees, so I would not necessarily recommend to use a library specialized on trees for that.



            documentclass{article}
            usepackage{subfig}
            usepackage{tikz}
            usetikzlibrary{matrix}
            begin{document}

            begin{figure}[h]
            centering
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center,inner sep=2pt},ampersand replacement=&]
            {
            & a & \
            b & & c\
            & d &\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1.south) -- (mat-3-2.north) -- (mat-2-3.south);
            end{tikzpicture}}
            qquad
            subfloat{begin{tikzpicture}
            matrix (mat) [matrix of nodes,column sep=1em,row sep=1em,
            nodes={align=center},ampersand replacement=&]
            {
            & a & \
            b & & c\
            e & & d\
            };
            draw (mat-2-1.north) -- (mat-1-2.south) -- (mat-2-3.north)
            (mat-2-1) -- (mat-3-3) (mat-2-3) -- (mat-3-1);
            end{tikzpicture}}
            end{figure}
            end{document}


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 39 mins ago









            marmotmarmot

            102k4119229




            102k4119229













            • Perfect, thank you!

              – Ricardo
              28 mins ago



















            • Perfect, thank you!

              – Ricardo
              28 mins ago

















            Perfect, thank you!

            – Ricardo
            28 mins ago





            Perfect, thank you!

            – Ricardo
            28 mins ago











            1














            An alternative to marmot's nice answer:



            documentclass{article}
            usepackage{tikz}
            usepackage{subcaption}
            begin{document}
            begin{figure}
            centering
            begin{subfigure}[t]{0.5textwidth}
            centering
            begin{tikzpicture}[y=1.5cm]
            node (a) at (0,0) {a};
            node (b) at (-1,-1) {b};
            node (c) at (1,-1) {c};
            node (d) at (0,-2) {d};
            draw (b.north)--(a.south)--(c.north);
            draw (b.south)--(d.north)--(c.south);
            end{tikzpicture}
            caption{}
            end{subfigure}%
            begin{subfigure}[t]{0.5textwidth}
            centering
            begin{tikzpicture}[y=1.5cm]
            node (a) at (0,0) {a};
            node (b) at (-1,-1) {b};
            node (c) at (1,-1) {c};
            node (d) at (1,-2) {d};
            node (e) at (-1,-2) {e};
            draw (b.north)--(a.south)--(c.north);
            draw (b.south)--(d.north);
            draw (c.south)--(e.north);
            end{tikzpicture}
            caption{}
            end{subfigure}
            end{figure}
            end{document}


            enter image description here



            But I prefer this



            documentclass{article}
            usepackage{tikz}
            usepackage{subcaption}
            begin{document}
            begin{figure}
            centering
            begin{subfigure}[t]{0.5textwidth}
            centering
            begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
            node (a) at (0,0) {a};
            node (b) at (-1,-1) {b};
            node (c) at (1,-1) {c};
            node (d) at (0,-2) {d};
            draw (b)--(a)--(c)--(d)--(b);
            end{tikzpicture}
            caption{}
            end{subfigure}%
            begin{subfigure}[t]{0.5textwidth}
            centering
            begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
            node (a) at (0,0) {a};
            node (b) at (-1,-1) {b};
            node (c) at (1,-1) {c};
            node (d) at (1,-2) {d};
            node (e) at (-1,-2) {e};
            draw (d)--(b)--(a)--(c)--(e);
            end{tikzpicture}
            caption{}
            end{subfigure}
            end{figure}
            end{document}


            enter image description here






            share|improve this answer




























              1














              An alternative to marmot's nice answer:



              documentclass{article}
              usepackage{tikz}
              usepackage{subcaption}
              begin{document}
              begin{figure}
              centering
              begin{subfigure}[t]{0.5textwidth}
              centering
              begin{tikzpicture}[y=1.5cm]
              node (a) at (0,0) {a};
              node (b) at (-1,-1) {b};
              node (c) at (1,-1) {c};
              node (d) at (0,-2) {d};
              draw (b.north)--(a.south)--(c.north);
              draw (b.south)--(d.north)--(c.south);
              end{tikzpicture}
              caption{}
              end{subfigure}%
              begin{subfigure}[t]{0.5textwidth}
              centering
              begin{tikzpicture}[y=1.5cm]
              node (a) at (0,0) {a};
              node (b) at (-1,-1) {b};
              node (c) at (1,-1) {c};
              node (d) at (1,-2) {d};
              node (e) at (-1,-2) {e};
              draw (b.north)--(a.south)--(c.north);
              draw (b.south)--(d.north);
              draw (c.south)--(e.north);
              end{tikzpicture}
              caption{}
              end{subfigure}
              end{figure}
              end{document}


              enter image description here



              But I prefer this



              documentclass{article}
              usepackage{tikz}
              usepackage{subcaption}
              begin{document}
              begin{figure}
              centering
              begin{subfigure}[t]{0.5textwidth}
              centering
              begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
              node (a) at (0,0) {a};
              node (b) at (-1,-1) {b};
              node (c) at (1,-1) {c};
              node (d) at (0,-2) {d};
              draw (b)--(a)--(c)--(d)--(b);
              end{tikzpicture}
              caption{}
              end{subfigure}%
              begin{subfigure}[t]{0.5textwidth}
              centering
              begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
              node (a) at (0,0) {a};
              node (b) at (-1,-1) {b};
              node (c) at (1,-1) {c};
              node (d) at (1,-2) {d};
              node (e) at (-1,-2) {e};
              draw (d)--(b)--(a)--(c)--(e);
              end{tikzpicture}
              caption{}
              end{subfigure}
              end{figure}
              end{document}


              enter image description here






              share|improve this answer


























                1












                1








                1







                An alternative to marmot's nice answer:



                documentclass{article}
                usepackage{tikz}
                usepackage{subcaption}
                begin{document}
                begin{figure}
                centering
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (0,-2) {d};
                draw (b.north)--(a.south)--(c.north);
                draw (b.south)--(d.north)--(c.south);
                end{tikzpicture}
                caption{}
                end{subfigure}%
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (1,-2) {d};
                node (e) at (-1,-2) {e};
                draw (b.north)--(a.south)--(c.north);
                draw (b.south)--(d.north);
                draw (c.south)--(e.north);
                end{tikzpicture}
                caption{}
                end{subfigure}
                end{figure}
                end{document}


                enter image description here



                But I prefer this



                documentclass{article}
                usepackage{tikz}
                usepackage{subcaption}
                begin{document}
                begin{figure}
                centering
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (0,-2) {d};
                draw (b)--(a)--(c)--(d)--(b);
                end{tikzpicture}
                caption{}
                end{subfigure}%
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (1,-2) {d};
                node (e) at (-1,-2) {e};
                draw (d)--(b)--(a)--(c)--(e);
                end{tikzpicture}
                caption{}
                end{subfigure}
                end{figure}
                end{document}


                enter image description here






                share|improve this answer













                An alternative to marmot's nice answer:



                documentclass{article}
                usepackage{tikz}
                usepackage{subcaption}
                begin{document}
                begin{figure}
                centering
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (0,-2) {d};
                draw (b.north)--(a.south)--(c.north);
                draw (b.south)--(d.north)--(c.south);
                end{tikzpicture}
                caption{}
                end{subfigure}%
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (1,-2) {d};
                node (e) at (-1,-2) {e};
                draw (b.north)--(a.south)--(c.north);
                draw (b.south)--(d.north);
                draw (c.south)--(e.north);
                end{tikzpicture}
                caption{}
                end{subfigure}
                end{figure}
                end{document}


                enter image description here



                But I prefer this



                documentclass{article}
                usepackage{tikz}
                usepackage{subcaption}
                begin{document}
                begin{figure}
                centering
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (0,-2) {d};
                draw (b)--(a)--(c)--(d)--(b);
                end{tikzpicture}
                caption{}
                end{subfigure}%
                begin{subfigure}[t]{0.5textwidth}
                centering
                begin{tikzpicture}[y=1.5cm,every node/.style={circle,draw,minimum size=0.75cm}]
                node (a) at (0,0) {a};
                node (b) at (-1,-1) {b};
                node (c) at (1,-1) {c};
                node (d) at (1,-2) {d};
                node (e) at (-1,-2) {e};
                draw (d)--(b)--(a)--(c)--(e);
                end{tikzpicture}
                caption{}
                end{subfigure}
                end{figure}
                end{document}


                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 10 mins ago









                JouleVJouleV

                4,0411937




                4,0411937






















                    Ricardo is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Ricardo is a new contributor. Be nice, and check out our Code of Conduct.













                    Ricardo is a new contributor. Be nice, and check out our Code of Conduct.












                    Ricardo is a new contributor. Be nice, and check out our Code of Conduct.
















                    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%2f475938%2fcrossing-branches-in-tikz-qtree%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

                    數位音樂下載

                    When can things happen in Etherscan, such as the picture below?

                    格利澤436b