I'm trying to reproduce the image below.
As you can see on the left margin has some info: Channel, Code Type, Sender etc. aligned with descendants.
Also, on Repertoire of codes and channels
> visual
> + verbal
has additional info placards, banner etc.
The same info is also on -verbal
> figure
> + durative
a.s.o
Here is what I tried
this is the first time I'm using forest package
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usepackage[linguistics]{forest}
\begin{document}
\begin{forest}% should be fit to page
[Repertoriul codurilor și al canalelor
[vizual % this is CHANEL
[+ verbal % this is Code type
[,phantom
[pancarde % has to be aditional info to the tree
[banere % has to be aditional info to the tree
[etc.] % has to be aditional info to the tree
]
]
]
]
[- verbal
[figura % this is the Sender
[+ durativ] % information transmission
[- durativ]
]
[scena
[+ durativ]
[- durativ]
]
]
]
[(olfactiv)]
[(haptic)]
[(gustativ)]
[(acustic)
[+ verbal
[lingvistic
[figura
[+ durativ]
[- durativ]
]
[scena]
]
[paralingvistic
[figura
[+ durativ]
[- durativ]
]
[scena]
]
]
[- verbal
[figura]
[scena]
]
]
];
\end{forest}
\end{document}
Best Answer
For the information on the side, you had the right idea, but at the wrong level of the tree. You need to make a phantom branch as the leftmost branch of the tree, and then for subsequent labels specify
no edge
to remove the line between nodes.For the extra information below the terminal nodes, you can just use
\\
to create new lines in a node label. Since you're loading thelinguistics
library, nodes are already specified with thealign=center
key, so node labels can have\\
inside them. (In my previous version, I made these nodes withno edge
because I thought they were uniformly at the bottom row of the tree, but in retrospect, I don't think this is the best way to do it.)To more faithfully reproduce the tree in your image, I've also added an explicit
tier=fig
key to each of the nodes so that all of the "Sender" level nodes appear at the same level.Unless you want to make the font smaller, there's no good way to make this tree more compact and have it fit on the page in portrait mode, with the default page margins, and it barely fits with 1cm margins on an A4 page, so I would recommend using the
lscape
package and itslandscape
environment to put the tree in landscape orientation.