How to have two root nodes in forest package?How to define the default vertical distance between nodes?How to connect two parents to the same child, with parents not in the same tree?Numerical conditional within tikz keys?Relating tree nodes in forest to content in a tableHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingHow to Add Geometric Figures to a Tree using Forest and Tikz?Line up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?Decrease distance between nodes in tree using Forest

Why use an adjective after a noun?

Are these homebrew metallic/chromatic pseudodragons the same CR as RAW pseudodragons?

The algorithm of the new quantum factoring record 1,099,551,473,989

Who is responsible on resolving conflicts on different PRs?

Any reason not to use global lambdas?

Eating Titan's oceans

Buffers output load in unpowered state

How to I represent 5 eighth-notes as one note?

Does the sterile cockpit rule mean flight attendants could not inform the pilots if a passenger is in the lavatory while on final?

Reduction of Meijer G-function

Is the game of chess a finite state machine?

How do I self-answer "What does this say?"

How does the bypass air provide thrust?

Horizon Walker Distant Strike Multi-attack

What are the engineering principles for a train to get electricity from the railway

Are Plenty Of Ammo cards discarded after using them?

Select specific rows of a dataset

Where do the "magic" constants 0x9e3779b9 come from?

I've never seen this before. Is this primarily a "rote computational trick" for multiplication by 9 ...?

Can a polling station in the UK shut early if everyone has voted?

Can a public school in the USA force a 14yr old to create a Twitter account for a passing grade?

How to quickly type a C expression where the assigned-to variable is repeated?

Is it principled to tip less if a pricey restaurant doesn't accept Visa or Mastercard?

CodeReview question markdown downloader



How to have two root nodes in forest package?


How to define the default vertical distance between nodes?How to connect two parents to the same child, with parents not in the same tree?Numerical conditional within tikz keys?Relating tree nodes in forest to content in a tableHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingHow to Add Geometric Figures to a Tree using Forest and Tikz?Line up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?Decrease distance between nodes in tree using Forest






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2


















I'm using forest to make trees. This package automates the measurements and placements of the nodes (which is great!!) I want a node of a forest-tree to be accommodated in two trees.



Have a look at this code.



documentclassstandalone
usepackagetikz

begindocument
begintikzpicture
draw (1,1) -- (1,-2) node[below]a;
draw (1,1) -- (3,-2) node[below]b;
draw (1,1) -- (-1,-2) node[below]c;
draw[dotted] (5,1) -- (3,-2);
draw (5,1) -- (5,-2) node[below]d;
draw (5,1) -- (7,-2) node[below]e;
endtikzpicture
enddocument


This code produces -



1



This is exactly what I want. Now let's shift to forest. I don't want placement-calculations to come in the picture. I want the above tree to be automated. This is a pseudo-forest code, which I want to make workable. In this code there are two trees (which itself is an alien thing for forest) & it has one ambiguous node occurring in both of them. Is it possible?



documentclassstandalone
usepackage[linguistics]forest

begindocument
beginforest
[[c]
[a]
b%Special brackets to have this node in both the trees
]%This bracket should end the first tree

[%This bracket should start a new tree
b%Special brackets to have this node in both the trees
[d]
[e]
]
endforest
enddocument


PS - If possible I also want the dotted line, but it is absolutely optional.










share|improve this question




















  • 1





    Related/duplicate: Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX. Since multidominant trees aren't formally trees, tree drawing packages can't deal with them automatically.

    – Alan Munn
    Oct 1 at 13:32











  • Thanks this helped me, I understand that tree drawing packages are not meant to draw such structures, but is it really hard to think of this automation? I mean if it is possible to accommodate such changes by tweaking our formalism a bit, won't it be more productive?

    – Niranjan
    Oct 1 at 13:40












  • Also this is not helpful for two trees in one environment.

    – Niranjan
    Oct 1 at 13:45






  • 1





    Well one problem is that you can't represent them with a nested bracketed structure, so the first problem would be to figure out a syntax that would allow you to specify the multidominance. For the two trees problem you can just make one tree with empty branches and root node dominating the two (sub-)trees.

    – Alan Munn
    Oct 1 at 13:45












  • How to generate empty branches?

    – Niranjan
    Oct 1 at 13:52

















2


















I'm using forest to make trees. This package automates the measurements and placements of the nodes (which is great!!) I want a node of a forest-tree to be accommodated in two trees.



Have a look at this code.



