diff options
Diffstat (limited to 'graphics/pstricks/contrib/pst-node/tex/pst-node.tex')
-rw-r--r-- | graphics/pstricks/contrib/pst-node/tex/pst-node.tex | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/graphics/pstricks/contrib/pst-node/tex/pst-node.tex b/graphics/pstricks/contrib/pst-node/tex/pst-node.tex index 8e618ef220..a653d76eea 100644 --- a/graphics/pstricks/contrib/pst-node/tex/pst-node.tex +++ b/graphics/pstricks/contrib/pst-node/tex/pst-node.tex @@ -1,4 +1,4 @@ -% $Id: pst-node.tex 654 2022-11-21 06:19:14Z herbert $ +% $Id: pst-node.tex 918 2024-07-10 17:41:55Z herbert $ %% %% BEGIN pst-node.tex %% @@ -18,8 +18,8 @@ \ifx\PSTricksLoaded\endinput\else\input pstricks.tex \fi\relax \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{1.44} -\def\filedate{2024/07/04} +\def\fileversion{1.45} +\def\filedate{2024/07/10} \message{ v\fileversion, \filedate} % \edef\TheAtCode{\the\catcode`\@} @@ -1386,8 +1386,8 @@ tx@NodeDict \pst@tempg known /dy YB YA sub def /angle dy dx Atan def /linelength \pst@number\pst@dimb \pst@number\psunit div def - XA linelength angle cos mul add YA linelength angle sin mul add ){#4}% -} + XA linelength angle cos mul add YA linelength angle sin mul add ){#4}} +% \def\psRelNode{\pst@object{psRelNode}} \def\psRelNode@i(#1)(#2)#3#4{{% A - B - factor - node name \use@par @@ -1537,8 +1537,7 @@ tx@NodeDict \pst@tempg known \def\trim@ #1{\trim@@ @#1 @ #1 @ @@}% \def\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}% \def\unbrace#1{#1}% -\unbrace{\def\trim@@@ #1 } #2@#3{\expandafter\def% - \expandafter #3\expandafter {#1}}% +\unbrace{\def\trim@@@ #1 } #2@#3{\expandafter\def\expandafter #3\expandafter {#1}}% % \def\hasparen#1(#2\@nil{%check if expression contains a (--call with \hasparen#1(\@nil \ifx\relax#2\relax \@parenfalse \else \@parentrue\fi}% @@ -1577,24 +1576,28 @@ tx@NodeDict \pst@tempg known \expandafter\testAlg\my@tempA|\@nil\my@next {#1}{#2}{#3}} % \def\psparnode#1#2#3{% -% #1=t value, #2=x(t) y(t) in PS form,#3=node name, - \pnode(! /t #1 def #2){#3}% - \pnode(! /t #1 dup abs 1 lt {0.001 sub}{dup 0 gt {0.999} {1.001} ifelse mul} ifelse def - #2 - /t #1 dup abs 1 lt {0.001 add}{dup 0 lt {0.999} {1.001} ifelse mul} ifelse def - #2 3 -1 roll sub 3 1 roll exch sub 2 copy exch dup mul exch dup mul add sqrt - dup 3 1 roll div 3 1 roll div){#3tang}% unit tangent vector at t -}% - + % #1=t value, #2=x(t) y(t) in PS form, #3=node name, + % also returns unit tangent vector at t with node #3tang + \pnode(! /t #1 def #2){#3}% + \pnode(! /t #1 dup abs 1 lt {0.001 sub} {dup 0 gt {0.999} {1.001} ifelse mul} ifelse def + #2 + /t #1 dup abs 1 lt {0.001 add} {dup 0 lt {0.999} {1.001} ifelse mul} ifelse def + #2 + 3 -1 roll sub 3 1 roll exch sub 2 copy exch dup mul exch dup mul add sqrt + dup 3 1 roll div 3 1 roll div){#3tang}% unit tangent vector at t +}% +% \def\algparnode#1#2#3{% -% #1=t value, #2=x(t) | y(t) in alg form,#3=node name, - \pstVerb{tx@Dict begin /Func (#2) AlgParser cvx def end } - \pnode(!/t #1 def Func){#3} - \pnode(!/t #1 .001 sub def - Func - /t #1 dup abs 1 lt {0.001 add}{dup 0 lt {0.999} {1.001} ifelse mul } ifelse def - Func 3 -1 roll sub 3 1 roll exch sub 2 copy exch dup mul exch dup mul add sqrt - dup 3 1 roll div 3 1 roll div){#3tang}% unit tangent vector at t +% #1=t value, #2=x(t) | y(t) in alg form, #3=node name, +% also returns unit tangent vector at t with node #3tang + \pstVerb{tx@Dict begin /Func (#2) AlgParser cvx def end }% + \pnode(! /t #1 def Func){#3}% + \pnode(! /t #1 dup abs 1 lt {0.001 sub} {dup 0 gt {0.999} {1.001} ifelse mul} ifelse def + Func + /t #1 dup abs 1 lt {0.001 add}{dup 0 lt {0.999} {1.001} ifelse mul } ifelse def + Func + 3 -1 roll sub 3 1 roll exch sub 2 copy exch dup mul exch dup mul add sqrt + dup 3 1 roll div 3 1 roll div){#3tang}% unit tangent vector at t }% % \def\nodex#1{% @@ -1635,8 +1638,7 @@ tx@NodeDict \pst@tempg known \nodexn{#3}{@TMP@a}% \AplusB(#1)(@TMP@a){@TMP@B}% \psline(@TMP@A)(@TMP@B)% -}% -\ignorespaces}% +}\ignorespaces}% % \def\curvepnodes{\pst@object{curvepnodes}} \def\curvepnodes@i#1#2#3#4{{%optional [plotpoints=xx] @@ -1686,7 +1688,7 @@ tx@NodeDict \pst@tempg known \else \multido{\i=0+1}{\pst@cntc}{\pnode(!/x \pst@number\pst@dima\space def x #3){#4\i}% \advance\pst@dima \pst@dimb}% -\fi% +\fi \expandafter\xdef \csname \PST@root nodecount\endcsname {\the\pst@cnta}% \ifnum\Pst@Debug>0 \typeout{Created nodes #40 .. #4\the\pst@cnta}\fi% }\ignorespaces}% |