# [pstricks] trees: putting objects on tree branches

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon Sep 15 18:59:21 CEST 2008

MA V schrieb:

> How can I:
> 1) draw the triangle in such a way that it's orientation is consistent (i.e. the basis of the triangle is parallel) to the line connecting nodes 0 and 1
> 2) write something right below the triangle

\documentclass[a4paper]{article}
\usepackage{pst-tree}

\newcommand{\MyNode}[2][]{\Tcircle[#1]{\makebox[1em]{#2}}}
\pagestyle{empty}

\begin{document}

\pstree{\MyNode[name=0]{0}}
{\pstree{\MyNode[name=1]{1}}
{\MyNode{2}
\MyNode{3}}
\MyNode[name=4]{4}}
\ncline[linecolor=red]{1}{4}
\ncline[linestyle=none]{0}{4}\ncput*{$\times$}
\ncline[linestyle=none]{0}{1}%
\ncput*[nrot=:D]{\pspolygon*(-0.3,0)(0,0.5)(0.3,0)}
\naput[nrot=:D]{foo}

\end{document}

_Everything_ is declared in the docs!
http://www.dante.de/CTAN/graphics/pstricks/base/doc/pst-docfull.pdf

Herbert