2

I want to draw dependencies between words in a sentence. I am using dependency in order to do so. However, the edges in the 3rd and 4th level consume quite a lot of space which is why I'd like to move them down a little bit but above or edge above do not work. One does only move the label, the other does nothing.

\begin{figure}[!htb]
\centering
\begin{dependency}
    \begin{deptext}[column sep=0.025em]
    The \& food \& was \& lousy \& - \& too \& sweet \& or \& too \& salty \& and \& the \& portions \& tiny \&. \\
    \end{deptext}
    \deproot[edge below]{4}{ROOT}
    \depedge{2}{1}{det}
    \depedge{4}{2}{nsubj}
    \depedge{4}{3}{cop}
    \depedge{7}{6}{advmod}
    \depedge{4}{7}{amod}
    \depedge{7}{8}{cc}
    \depedge{10}{9}{dep}
    \depedge{7}{10}{conj}
    \depedge[above=-10mm]{4}{11}{cc}         % Only moves the label
    \depedge{13}{12}{det}
    \depedge{14}{13}{dep}
    \depedge[edge above=-15mm]{4}{14}{conj}  % Does nothing
\end{dependency}
\end{figure}

which generates:

enter image description here

How can I modify the "height" of the edges?

1

If you have tikz-dependency version 1.2 or above, you can simply use edge height:

\depedge[edge height=3cm]{4}{14}{conj}

Otherwise, use edge unit distance:

\depedge[edge unit distance=2ex]{4}{14}{conj}

Reference: http://ctan.math.utah.edu/ctan/tex-archive/graphics/pgf/contrib/tikz-dependency/tikz-dependency-doc.pdf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.