Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to prevent the arcs from combining with tikz-dependency, like

enter image description here

two arcs starting from "had" are separated from each other.

but in the picture generated by the following code, below they are not separated,

\documentclass[12pt]{article}
\usepackage{tikz-dependency}

\begin{document}

\begin{dependency}[theme = simple, edge horizontal padding=3pt]
\begin{deptext}[column sep=1em]
A \& hearing \& is \& scheduled \& on \& the \& issue \& today \& . \\
\end{deptext}
\depedge{1}{3}{ATT}
\depedge{2}{3}{ATT}
\depedge{3}{8}{SBJ}
\depedge{3}{9}{PU}
\depedge{5}{8}{VC}
\depedge{4}{8}{TMP}
\depedge{6}{8}{PC}
\depedge{7}{8}{PC}
\end{dependency}

\end{document}

enter image description here

I have read the tikz-dependency manual, and add the parameter 'edge horizontal padding', but the resulting picture is the same.

Is there a way to prevent the default arc combination?

share|improve this question

migrated from stackoverflow.com May 25 '12 at 4:19

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 6 down vote accepted

If I understand the question correctly, you may want to use the edge start offset x and edge end offset x options. They are available since tikz-dependency v1.1 and documented on page 16 of the manual. If you apply them at the depedge level, they can shift horizontally the start/end point of each edge individually.

The example from the manual is the following:

\documentclass[12pt]{article}
\usepackage{tikz-dependency}

\begin{document}
\begin{dependency}[theme = simple]
 \begin{deptext}[column sep=1em]
  A \& hearing \& is \& scheduled \& on \& the \& issue \& today \& . \\
 \end{deptext}
 \deproot{3}{ROOT}
 \depedge{2}{1}{ATT}
 \depedge[edge start x offset=-6pt]{2}{5}{ATT}
 \depedge{3}{2}{SBJ}
 \depedge{3}{9}{PU}
 \depedge{3}{4}{VC}
 \depedge{4}{8}{TMP}
 \depedge{5}{7}{PC}
 \depedge[arc angle=50]{7}{6}{ATT}
\end{dependency}
\end{document}

Image produced by above code

share|improve this answer
    
Hi Andrew, I was aware of page 16 on the manual, but in this way, I need to manually adjust all 'wrong' edge. Is there a global switch to separate edges(edges starting or ending at same node not merged)? –  icycandy May 25 '12 at 8:22
    
@icycandy In short: no, there isn't. On the other hand, you can easily use \foreach and increase the offsets of the edges programmatically. –  masterpiga May 25 '12 at 14:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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