Basically I want to create a (dashed) line between two tree edges. I tried cheating a bit and created such line manually between two hidden nodes. The problem is, I don't get them hidden! There's always a bit of space between the connecting edges and no parameter I tried seemed to help (radius, treenodesize,..).
\documentclass{minimal}
\usepackage{pstricks,auto-pst-pdf}
\usepackage{pst-tree}
\newcommand{\terminal}[1]{\TR{\boldsymbol{#1}}}
\newcommand{\nonterminal}[1]{\TR{#1}}
\newcommand{\emptyword}{\TR{\epsilon}}
\newcommand{\derivationtree}[1]
{
\begin{postscript}
$ \pstree[treemode=R,nodesep=2pt,treesep=0.4cm,levelsep=1.5cm]{\TR{S}}{#1} $
\end{postscript}
}
\begin{document}
\derivationtree{
\pstree{\nonterminal{M_1}}
{
\pstree{\Tr[name=m1]{}}
{
\terminal{(}
}
}
\pstree[levelsep=1cm]{\nonterminal{S}}
{
\emptyword
}
\pstree{\nonterminal{M_2}}
{
\pstree{\Tr[name=m2]{}}
{
\terminal{)}
}
}
\ncline[linestyle=dashed]{m1}{m2}
}
\end{document}
