4

I would like you to help me please. I am drawing some syntactic phrase structure trees using the forest package, option linguistics. The problem is that when the trees grow, they do not fit in the page. So, I wanted to rotate them. The problem is that when I use the grow option, the tree rotates, but the nodes don't rotate along with it. Could anyone help me? Here is my minimal code :

\documentclass[10pt,a4paper]{article}
\usepackage[linguistics]{forest}
\usepackage{linguex}
\begin{document}

\ex. \begin{forest}
for tree={s sep=10mm, inner sep=0, l=0, grow=0}
[IP
    [DP[The cat, roof]]
    [I$'$[VP[scratched the furniture, roof]]]
]
\end{forest}


\end{document}

But this is what I would like to achieve :

enter image description here

3
  • Dear @cfr, here is the issue. Apr 14 at 20:07
  • Don't change the tree, rotate the page. Linguistic trees aren't designed to be displayed sideways.
    – Alan Munn
    Apr 14 at 20:10
  • The problem is that in the actual document, there is text on the same page. Apr 14 at 20:12

1 Answer 1

7

I don't think this is a good idea, but you could simply put the tree inside a \rotatebox command:

\documentclass{article}
\usepackage{graphicx}
\usepackage[linguistics]{forest}
\usepackage{linguex}
\begin{document}
This is some text.
\ex. 
\rotatebox{90}{\begin{forest}
for tree={s sep=10mm, inner sep=0,}
[IP
    [DP[The cat, roof]]
    [I$'$[VP[scratched the furniture, roof]]]
]
\end{forest}}

This is some more text.
\end{document}

output of code

7
  • Thanks. This is a solution and it is very simple. Thanks a lot. Apr 14 at 20:30
  • I suggested sidewaysfigure. Why is that not a good idea?
    – cfr
    Apr 15 at 17:46
  • @cfr sidewaysfigure isn't the right environment, since trees in linguistics aren't figures that float, but numbered examples. So the sideways environment would also work (which is essentially what my solution is). But I don't really like putting a tree on its side like that. It's hard to read. If a tree was very large and needed to take up a landscape page, then putting it on its own page and rotating the page would be a better solution.
    – Alan Munn
    Apr 15 at 18:37
  • 1
    @cfr We totally agree on the "when to rotate" conditions. If the tree is big enough to fit on a page, then I would use the pdflscape package and issue a \clearpage before it.
    – Alan Munn
    Apr 15 at 23:13
  • 1
    @cfr Definitely more like proofs than illustrations for sure.
    – Alan Munn
    Apr 16 at 1:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .