As a linguist who uses trees for my work all the time, I'm very familiar with all of the tree drawing packages useful for linguistics. One thing I've noticed of late is that almost any tree question that comes up, a couple of users (you know who you are...) jump in with a blanket recommendation that the forest
package should be used, even though the original question did not ask about forest
.
Now if someone is using the default tikz
method for drawing a tree, by all means suggest using a tool better suited to the task.
I'm a big fan of forest
, and I'm also in favour of recommending better solutions to a problem if they exist, but for many plain linguistics tree problems in particular, the widely used and excellent package tikz-qtree
does a fine job (and in some cases, IMO) a better job than forest
. To see what I mean, look at this example:
The forest
trees are from a linguistic perspective much harder to read IMO, and the packing algorithm of forest
is responsible. Furthermore, the default edge path in forest
is not one used much in linguistics, and so needs to be changed to match common practice in the field.
So please, people, let's recommend forest
in places where it clearly has an advantage, but don't just tell people using tikz-qtree
that they should be using forest
instead, especially if their original question uses tikz-qtree
.
This problem has arisen before in the context of TikZ vs. PSTricks etc. answers:
forest
=for the
in latin drops the mic, walks awaytikz-qtree
. I used to useqtree
. It is true thatforest
's defaults are less good for many purposes - at least for logic and, I gather, for linguistics. I'm not sure it is bad to have aforest
answer in these cases, even if it is not the best solution for the particular question. What I would like to see, though, would be an easily used library of styles for forest so that you could say\begin{forest} linguistics [root [...]] \end{forest}
. I'm working on this for logic right now.forest
is better" vibe to these answers. I agree that some better defaults would helpforest
. As I said, I'm by no means againstforest
but if an question asks abouttikz-qtree
maybe we should focus on answering it usingtikz-qtree
unless the requested features are made much simpler withforest
.tikz-qtree
- I have never used the package, but it was fairly straightforward to adapt the OP's code. When I went to post it, atikz-qtree
answer had already been posted. So I adapted mine toforest
just to provide another option. Hence theor you could...
. In lots of cases, I don't know how to do what the OP wants usingqtree
ortikz-qtree
, and then I do answer usingforest
. But that was not the case with this question.forest
but fine-tuned for particular applications. I wouldn't know what these should look like for linguistics, but I do for logic. One reason I would like to see this is because trees could then be drawn well for various purposes with code no more complex than that required for the other packages, but could be easily extended later if greater power is required.tikz-qtree
andforest
? The received opinion at least in the case of TikZ vs. PSTricks is that both answers are acceptable. So perhaps one possibility is to give both answers, even if the OP's question is specifically about one package. Then, in theforest
answer to atikz-qtree
question, for example, you could link to the question about the differences. And perhaps that question ...forest
tries to minimize spacing. Another relevant thing to point out is the syntax. One of the reasons I've been recommendingforest
to people just learning LaTeX is because you don't get an obscure error message if you omit a space at the end of your leaf name like you do withtikz-qtree
. Anyway, just a thought that popped into my head.:)