diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-09 16:33:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-09 16:33:31 +0000 |
commit | ca6438c53266207afc490d67c130e337b0816cb7 (patch) | |
tree | bba9558c02b74879d6f07f3eee68bae1df1a05ee | |
parent | d6730e96b1acc94ef3a26f9079e57099be823dff (diff) |
pst-node (9apr13)
git-svn-id: svn://tug.org/texlive/trunk@29789 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-node/Changes | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf | bin | 541874 -> 549803 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex | 27 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-node/pst-node.pro | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-node/pst-node.tex | 52 |
5 files changed, 76 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-node/Changes b/Master/texmf-dist/doc/generic/pst-node/Changes index 81aa8b26bdf..67571dede54 100644 --- a/Master/texmf-dist/doc/generic/pst-node/Changes +++ b/Master/texmf-dist/doc/generic/pst-node/Changes @@ -1,4 +1,6 @@ ----- pst-node.tex +1.26 2013-04-09 - added macros \psncurve and \psnccurve + for a sequence of nodes created by \curvepnodes 1.25 2012-09-21 - Global node coordinates only with saveNodeCoors 1.24 2012-09-18 - fix introduced bug with \pst@thenode diff --git a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf Binary files differindex 7cc3ed88654..db2b58daec7 100644 --- a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex index be3f7a11758..a087989dc8a 100644 --- a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex @@ -1,4 +1,4 @@ -%% $Id: pst-node-doc.tex 707 2012-09-21 14:17:30Z herbert $ +%% $Id: pst-node-doc.tex 765 2013-04-09 15:32:28Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside]{pst-doc} \listfiles @@ -2191,6 +2191,31 @@ turn a list of coordinates into a node sequence P0 P1 ... \end{LTXexample} \vspace{2pc} +\begin{BDef} +\Lcs{psncurve}\OptArgs\Largb{arrows}\Largr{coors}\Largb{name} +\end{BDef} + for example, expects that there are nodes named P3..P8, and gives the same result as +\begin{verbatim} +\pscurve[linewidth=1pt]{->}(P3)(P4)(P5)(P6)(P7)(P8) +\end{verbatim} + +\begin{LTXexample}[width=.35\textwidth] +\begin{pspicture}[showgrid=true,algebraic](-.5,-.5)(2.5,2) +\pnodes{P}(.1,.1)(1;10)(*2 {x^2/4})(0,1.4) +%defines P0..P3--now join them +\psncurve[arrowscale=2]{-D>}(0,3){P} +\end{pspicture} +\end{LTXexample} +\vspace{2pc} + +\begin{LTXexample}[width=.35\textwidth] +\begin{pspicture}[showgrid=true,algebraic](-.5,-.5)(2.5,2) +\pnodes{P}(.1,.1)(1;10)(*2 {x^2/4})(0,1.4) +%defines P0..P3--now join them +\psnccurve[arrowscale=2]{-D>}(0,3){P} +\end{pspicture} +\end{LTXexample} +\vspace{2pc} \begin{BDef} \Lcs{psLCNodeVar}\Largr{node A}\Largr{node B}\Largr{factorA,factorB}\Largb{node name} diff --git a/Master/texmf-dist/dvips/pst-node/pst-node.pro b/Master/texmf-dist/dvips/pst-node/pst-node.pro index 91c29427f55..5fccc62cffc 100644 --- a/Master/texmf-dist/dvips/pst-node/pst-node.pro +++ b/Master/texmf-dist/dvips/pst-node/pst-node.pro @@ -1,4 +1,4 @@ -% $Id: pst-node.pro 707 2012-09-21 14:17:30Z herbert $ +% $Id: pst-node.pro 765 2013-04-09 15:32:28Z herbert $ %% %% PostScript prologue for pst-node.tex. %% Version 1.14, 2012/09/18. @@ -226,10 +226,17 @@ VPosEnd } def /HPutCurve { gsave newpath /SaveLPutVar /LPutVar load def LPutVar 8 -2 roll moveto curveto flattenpath /LPutVar [ {} {} {} {} pathforall ] cvx def grestore exec /LPutVar /SaveLPutVar load def } def -/NCCoor { /AngleA yB yA sub xB xA sub Atan def /AngleB AngleA 180 add def -GetEdgeA GetEdgeB /LPutVar [ xB1 yB1 xA1 yA1 ] cvx def /LPutPos { -LPutVar LPutLine } def /HPutPos { LPutVar HPutLine } def /VPutPos { -LPutVar VPutLine } def LPutVar } def + +/NCCoor { + /AngleA yB yA sub xB xA sub Atan def + /AngleB AngleA 180 add def + GetEdgeA GetEdgeB + /LPutVar [ xB1 yB1 xA1 yA1 ] cvx def + /LPutPos { LPutVar LPutLine } def + /HPutPos { LPutVar HPutLine } def + /VPutPos { LPutVar VPutLine } def + LPutVar +} def % /NCLine { NCCoor 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 5850af583e4..e82c6b46503 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 707 2012-09-21 14:17:30Z herbert $ +% $Id: pst-node.tex 765 2013-04-09 15:32:28Z herbert $ %% BEGIN pst-node.tex %% %% Nodes with PSTricks. @@ -18,8 +18,8 @@ \ifx\PSTricksLoaded\endinput\else\input pstricks.tex \fi\relax \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{1.25} -\def\filedate{2012/09/21} +\def\fileversion{1.26} +\def\filedate{2013/04/09} \message{ v\fileversion, \filedate} % \edef\TheAtCode{\the\catcode`\@} @@ -784,6 +784,7 @@ tx@Dict begin \psline@iii pop end \def\naput@i{\pst@killglue\pst@makebox{\naput@ii{NAngle 90 add}}} \def\naput@ii#1{% \begingroup +% \addto@par{labelsep=15pt}% \use@par \if@star\pst@starbox\fi \def\psk@refangle{#1 }% @@ -1304,25 +1305,25 @@ end }}% } % \def\psDefBoxNodes#1#2{\rnode[tl]{#1:tl}{\rnode[Bl]{#1:Bl}{\rnode[tr]{#1:tr}{% - \rnode[bl]{#1:bl}{\rnode[Br]{#1:Br}{\rnode[br]{#1:br}{#2}}}}}}% - \pnode(!\psGetNodeCenter{#1:bl} +\rnode[bl]{#1:bl}{\rnode[Br]{#1:Br}{\rnode[br]{#1:br}{#2}}}}}}% +\pnode(!\psGetNodeCenter{#1:bl} \psGetNodeCenter{#1:tl} #1:bl.x #1:tl.x add 2 div #1:bl.y #1:tl.y add 2 div ){#1:Cl}% - \pnode(!\psGetNodeCenter{#1:tr} +\pnode(!\psGetNodeCenter{#1:tr} \psGetNodeCenter{#1:br} #1:tr.x #1:br.x add 2 div #1:tr.y #1:br.y add 2 div ){#1:Cr}% - \pnode(!\psGetNodeCenter{#1:Cl} +\pnode(!\psGetNodeCenter{#1:Cl} \psGetNodeCenter{#1:Cr} #1:Cl.x #1:Cr.x add 2 div #1:Cl.y #1:Cr.y add 2 div ){#1:C}% - \pnode(!\psGetNodeCenter{#1:Br} +\pnode(!\psGetNodeCenter{#1:Br} \psGetNodeCenter{#1:Bl} #1:Br.x #1:Bl.x add 2 div #1:Br.y #1:Bl.y add 2 div ){#1:BC}% - \pnode(!\psGetNodeCenter{#1:tr} +\pnode(!\psGetNodeCenter{#1:tr} \psGetNodeCenter{#1:tl} #1:tr.x #1:tl.x add 2 div #1:tr.y #1:tl.y add 2 div ){#1:tC}% - \pnode(!\psGetNodeCenter{#1:br} +\pnode(!\psGetNodeCenter{#1:br} \psGetNodeCenter{#1:bl} - #1:br.x #1:bl.x add 2 div #1:br.y #1:bl.y add 2 div ){#1:bC}} + #1:br.x #1:bl.x add 2 div #1:br.y #1:bl.y add 2 div ){#1:bC}}% % %% Author: Michael Sharpe (msharpe at ucsd.edu) % Macros defined in this file: @@ -1553,11 +1554,8 @@ end }}% \def\midAB(#1)(#2)#3{\psLCNodeVar(#1)(#2)(.5,.5){#3}} % \def\psnline{\pst@object{psnline}}%line of nodes -\def\psnline@i{\@ifnextchar({\psnline@iii}{\psnline@ii}}% -\def\psnline@ii#1{% -\addto@par{arrows=#1}% -\psnline@iii}% -\def\psnline@iii(#1,#2)#3{{% +\def\psnline@i{\pst@getarrows{\psnline@ii}} +\def\psnline@ii(#1,#2)#3{{% \pst@killglue% \use@par% \pst@cnta=#2 \relax\advance\pst@cnta by 1 @@ -1566,6 +1564,28 @@ end }}% \expandafter\psline\@tmp}% \ignorespaces}% % +\def\psncurve{\pst@object{psncurve}}%line of nodes +\def\psncurve@i{\pst@getarrows{\psncurve@ii}} +\def\psncurve@ii(#1,#2)#3{{% +\pst@killglue% +\use@par% +\pst@cnta=#2 \relax\advance\pst@cnta by 1 +\edef\@tmp{}% +\multido{\i=#1+1}{\pst@cnta}{\xdef\@tmp{\@tmp(#3\i)}}% +\expandafter\pscurve\@tmp}% +\ignorespaces}% +% +\def\psnccurve{\pst@object{psnccurve}}%line of nodes +\def\psnccurve@i{\pst@getarrows{\psnccurve@ii}} +\def\psnccurve@ii(#1,#2)#3{{% +\pst@killglue% +\use@par% +\pst@cnta=#2 \relax\advance\pst@cnta by 1 +\xdef\@tmp{}% +\multido{\i=#1+1}{\pst@cnta}{\xdef\@tmp{\@tmp(#3\i)}}% +\expandafter\psccurve\@tmp}% +\ignorespaces}% +% \def\shownode(#1){%display node user coords in console \pst@killglue% \pstVerb{% |