I want to create a dependency diagram such as the following:
So far, I have done this using TikZ:
\documentclass{article}
\usepackage{tikz}
\usepackage{calc}
\begin{document}
\def\mytext{The man}
\newlength{\basewidth}
\setlength{\basewidth}{\widthof{\mytext}}
\begin{tikzpicture}[
firstnode/.style={
shape = rectangle,
inner sep = 2pt,
anchor=south west,
}
]
\draw[thin] (0,0) -- (\basewidth + 2ex,0);
\draw[thin] (0,0) -- (0, 1.5em);
draw (0,0) \node[firstnode,
minimum width = \basewidth] {\mytext};
\end{tikzpicture}
\end{document}
Which gives me the following output:
How may I complete the diagram (in repeatable, efficient way)?
forest
package? – user121799 Feb 25 '19 at 2:21