[pstricks] relative coordinates

Fabio Brugnara brugnara at itc.it
Wed Oct 20 11:33:40 CEST 2004


On Wed, Oct 20, 2004 at 11:00:01AM +0200, Herbert Voss wrote:
> 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}
> 

Thank you very much, Herbert.
Not surprisingly, given the source, it works perfectly!

best regards,
Fabio




More information about the PSTricks mailing list