0

I am still new to latex, but i tried to search for the below type of a tree, but i couldn't find any. is it possible to have such a tree? if yes please tell me how.


Update: what i am actually trying to have is like this new image. there is a Root Node
that have a number of children(that also may have children). what i need to do is to draw the first 3 nodes in level 1 vertically aligned with their label (communication in the image), the next 4 in level 1 to be vertically aligned with their label (coordination in the image ). and so on.


![enter image description here

  • 1
    Welcome! What have you tried? I don't really understand what is meant to be special about this tree. There are a gazillion trees on this site (very probably more) and this one doesn't look like an unusual specimen, so either this is just a do-it-for-me-I-can't-be-bothered or you haven't really explained what you need. Circular labelled nodes with standard branches seems bog-standard, really. – cfr Apr 19 '17 at 1:57
  • 1
    @cfr To be fair, most tree packages won't draw trees with unequal length branches for nodes at the same hierarchical level (like this one) and if they do, it's not by default. I'm sure forest can do this, though... :) – Alan Munn Apr 19 '17 at 2:02
  • @AlanMunn But it isn't clear from the question whether that even matters. Who knows what matters about the tree? There's some hint in the title, but it isn't clear even there what about the length is supposed to matter. What about the hidden nodes related to A? Are they all meant to come above B? Or just the top one? – cfr Apr 19 '17 at 2:18
  • @AlanMunn Is 'A' a node? – cfr Apr 19 '17 at 2:20
  • Use forest and specify tiers manually. – cfr Apr 19 '17 at 2:50
2

Note that this is an answer to an interpretation of the original question. The question was subsequently changed.

(The new question is still ambiguous, but I can't think of an interesting interpretation.)

Note that I think I ought not answer do-it-for-mes, but sometimes do anyway. When I do so, I do so because I want to. If it happens to help somebody, so be it. If not, it is no loss. I will typically be less sympathetic to requests for fine-tuning, explanations and amendments. I had to create a problem from scratch, decide on an interpretation etc. If you wanted something specific, you could have asked it, provided a minimal example and demonstrated your starting point.

\documentclass[border=10pt]{standalone}
\usepackage{forest}
\begin{document}
\forestset{
  declare toks={ltl}{},
}
\begin{forest}
  for tree={
    draw,
    circle,
  },
  before typesetting nodes={
    where level=1{
      temptoksa/.option=n,
      for tree={
        ltl/.register=temptoksa,
        if n children=0{
          append={[, phantom, tier/.option=!u.ltl]}
        }{}
      },
    }{},
  },
  before packing={
    where level=1{
      tier/.process={Ow+n{ltl}{#1-1}},
    }{}
  }
  [
    [[][][][]]
    [[][][]]
    [[][]]
    []
    [[][]]
  ]
\end{forest}
\end{document}

droopy tree

  • Thanks alot, this is really helpfull. sorry for the ambiguity of my question, yet again I am still new to this. i am having a hard time to make a simple page. – user131581 Apr 19 '17 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.