1 ?÷% $Id: pst-node.tex 438 2022-01-31 17:45:26Z herbert $ %% %% BEGIN pst-node.tex %% %% Nodes with PSTricks. %% This uses the header file `pst-node.pro'. %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. %% COPYRIGHT 2009- by Herbert Voss, hvoss@tug.org. %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN %% archives in directory macros/latex/base/lppl.txt. %% % \csname PSTnodesLoaded\endcsname \let\PSTnodesLoaded\endinput \ifx\PSTricksLoaded\endinput\else\input pstricks.tex \fi\relax \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % \def\fileversion{1.43} \def\filedate{2022/01/31} \message{ v\fileversion, \filedate} % \edef\TheAtCode{\the\catcode`\@} \catcode`\@=11 % \pstheader{pst-node.pro} \pst@addfams{pst-node} % \SpecialCoor % %%%%%%%%%% compatibility stuff \define@boolkey[psset]{pst-node}[Pst@]{trueAngle}[true]{} \psset[pst-node]{trueAngle=false} %%%%%%%%%% compatibility stuff \define@boolkey[psset]{pst-node}[Pst@]{storeNodeInfo}[true]{} \psset[pst-node]{storeNodeInfo=false} % \def\pst@nodedict{tx@NodeDict begin } \def\pst@zapspace#1 #2{% #1% \ifx#2\@empty\else\expandafter\pst@zapspace\fi #2} % \def\pst@getnode#1#2{\pst@expandafter\pst@@getnode{#1},,\@nil#2} \def\pst@@getnode#1,#2,#3\@nil#4{% \ifx\@empty#3\@empty \edef#4{/N@\pst@zapspace#1 \@empty\space}% \else \pst@cntg=#1\relax \pst@cnth=#2\relax \edef#4{/N@M-\ifnum\psmatrixcnt=\z@ 1\else\the\psmatrixcnt\fi -\the\pst@cntg-\the\pst@cnth\space}% \fi} % % bug fix for xelatex, dvipdfmx uses the wrong scaling \def\tx@NewNode{/NodeScale {\ifx\pstnodescale\@undefined \else\pstnodescale \fi} def NewNode } % \def\psopenNodeFile{% \pst@Verb{ %globaldict begin % tx@NodeDict begin (\jobname.nodes) (w) file /NodeFile exch def % end }} % \def\pscloseNodeFile{\pstVerb{ tx@NodeDict begin NodeFile closefile end }} % \define@boolkey[psset]{pst-node}[Pst@]{showNode}[true]{\ifPst@showNode\psopenNodeFile\fi}% write coors into the logfile \define@boolkey[psset]{pst-node}[Pst@]{markNode}[true]{}% makr the node with its name \define@boolkey[psset]{pst-node}[Pst@]{saveNodeCoors}[true]{} \define@key[psset]{pst-node}{NodeCoorPrefix}[]{\def\psk@NodeCoorPrefix{#1}}% if empty it is N-.x|y \psset[pst-node]{saveNodeCoors=false,showNode=false,markNode=false,NodeCoorPrefix=}% x|y> % \def\pst@newnode#1#2#3#4{% name type coors initcode \pst@killglue \leavevmode \pst@getnode{#1}\pst@thenode \pst@Verb{ \ifPst@saveNodeCoors \ifx\relax#3\relax 0 0 \else gsave \pst@dict STV CP T end #3 \tx@UserCoor grestore \fi \if$\psk@NodeCoorPrefix$ /N-#1.y exch def /N-#1.x exch def \else /\psk@NodeCoorPrefix#1y exch def /\psk@NodeCoorPrefix#1x exch def \fi \fi \pst@nodedict {#3} \ifx\psk@name\relax false \else \psk@name true \fi \pst@thenode #2 {#4} \ifPst@showNode exch dup /NodeType ED exch NodeType 10 eq { % pnode type 5 copy cvlit aload pop 20 string cvs (; ) 6 2 roll % InitPnode 20 string cvs (; ) 7 2 roll % type 20 string cvs (; ) 8 2 roll %/N@Name 20 string cvs (; ) 9 2 roll % true/false cvlit dup length 2 eq { aload pop exch 20 string cvs (; ) 11 2 roll 20 string cvs (, ) 12 2 roll % x,y (\string\n) % add newline 13 array astore concatstringarray } { 255 string cvs (; ) 10 2 roll (\string\n) % add newline 11 array astore concatstringarray } ifelse NodeFile exch writestring } if NodeType 14 eq { % dotnode 5 copy /@@temp ED % gsave @@temp % to get X Y 4 -1 roll cvlit pop ( OvalNodePos ) (; ) 5 2 roll 20 string cvs (; ) 6 2 roll % type 20 string cvs (; ) 7 2 roll %/N@Name 20 string cvs (; ) 8 2 roll % true/false Y 20 string cvs (; ) 10 2 roll X 20 string cvs (, ) 12 2 roll (\string\n) % add newline 13 array astore concatstri