[pstricks] Node Coordinates

Herbert Voss LaTeX at zedat.fu-berlin.de
Tue Jun 6 15:27:57 CEST 2006

Douglas Reid wrote:

> However, I am still wondering how to recover the original x, y 
> coordinates from the node name.
 > Surely, PSTricks stores the data that defines nodes in a form that is
 > accessible to the programme?

The nodes are defined on PostScript side, it is not possible to
get the coordinates back into TeX. But you can write some
special code which does everything in PS.



% #1 text origin
% #2 node A
% #3 node B
   \pst at getcoor{#1}\pst at tempA
   \addto at pscode{
     tx at NodeDict begin
        gsave \psk at PSfont findfont \psk at fontscale scalefont setfont
       /N@#2 load GetCenter /yA ED /xA ED
       /N@#3 load GetCenter /yB ED /xB ED
       \pst at tempA\space moveto
       yB yA sub \pst at number\psyunit div
       xB xA sub \pst at number\psxunit div Pyth
       \psk at valuewidth string cvs show (cm) show grestore
   \use at pscode%





> I have been spending a lot of time playing about with nodes.  There are 
> various parameters the use of which is unclear.  For example, there is 
> Xnodesep and Ynodesep.

they are undocumented and do not work in any case as expected.
Here is another example:


More information about the PSTricks mailing list