documentclassstandalone
usepackagetikz

begindocument
begintikzpicture
draw (1,1) -- (1,-2) node[below]a;
draw (1,1) -- (3,-2) node[below]b;
draw (1,1) -- (-1,-2) node[below]c;
draw[dotted] (5,1) -- (3,-2);
draw (5,1) -- (5,-2) node[below]d;
draw (5,1) -- (7,-2) node[below]e;
endtikzpicture
enddocument


This code produces -



1



This is exactly what I want. Now let's shift to forest. I don't want placement-calculations to come in the picture. I want the above tree to be automated. This is a pseudo-forest code, which I want to make workable. In this code there are two trees (which itself is an alien thing for forest) & it has one ambiguous node occurring in both of them. Is it possible?



documentclassstandalone
usepackage[linguistics]forest

begindocument
beginforest
[[c]
[a]
b%Special brackets to have this node in both the trees
]%This bracket should end the first tree

[%This bracket should start a new tree
b%Special brackets to have this node in both the trees
[d]
[e]
]
endforest
enddocument


PS - If possible I also want the dotted line, but it is absolutely optional.










share|improve this question




















  • 1





    Related/duplicate: Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX. Since multidominant trees aren't formally trees, tree drawing packages can't deal with them automatically.

    – Alan Munn
    Oct 1 at 13:32











  • Thanks this helped me, I understand that tree drawing packages are not meant to draw such structures, but is it really hard to think of this automation? I mean if it is possible to accommodate such changes by tweaking our formalism a bit, won't it be more productive?

    – Niranjan
    Oct 1 at 13:40












  • Also this is not helpful for two trees in one environment.

    – Niranjan
    Oct 1 at 13:45






  • 1





    Well one problem is that you can't represent them with a nested bracketed structure, so the first problem would be to figure out a syntax that would allow you to specify the multidominance. For the two trees problem you can just make one tree with empty branches and root node dominating the two (sub-)trees.

    – Alan Munn
    Oct 1 at 13:45












  • How to generate empty branches?

    – Niranjan
    Oct 1 at 13:52













2













2









2








I'm using forest to make trees. This package automates the measurements and placements of the nodes (which is great!!) I want a node of a forest-tree to be accommodated in two trees.



Have a look at this code.



documentclassstandalone
usepackagetikz

begindocument
begintikzpicture
draw (1,1) -- (1,-2) node[below]a;
draw (1,1) -- (3,-2) node[below]b;
draw (1,1) -- (-1,-2) node[below]c;
draw[dotted] (5,1) -- (3,-2);
draw (5,1) -- (5,-2) node[below]d;
draw (5,1) -- (7,-2) node[below]e;
endtikzpicture
enddocument


This code produces -



1



This is exactly what I want. Now let's shift to forest. I don't want placement-calculations to come in the picture. I want the above tree to be automated. This is a pseudo-forest code, which I want to make workable. In this code there are two trees (which itself is an alien thing for forest) & it has one ambiguous node occurring in both of them. Is it possible?



documentclassstandalone
usepackage[linguistics]forest

begindocument
beginforest
[[c]
[a]
b%Special brackets to have this node in both the trees
]%This bracket should end the first tree

[%This bracket should start a new tree
b%Special brackets to have this node in both the trees
[d]
[e]
]
endforest
enddocument


PS - If possible I also want the dotted line, but it is absolutely optional.










share|improve this question














I'm using forest to make trees. This package automates the measurements and placements of the nodes (which is great!!) I want a node of a forest-tree to be accommodated in two trees.



Have a look at this code.



documentclassstandalone
usepackagetikz

begindocument
begintikzpicture
draw (1,1) -- (1,-2) node[below]a;
draw (1,1) -- (3,-2) node[below]b;
draw (1,1) -- (-1,-2) node[below]c;
draw[dotted] (5,1) -- (3,-2);
draw (5,1) -- (5,-2) node[below]d;
draw (5,1) -- (7,-2) node[below]e;
endtikzpicture
enddocument


This code produces -



1



This is exactly what I want. Now let's shift to forest. I don't want placement-calculations to come in the picture. I want the above tree to be automated. This is a pseudo-forest code, which I want to make workable. In this code there are two trees (which itself is an alien thing for forest) & it has one ambiguous node occurring in both of them. Is it possible?



documentclassstandalone
usepackage[linguistics]forest

begindocument
beginforest
[[c]
[a]
b%Special brackets to have this node in both the trees
]%This bracket should end the first tree

