I am trying to build a tree (the theme is argumentation theory, where arguments attack and defend each other) in Tikz but after a few levels down the tree, nodes are placed on top of each other or in a way that the arcs to their parents cross over each other.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\tikzset{
every node/.style={minimum size=4mm, inner sep=0.5mm, font=\sffamily},
level 1/.style={every child/.style={edge from parent/.style={draw,red}}},
level 2/.style={every child/.style={edge from parent/.style={draw,green}}},
level 3/.style={every child/.style={edge from parent/.style={draw,red}}},
level 4/.style={every child/.style={edge from parent/.style={draw,green}}},
level 5/.style={every child/.style={edge from parent/.style={draw,red}}},
level 6/.style={every child/.style={edge from parent/.style={draw,green}}},
def/.style={circle,thick,solid,draw=green!50,fill=green!20},
att/.style={circle,thick,solid,draw=red!50,fill=red!20}
}
\begin{document}
\begin{tikzpicture}[<-,>=stealth', semithick]
\node[def, label=east:defense] {}
child[level distance=11mm] { node[att, label=east:attack] {}
child {node[def, label=east:defense] {}
child { node[att, label=east:attack] {} }
child { node[att, label=east:attack] {} }
}
child {node[def, label=east:defense] {}
child {node[att, label=east:attack] {}}
child {node[att, label=east:attack] {}}
}
child {node[def, label=east:defense] {}
child {node[att, label=east:attack] {} }
child {node[att, label=east:attack] {} }
child {node[att, label=east:attack] {} }
}
};
\end{tikzpicture}
\end{document}
The result is the following:

As you can see, in the bottom layer, the arcs of the two nodes in the middle inevitably cross over each other. In addition, the two nodes after the first one in the bottom layer are placed on top of each other.
Is there a "adjust the distance between the nodes however you want so that the arcs between them don't cross and the nodes don't appear on top of each other"-command that I can use? Thank you very much for all the help and I hope this isn't a duplicate question as I couldn't find a similar one!





sibling distance? Or do you mean that you want thesibling distanceto be set automatically? And welcome to TeX.SX! – Adam Liter Apr 30 '14 at 19:48