[pstricks] relative coordinates

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Wed Oct 20 11:00:01 CEST 2004


Fabio Brugnara sagte:

> The example below shows what I mean. The result can be achieved by
> first
 placing 'pivot' nodes near the vertices, and then using their
> coordinates in
 \pspolygon. But is there a way to achieve the same using
> directly relative
 reference to the nodes? In the example there is an
> attempt, but it's not
 working...

use Xnodesep together with the offset.
And by the way: you shouldn't use pstcol, the new pstricks.sty
does a better job here.

Herbert

\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{pst-tree}
\SpecialCoor

\begin{document}

\pstree{\TR[name=a]{a}}{
 \TR[name=b]{b}
 \TR[name=c]{c}
}%
\pspolygon(a|[offset=1]a)([offset=1,Xnodesep=1]c|[offset=-1]c)%
          ([offset=-1,Xnodesep=-1]b|[offset=-1]b)

\end{document}



-- 
Dr.-Ing Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE






More information about the PSTricks mailing list