diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-node/pst-node.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-node/pst-node.tex | 76 |
1 files changed, 54 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-node/pst-node.tex b/Master/texmf-dist/tex/generic/pst-node/pst-node.tex index 51118e48a61..527f9139554 100644 --- a/Master/texmf-dist/tex/generic/pst-node/pst-node.tex +++ b/Master/texmf-dist/tex/generic/pst-node/pst-node.tex @@ -1,4 +1,4 @@ -% $Id: pst-node.tex 824 2013-09-17 18:19:38Z herbert $ +% $Id: pst-node.tex 893 2014-02-03 21:40:44Z herbert $ %% BEGIN pst-node.tex %% %% Nodes with PSTricks. @@ -6,7 +6,7 @@ %% This uses the header file `pst-node.pro'. %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. -%% COPYRIGHT 2009-2013 by Herbert Voss, hvoss tug.org. +%% COPYRIGHT 2009-2014 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 @@ -18,8 +18,8 @@ \ifx\PSTricksLoaded\endinput\else\input pstricks.tex \fi\relax \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{1.30} -\def\filedate{2013/09/17} +\def\fileversion{1.32} +\def\filedate{2014/02/03} \message{ v\fileversion, \filedate} % \edef\TheAtCode{\the\catcode`\@} @@ -34,6 +34,8 @@ \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{% @@ -55,8 +57,15 @@ % bug fix for xelatex, dvipdfmx uses the wrong scaling \def\tx@NewNode{/NodeScale {\ifx\pstnodescale\@undefined \else\pstnodescale \fi} def NewNode } % +\define@boolkey[psset]{pst-node}[Pst@]{showNode}[true]{}% 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]{} -\psset[pst-node]{saveNodeCoors=false} +\psset[pst-node]{saveNodeCoors=false,showNode=false,markNode=false} +% +\def\psopenNodeFile{\pstVerb{ tx@NodeDict begin %/NodeFile { + (\jobname.nodes)(w) file %} def + end }} +\def\pscloseNodeFile{\pstVerb{ tx@NodeDict begin currentfile closefile end }} % \def\pst@newnode#1#2#3#4{% \pst@killglue @@ -64,12 +73,9 @@ \pst@getnode{#1}\pst@thenode \pst@Verb{ \ifPst@saveNodeCoors - \ifx\relax#3\relax 0 0 \else #3 \tx@UserCoor \fi -% startGlobal -% \tx@UserCoor - /N-#1.y\space exch def - /N-#1.x\space exch def -% endGlobal + \ifx\relax#3\relax 0 0 \else gsave \pst@dict STV CP T end #3 \tx@UserCoor grestore \fi + /N-#1.y exch def + /N-#1.x exch def \fi \pst@nodedict {#3} @@ -77,6 +83,20 @@ \pst@thenode #2 {#4} + \ifPst@showNode + 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 aload pop exch + 20 string cvs (; ) 11 2 roll + 20 string cvs (, ) 12 2 roll % x,y + 12 array astore concatstringarray + currentfile exch writestring +% NodeFile exch writestring + \fi \tx@NewNode end }% @@ -103,12 +123,14 @@ \pst@getcoor{#2}\pst@tempB% \pst@newnode{#3}{10}{% \pst@tempA \pst@tempB 3 -1 roll add 3 1 roll add exch }{\tx@InitPnode}% + \ifPst@showNode\psdot(#3)\uput[\ifx\psk@rot\@empty0\else\psk@rot\fi]{0}(#3){#3}\fi \ignorespaces} % \def\pnode@iii{\@ifnextchar({\pnode@}{\pnode@(0,0)}} \def\pnode@(#1)#2{% \pst@@getcoor{#1}% \pst@newnode{#2}{10}{\pst@coor}{\tx@InitPnode}% + \ifPst@showNode\psdot(#2)\uput[\ifx\psk@rot\@empty0\else\psk@rot\fi]{0}(#2){#2}\fi \ignorespaces} % \def\pnodes{\@ifnextchar[{\pnodes@i}{\pnodes@i[0,0]}} @@ -119,6 +141,7 @@ } % \def\tx@InitCnode{InitCnode } +% \def\cnode{\pst@object{cnode}} \def\cnode@i{\@ifnextchar({\cnode@ii}{\cnode@ii(0,0)}} \def\cnode@ii(#1)#2#3{% @@ -177,6 +200,7 @@ \pst@number\pst@dimb \pst@number\pslinewidth \psk@dimen .5 sub mul sub }% r {\tx@InitCnode}% \global\let\pst@nodehook\relax} +% \def\circlenode{\pst@object{circlenode}} \def\circlenode@i#1{\pst@makebox{\circlenode@ii{#1}}} \def\circlenode@ii#1{% @@ -192,6 +216,7 @@ \ifPst@nodealign\pst@nodealign\fi \box\pst@hbox \endgroup} +% \def\Circlenode{\pst@object{Circlenode}} \def\Circlenode@i#1{\pst@makebox{\Circlenode@ii{#1}}} \def\Circlenode@ii#1{% @@ -217,8 +242,7 @@ \def\psnode{\pst@object{psnode}} \def\psnode@i{\@ifnextchar(\psnode@ii{\psnode@ii(0,0)}} \def\psnode@ii(#1)#2#3{% #1: coordinates, #2: node name, #3 contents - \rput(#1){\rnode{#2}{#3}}% -} + \rput(#1){\rnode{#2}{#3}}} % \def\rnode{\@ifnextchar[{\rnode@i}{\def\pst@par{}\rnode@ii}} \def\rnode@i[#1]{\def\pst@par{ref=#1}\rnode@ii} @@ -295,6 +319,7 @@ \ifPst@nodealign\lower\pst@dimb\fi \box\pst@hbox \endgroup} +% \def\tx@TriNodePos{TriNodePos } \def\tx@InitTriNode{InitTriNode } % @@ -358,17 +383,17 @@ \def\dotnode{\pst@object{dotnode}} \def\dotnode@i{\@ifnextchar({\dotnode@ii}{\dotnode@ii(\z@,\z@)}} \def\dotnode@ii(#1)#2{% - \leavevmode% + \leavevmode \hbox{% - \use@par% + \use@par \pst@@getcoor{#1}% - \pst@getdotsize% - \pstree@nodehook% - \ifPst@nodealign% - \pst@dima=\pst@dimg% - \kern\pst@dima% - \vrule width\z@ height \pst@dimh depth \pst@dimh% - \fi% + \pst@getdotsize + \pstree@nodehook + \ifPst@nodealign + \pst@dima=\pst@dimg + \kern\pst@dima + \vrule width\z@ height \pst@dimh depth \pst@dimh + \fi \pst@newnode{#2}{14}{}{ \pst@coor /Y exch def /X exch def @@ -377,8 +402,15 @@ /NodePos { \tx@OvalNodePos } def}% \psdot@ii(#1)% \ifPst@nodealign\kern\pst@dima\fi}% + \ifPst@markNode\uput[\ifx\psk@rot\@empty0\else\psk@rot\fi]{0}(#2){#2}\fi \ignorespaces} % +\def\dotnodes{\pst@object{dotnodes}} +\def\dotnodes@i{\use@par\dotnodes@ii} +\def\dotnodes@ii(#1)#2{% + \dotnode(#1){#2}% + \@ifnextchar(\dotnodes@ii{\def\pst@par{}}} +% \define@key[psset]{pst-node}{framesize}{\pst@expandafter\psset@@framesize{#1} \@nil} \def\psset@@framesize#1 #2\@nil{% \pssetlength\pst@dimg{#1}% |