# Specify location from which a line starts in pstricks

I have a problem with the following code. The lines from h6 and h7 are supposed to start right below h6 and h7 and not at the left of h6 and h7. This worked with tree-dvips but pstricks seems to decide differently about the position where the line starts. Is it possible to force pstricks to take bottom instead of bottom left?

\documentclass{minimal}
\usepackage{pstricks,pst-node}

\psset{nodesep=5pt} %,linewidth=0.8pt,arrowscale=2}
\psset{linewidth=0.5pt}
\begin{document}

\begin{tabular}{@{}ccc@{}}
& \rnode{h0}{h0}                & \\[8ex]
\rnode{h1}{h1:every(x, \rnode{h1h3}{h2}, \rnode{h1h2}{h3})}      &                              & \rnode{h5}{h5:some(y, \rnode{h5h7}{h6}, \rnode{h5h6}{h7})}\\[8ex]
\rnode{h3}{h2:dog(x)}           & ~~~~~\rnode{h7}{h6:cat(y)}         & \\[6ex]
& \rnode{h4}{h4:chase(e, x, y)}\\
\end{tabular}
{\psset{linestyle=dashed}%
\ncline{h0}{h5}%
\ncline{h0}{h1}%
\ncline{h5h6}{h4}%
\ncline{h1h2}{h4}%
}%
\ncline{h1h3}{h3}%
\ncline[angleA=-90]{h5h7}{h7}%

\end{document}

-

## 1 Answer

The default location for the anchor in an \rnode is in the centre of the node. With the notation \rnode[<refpoint>]{<name>}{<stuff>} (see the pstricks documentation, section 30 Nodes, p 59) you can specify an alternative <refpoint>, say [b] (section 24 Placing and rotating whatever, p 42):

I've also decreased the nodesepA value (the node separation from the origin node) to 3pt to make it clear that it's pointing to the correct node:

\documentclass{minimal}
\usepackage{pstricks,pst-node}% http://ctan.org/pkg/{pstricks,pst-node}

\psset{nodesep=5pt,linewidth=0.5pt}
\begin{document}

\begin{tabular}{@{}ccc@{}}
& \rnode{h0}{h0} & \\[8ex]
\rnode{h1}{h1:every(x, \rnode{h1h3}{h2}, \rnode{h1h2}{h3})} & & \rnode{h5}{h5:some(y, \rnode[b]{h5h7}{h6}, \rnode[b]{h5h6}{h7})} \\[8ex]
\rnode{h3}{h2:dog(x)} & ~~~~~\rnode{h7}{h6:cat(y)} & \\[6ex]
& \rnode{h4}{h4:chase(e, x, y)} \\
\end{tabular}
{\psset{linestyle=dashed}%
\ncline{h0}{h5}%
\ncline{h0}{h1}%
\ncline[nodesepA=3pt]{h5h6}{h4}%
\ncline{h1h2}{h4}%
}%
\ncline{h1h3}{h3}%
\ncline[nodesepA=3pt]{h5h7}{h7}%

\end{document}​

-