[%This bracket should start a new tree
b%Special brackets to have this node in both the trees
[d]
[e]
]
endforest
enddocument


PS - If possible I also want the dotted line, but it is absolutely optional.







tikz-pgf forest






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 1 at 13:21









NiranjanNiranjan

8141 silver badge16 bronze badges




8141 silver badge16 bronze badges










  • 1





    Related/duplicate: Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX. Since multidominant trees aren't formally trees, tree drawing packages can't deal with them automatically.

    – Alan Munn
    Oct 1 at 13:32











  • Thanks this helped me, I understand that tree drawing packages are not meant to draw such structures, but is it really hard to think of this automation? I mean if it is possible to accommodate such changes by tweaking our formalism a bit, won't it be more productive?

    – Niranjan
    Oct 1 at 13:40












  • Also this is not helpful for two trees in one environment.

    – Niranjan
    Oct 1 at 13:45






  • 1





    Well one problem is that you can't represent them with a nested bracketed structure, so the first problem would be to figure out a syntax that would allow you to specify the multidominance. For the two trees problem you can just make one tree with empty branches and root node dominating the two (sub-)trees.

    – Alan Munn
    Oct 1 at 13:45












  • How to generate empty branches?

    – Niranjan
    Oct 1 at 13:52












  • 1





    Related/duplicate: Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX. Since multidominant trees aren't formally trees, tree drawing packages can't deal with them automatically.

    – Alan Munn
    Oct 1 at 13:32











  • Thanks this helped me, I understand that tree drawing packages are not meant to draw such structures, but is it really hard to think of this automation? I mean if it is possible to accommodate such changes by tweaking our formalism a bit, won't it be more productive?

    – Niranjan
    Oct 1 at 13:40












  • Also this is not helpful for two trees in one environment.

    – Niranjan
    Oct 1 at 13:45






  • 1





    Well one problem is that you can't represent them with a nested bracketed structure, so the first problem would be to figure out a syntax that would allow you to specify the multidominance. For the two trees problem you can just make one tree with empty branches and root node dominating the two (sub-)trees.

    – Alan Munn
    Oct 1 at 13:45












  • How to generate empty branches?

    – Niranjan
    Oct 1 at 13:52







1




1





Related/duplicate: Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX. Since multidominant trees aren't formally trees, tree drawing packages can't deal with them automatically.

– Alan Munn
Oct 1 at 13:32





Related/duplicate: Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX. Since multidominant trees aren't formally trees, tree drawing packages can't deal with them automatically.

– Alan Munn
Oct 1 at 13:32













Thanks this helped me, I understand that tree drawing packages are not meant to draw such structures, but is it really hard to think of this automation? I mean if it is possible to accommodate such changes by tweaking our formalism a bit, won't it be more productive?

– Niranjan
Oct 1 at 13:40






Thanks this helped me, I understand that tree drawing packages are not meant to draw such structures, but is it really hard to think of this automation? I mean if it is possible to accommodate such changes by tweaking our formalism a bit, won't it be more productive?

– Niranjan
Oct 1 at 13:40














Also this is not helpful for two trees in one environment.

– Niranjan
Oct 1 at 13:45





Also this is not helpful for two trees in one environment.

– Niranjan
Oct 1 at 13:45




1




1





Well one problem is that you can't represent them with a nested bracketed structure, so the first problem would be to figure out a syntax that would allow you to specify the multidominance. For the two trees problem you can just make one tree with empty branches and root node dominating the two (sub-)trees.

– Alan Munn
Oct 1 at 13:45






Well one problem is that you can't represent them with a nested bracketed structure, so the first problem would be to figure out a syntax that would allow you to specify the multidominance. For the two trees problem you can just make one tree with empty branches and root node dominating the two (sub-)trees.

– Alan Munn
Oct 1 at 13:45














How to generate empty branches?

– Niranjan
Oct 1 at 13:52





How to generate empty branches?

– Niranjan
Oct 1 at 13:52










1 Answer
1






active

oldest

votes


















5



















Mutlidominant trees aren't trees, so there is no good way to automate them with tree drawing packages like forest or tikz-qtree. But there are ways to create the same effect manually (which I understand is not what you would like). Here's a sample. The second tree is more symmetrical, but at greater complexity since it involves a phantom third centre node to get the shared node aligned properly.



