2

example tree

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{forest}
\begin{document}

\begin{forest}
    [VP
    [DP]
      [V'       
        [{A B C\textcolor{white}{A B C}}
         [xxx] ]
        [DP]
      ]
]
\end{forest}
\end{document}

Most similar question: Forest for linguistics - proportional alignment like in qtree

Hi, I'm new to forest and qtree. I've looked through the docs but this question doesn't seem to come up in the diagrams as an option.

I would like the line coming down from V' to point to say 'A' in 'ABC', and the branch downwards to come from say 'C', rather than the inwards and outwards lines both going through and from the mid point.

I've managed to do a hack to get the down-line coming out from C, but then this also messes up the line above.

Hopefully there is a quick win.

2
  • full MWE please.
    – naphaneal
    Jun 15, 2018 at 9:24
  • now edited to make MWE
    – A. D
    Jun 15, 2018 at 11:03

1 Answer 1

1

like this?

enter image description here

with "dirty trick" combining forest and tikz drawing:

\documentclass[margin=3mm]{standalone}%
\usepackage{forest}
\usetikzlibrary{positioning}

\begin{document}
    \begin{forest}
for tree={
inner xsep=0pt,
s sep=9mm,
l sep=7mm}
    [VP
    [DP]
      [V'
        [A, name=a]
        [DP]
      ]
]
\begin{scope}[inner xsep=0pt, node distance=7mm and 0mm]
\node (b) [right=of a] {B};
\node (c) [right=of b] {C};
\node (x) [below=of c] {XXX};
\draw (c) -- (x);
\end{scope}
    \end{forest}
\end{document}
5
  • ah, and if I wanted the tree to continue growing from "XXX" in forest mode?
    – A. D
    Jun 15, 2018 at 11:09
  • about this ask new question. your comment is new question, and such here is not visible to many people.
    – Zarko
    Jun 15, 2018 at 12:24
  • ok, done here
    – A. D
    Jun 15, 2018 at 13:06
  • 1
    @A.D I think you mean tex.stackexchange.com/q/436566/15925 Jun 15, 2018 at 17:28
  • This doesn't really get the spacing right, because the space taken by the 'B' and 'C' are not accounted for when the tree is packed. @A.D
    – cfr
    Jun 15, 2018 at 23:21

You must log in to answer this question.

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