[pstricks] Node Coordinates

Herbert Voss LaTeX at zedat.fu-berlin.de
Tue Jun 6 07:58:54 CEST 2006


Douglas Reid wrote:

> Question 1:
> Given a node name, how can I subsequently determine the coordinates x and y?
>  
> As the simplest example, if I have previously defined node A as a point node
> \pnode(10,20){A}
> how can a macro (command) that uses node A, recover the original 
> coordinates x and y?
>  
> There are various applications for which this would be useful.

you have an implicit access to the x/y-coordinates

Herbert

\listfiles
\documentclass[12pt]{article}
\usepackage{pst-node}
\SpecialCoor

\begin{document}

\pnode(0,0){A}\pnode(3,4){B}
\psline[linecolor=red]{->}(A)(B|A)
\psline[linecolor=green]{->}(B|A)(B)
\psline[linecolor=blue]{->}(B)(A)
\psline[linecolor=cyan]{->}(A)(A|B)
\psline[linecolor=magenta]{->}(A|B)(B)
\psline[linecolor=gray]{->}(A|B)(B|A)
\psline{|-|}(A|0,-1)(B|0,-1)

\end{document}





More information about the PSTricks mailing list