[pstricks] Re: trees with large nodes

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Wed Jan 5 16:16:49 CET 2005


Hendrik wrote:

> Yes this works, but now I end up specifying a levelsep for every single 
> subtree, to get my trees reasonably compact.  Isn't there a way that 
> pstree takes the size of the nodes into account?  If I look at the 
> fourth example on http://www.pstricks.de/pst-tree/pst-tree.phtml, it 
> seems as if it does it automatically?  Or would it be better to use 
> psmatrix along with pst-node for this?

This maybe another option, put this is your decision.

HErbert


\documentclass[english,11pt]{article}

\usepackage{pstricks}
\usepackage{pst-tree}
\usepackage{avm}

\begin{document}

\newsavebox\DP
\sbox\DP{\begin{avm}
   \[\emph{phrase}\\
      head & \@4\[\emph{noun}\\
       agr & \@2
   \]\\
   val & \[\emph{val-cat}\\
              comps & itr\\
           spr & $+$ \]
\]
\end{avm}}
\newlength\HBox\HBox=\ht\DP
\advance\HBox by \dp\DP

and I want to use them inside \verb+\pstree+ like this:

\newpsobject{knoop}{TR}{ref=b}
\psset{nodesep=3pt, levelsep=1.4\HBox}
\pstree{\knoop{\usebox\DP}}{%
   \pstree{\knoop{\usebox\DP}}{%
        \pstree{\knoop{\usebox\DP}}{%
             \knoop{The}%
}}}
\end{document}


-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list