[pstricks] A bug in saveNodeCoors
Donut E. Knot
the.counterterrorist at yahoo.com
Mon Jan 27 09:26:58 CET 2014
Hi folks,
According to Christoph in his answer http://tex.stackexchange.com/a/156100/19356, there is a bug in saveNodeCoors that can be fixed as follows.
\documentclass[preview,border=1cm]{standalone}
\usepackage{pst-tools}
\usepackage{pst-node}
\makeatletter
% the following is the definition from pst-node.tex v 1.30, with the mentioned changes
\def\pst at newnode#1#2#3#4{%
\pst at killglue
\leavevmode
\pst at getnode{#1}\pst at thenode
\pst at Verb{
\ifPst at saveNodeCoors
\ifx\relax#3\relax
0 0
\else
gsave
tx at Dict begin
STV CP T
end
#3 \tx at UserCoor
grestore
\fi
% startGlobal
% \tx at UserCoor
/N-#1.y\space exch def
/N-#1.x\space exch def
% endGlobal
\fi
\pst at nodedict
{#3}
\ifx\psk at name\relax false \else \psk at name true \fi
\pst at thenode
#2
{#4}
\tx at NewNode
end
}%
%
\global\let\psk at name\relax%
\pstree at nodehook%
\global\let\pstree at nodehook\relax}
\makeatother
\psset{saveNodeCoors}
\begin{document}
\begin{pspicture}(5,3)
\pnode(1,1){A}
\rput(0,2){\psPrintValue{N-A.x}}
\rput(0,1){\psPrintValue{N-A.y}}
%
\nodexn{(1,1)}{B}
\rput(2,2){\psPrintValue{N-B.x}}
\rput(2,1){\psPrintValue{N-B.y}}
%
\pnode(A){C}
\rput(4,2){\psPrintValue{N-C.x}}
\rput(4,1){\psPrintValue{N-C.y}}
\end{pspicture}
\end{document}
Hopefully the PSTricks maintainers consider this patch whether or not it should be implemented in the next update of pstricks.tex.
Thank you in advance.
Code Mocker
(http://tex.stackexchange.com/users/19356)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20140127/4a2a4b80/attachment.html>
More information about the PSTricks
mailing list