16

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:

Extending a tree

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:

Best practise for answers which are for the community, not the OP ("tikz answer to pstricks question")

10
  • 9
    forest = for the in latin drops the mic, walks away
    – percusse
    Aug 5, 2015 at 15:07
  • 2
    I didn't actually say they should use it. I merely said that they could use it. I've never personally used tikz-qtree. I used to use qtree. It is true that forest'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 a forest 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.
    – cfr
    Aug 5, 2015 at 16:10
  • 2
    @cfr While maybe the use of 'should' is a bit strong, but there's pretty much always an implicit "forest is better" vibe to these answers. I agree that some better defaults would help forest. As I said, I'm by no means against forest but if an question asks about tikz-qtree maybe we should focus on answering it using tikz-qtree unless the requested features are made much simpler with forest.
    – Alan Munn
    Aug 5, 2015 at 18:09
  • @AlanMunn Actually, originally I wrote an answer to that question using 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, a tikz-qtree answer had already been posted. So I adapted mine to forest just to provide another option. Hence the or you could.... In lots of cases, I don't know how to do what the OP wants using qtree or tikz-qtree, and then I do answer using forest. But that was not the case with this question.
    – cfr
    Aug 5, 2015 at 20:47
  • 2
    I'm not sure whether the defaults should be changed - I assume that for certain purposes, the defaults are good. I was more thinking of a library of styles or of spin-off tree-drawing environments based on 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.
    – cfr
    Aug 5, 2015 at 20:51
  • Related to the issue of a library of styles, Sašo does maintain one on GitHub: github.com/sasozivanovic/forest-styles (cc: @cfr)
    – Adam Liter
    Aug 7, 2015 at 3:55
  • 1
    @AdamLiter Yes, but unless they make it onto CTAN, they might as well be in another galaxy. (Exaggeration but not much.) There's a qtree style there, for example, but when questions get asked here, people want code they can copy-paste and have work. It adds a whole level of complexity if they first have to figure out how to install a special package file.
    – cfr
    Aug 7, 2015 at 4:00
  • 2
    @cfr Very true. Just thought I'd mention it. Anyway, regarding the content of the (non-)question that Alan posted: what about some sort of general question on the main site about the differences between tikz-qtree and forest? 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 the forest answer to a tikz-qtree question, for example, you could link to the question about the differences. And perhaps that question ...
    – Adam Liter
    Aug 7, 2015 at 4:08
  • 1
    ... could have different answers that discuss advantages and disadvantages of each relative to a particular domain of application. For example, a linguistics answer to such a question could point out that sometimes having wider spacing is useful, and forest tries to minimize spacing. Another relevant thing to point out is the syntax. One of the reasons I've been recommending forest 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 with tikz-qtree. Anyway, just a thought that popped into my head.
    – Adam Liter
    Aug 7, 2015 at 4:11
  • 1
    @percusse: you sir are a living legend. :) Aug 7, 2015 at 21:41

0

You must log in to answer this question.

Browse other questions tagged .