documentclassarticle
usepackage[linguistics]forest
begindocument
beginforest
[,phantom [A [B ][C,name=C]] [D,name=D [,phantom][F]]]
draw[dotted] (C.north) -- (D.south);
endforest

beginforestwhere n children=0tier=T
[,phantom [A,name=A [B, ][,phantom]][,phantom [C,name=C ]][D,name=D [,phantom][F]]]
draw (C.north) -- (A.south);
draw[dotted] (C.north) -- (D.south);
endforest

enddocument


output of code






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/4.0/"u003ecc by-sa 4.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%2f510532%2fhow-to-have-two-root-nodes-in-forest-package%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown


























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5



















    Mutlidominant trees aren't trees, so there is no good way to automate them with tree drawing packages like forest or tikz-qtree. But there are ways to create the same effect manually (which I understand is not what you would like). Here's a sample. The second tree is more symmetrical, but at greater complexity since it involves a phantom third centre node to get the shared node aligned properly.



    documentclassarticle
    usepackage[linguistics]forest
    begindocument
    beginforest
    [,phantom [A [B ][C,name=C]] [D,name=D [,phantom][F]]]
    draw[dotted] (C.north) -- (D.south);
    endforest

    beginforestwhere n children=0tier=T
    [,phantom [A,name=A [B, ][,phantom]][,phantom [C,name=C ]][D,name=D [,phantom][F]]]
    draw (C.north) -- (A.south);
    draw[dotted] (C.north) -- (D.south);
    endforest

    enddocument


    output of code






    share|improve this answer





























      5



















      Mutlidominant trees aren't trees, so there is no good way to automate them with tree drawing packages like forest or tikz-qtree. But there are ways to create the same effect manually (which I understand is not what you would like). Here's a sample. The second tree is more symmetrical, but at greater complexity since it involves a phantom third centre node to get the shared node aligned properly.



      documentclassarticle
      usepackage[linguistics]forest
      begindocument
      beginforest
      [,phantom [A [B ][C,name=C]] [D,name=D [,phantom][F]]]
      draw[dotted] (C.north) -- (D.south);
      endforest

      beginforestwhere n children=0tier=T
      [,phantom [A,name=A [B, ][,phantom]][,phantom [C,name=C ]][D,name=D [,phantom][F]]]
      draw (C.north) -- (A.south);
      draw[dotted] (C.north) -- (D.south);
      endforest

      enddocument


      output of code






      share|improve this answer



























        5















        5











        5









        Mutlidominant trees aren't trees, so there is no good way to automate them with tree drawing packages like forest or tikz-qtree. But there are ways to create the same effect manually (which I understand is not what you would like). Here's a sample. The second tree is more symmetrical, but at greater complexity since it involves a phantom third centre node to get the shared node aligned properly.



        documentclassarticle
        usepackage[linguistics]forest
        begindocument
        beginforest
        [,phantom [A [B ][C,name=C]] [D,name=D [,phantom][F]]]
        draw[dotted] (C.north) -- (D.south);
        endforest

        beginforestwhere n children=0tier=T
        [,phantom [A,name=A [B, ][,phantom]][,phantom [C,name=C ]][D,name=D [,phantom][F]]]
        draw (C.north) -- (A.south);
        draw[dotted] (C.north) -- (D.south);
        endforest

        enddocument


        output of code






        share|improve this answer














        Mutlidominant trees aren't trees, so there is no good way to automate them with tree drawing packages like forest or tikz-qtree. But there are ways to create the same effect manually (which I understand is not what you would like). Here's a sample. The second tree is more symmetrical, but at greater complexity since it involves a phantom third centre node to get the shared node aligned properly.



        documentclassarticle
        usepackage[linguistics]forest
        begindocument
        beginforest
        [,phantom [A [B ][C,name=C]] [D,name=D [,phantom][F]]]
        draw[dotted] (C.north) -- (D.south);
        endforest

        beginforestwhere n children=0tier=T
        [,phantom [A,name=A [B, ][,phantom]][,phantom [C,name=C ]][D,name=D [,phantom][F]]]
        draw (C.north) -- (A.south);
        draw[dotted] (C.north) -- (D.south);
        endforest

        enddocument


        output of code







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Oct 1 at 14:10









        Alan MunnAlan Munn

        175k30 gold badges448 silver badges741 bronze badges




        175k30 gold badges448 silver badges741 bronze badges































            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%2f510532%2fhow-to-have-two-root-nodes-in-forest-package%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

            Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

            How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

            Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü