I want to make a diagram that looks exactly like this one, without the red border. I am using the qtree package to get a similar result, but I get two problems. Firstly, I am unable to make a right-align on the leaves of the tree
Secondly, the edges/lines sometimes overlap with the words in the nodes.
Below is the code i used to generate the tikz image
\usepackage{qtree}
\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\tikzset{grow'=right} % make trees grow from left to right
\tikzset{every tree node/.style={anchor=base west}} % align nodes of the tree to the left (west)
\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] ]
\\
\\
\clearpage
% In the document:
\begin{tikzpicture}
\small
\node (is-root) {Heildarskaði}
[sibling distance=6.5cm]
child {
[sibling distance=3.3cm]
child {
child {node {Fyrir notendur}
child {
[sibling distance=1cm]
child { node {Líkamlegur}
child {
child {
[sibling distance=0.5cm]
child {node {Bein dánartíðni vímuefna}}
}
}
child {
child {
child {node {Tengd dánartíðni vímuefna}}
}
}
child {
child {
child {node {Beinn skaði vímuefna}}
}
}
child {
child {
child {node {Tengdur skaði vímuefna}}}
}
}
}
child {
[sibling distance=1cm]
child { node {Sálrænn}
child {
child {
[sibling distance=0.5cm]
child {node {Fíkn}}
}
}
child {
child {
child {node {Beinn skaði vímuefna á geðheilsu}}
}
}
child {
child {
child {node {Óbeinn skaði vímuefna á geðheilsu}}
}
}
}
}
child {
[sibling distance=1cm]
child { node {Samfélagslegur}
child {
child {
[sibling distance=0.5cm]
child {node {Tap á efnislegum þörfum}}
}
}
child {
child {
child {node{Tap á félagslegum þörfum}}
}
}
}
}
}
}
}
child {
[sibling distance=3.5cm]
child {
child {node { Fyrir aðra}
child {
[sibling distance=1cm]
child { node {Líkamlegur og sálrænn}
child {
child {
[sibling distance=0.5cm]
child {node {Skaði}}
}
}
}
}
child {
[sibling distance=1cm]
child { node {Samfélagslegur}
child {
child {
[sibling distance=0.5cm]
child {node {Glæpatíðni}}
}
}
child {
child {
child {node {Umhverfislegur skaði}}
}
}
child {
child {
child {node {Neikvæð áhrif á fjölskyldu}}
}
}
child {
child {
child {node {Alþjóðlegur skaði}}}
}
child {
child {
child {node {Efnahagslegur kostnaður}}
}
}
child {
child {
child {node {Þjóðfélagslegur skaði}}}
}
}
}
}
}
%child[missing]
};
\path (is-root) +(0,-2.5\tikzleveldistance)
\end{tikzpicture}
Best Answer
A small variation of nice @Ross answer (+1). Differences are marked by
% <---
:after compiling with
XeLaTeX
orLuaLaTeX
you will get: