diff options
author | Karl Berry <karl@freefriends.org> | 2007-07-16 16:52:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-07-16 16:52:35 +0000 |
commit | d4c718b1f4d552c20d219b36b287015714be74b1 (patch) | |
tree | 13c83d4526144a9421124239228db617322998fd /Master/texmf-dist/tex | |
parent | 8704eddd45c69d9cca614273c6e2d6829ef3f669 (diff) |
pstricks-add 2.86 (25jun07)
git-svn-id: svn://tug.org/texlive/trunk@4630 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 218 |
1 files changed, 149 insertions, 69 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index faffa4cb2e6..e46fd28383e 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -26,8 +26,8 @@ \ifx\MultidoLoaded\endinput\else \input multido \fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{2.85} -\def\filedate{2007/04/01} +\def\fileversion{2.86} +\def\filedate{2007/06/23} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -154,6 +154,9 @@ } % %--------------------------------------- small stuff ------------------------------- +\define@boolkey[psset]{pstricks-add}[Pst@]{CMYK}[true]{} +\psset[pstricks-add]{CMYK=true} +% % transalpha needs a run through latex -> dvips -> ps2pdf14(!) % and view with Acrobat >= 5.0 % use transpalpha=<mumber> to the the opacity level @@ -176,6 +179,14 @@ \defineTColor{TGreen}{green} \defineTColor{TBlue}{blue} % +\define@key[psset]{pstricks-add}{fsAngle}{\pst@getangle{#1}\pst@fsAngle } +\define@key[psset]{pstricks-add}{fsOrigin}{% + \pst@@getcoor{#1}\edef\pst@fsOrigin{\pst@coor T }} +\psset[pstricks-add]{fsOrigin={0,0},fsAngle=137.50775} +% +\def\psfs@spiral{\pst@fill{\pst@fsOrigin \pst@usecolor\psfillcolor clip newpath +0 .1 500 { dup dup sqrt 4 div 0 360 arc fill \pst@fsAngle rotate } for }} +% \def\rmultiput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\rmultiput@i}{\rmultiput@i[]}}} \def\rmultiput@i[#1]{\begingroup\psset{#1}\rmultiput@ii} \def\rmultiput@ii#1{\def\@rmultiputArg{#1}% @@ -183,8 +194,7 @@ \def\rmultiput@iii(#1){% \pst@killglue% \if@star\rput*(#1){\@rmultiputArg} - \else\rput(#1){\@rmultiputArg}% - \fi + \else\rput(#1){\@rmultiputArg}\fi \@ifnextchar({\rmultiput@iii}{\endgroup}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -193,7 +203,7 @@ %%% par la rotation de centre (x,y) %%% %%% et d'angle a. %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\def\psrotate{\pst@object{psrotate}} % idea from Jean-Ce Charpentier +\def\psrotate{\pst@object{psrotate}} % idea from Jean-Ce Charpentier \def\psrotate@i(#1,#2)#3#4{% \pst@killglue \begin@SpecialObj% @@ -219,18 +229,18 @@ % modification 04-08-07: \pst@cntm0 \def\next##1 ##2\relax{% - \expandafter\ifnum\psk@maxdashes>\pst@cntm\relax% 04-08-07 - \edef\@tempa{##1}% - \ifx\@tempa\@empty\else% gobble leading spaces - \pssetlength\pst@dimc{##1}% + \expandafter\ifnum\psk@maxdashes>\pst@cntm\relax % 04-08-07 + \edef\@tempa{##1}% + \ifx\@tempa\@empty\else% gobble leading spaces + \pssetlength\pst@dimc{##1}% \advance\pst@cntm by 1 - \edef\psk@dash{\psk@dash\space\pst@number\pst@dimc}% - \fi% - \edef\@tempa{##2}% - \ifx\@tempa\@empty\else% detect end - \ifx\@tempa\space\else% gobble trailing spaces - \next##2\relax% - \fi\fi% + \edef\psk@dash{\psk@dash\space\pst@number\pst@dimc}% + \fi% + \edef\@tempa{##2}% + \ifx\@tempa\@empty\else% detect end + \ifx\@tempa\space\else% gobble trailing spaces + \next##2\relax% + \fi\fi% \else% 04-08-07 \@pstrickserr{Number of dashes > \psk@maxdashes. Increasing 'maxdashes' might work.}\@ehpa% 04-08-07 @@ -276,7 +286,6 @@ %% TN end patch; Date (YY-MM-DD): 04-07-17; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% \define@key[psset]{pstricks-add}{intSeparator}{\def\psk@intSeparator{#1}} %\psset{intSeparator={,}} % @@ -319,22 +328,21 @@ % \def\@@rput@iv(#1){\pst@killglue\pst@makebox{\@@rput@v{#1}}} \def\@@rput@v#1{% - \begingroup - \use@par - \pst@makesmall\pst@hbox - \pst@Verb{% - Alpha 90 sub \pst@number\pst@braceWidth 0 lt {180 add} if - \ifx\psk@rot\@empty\else\psk@rot add \fi - /rotAngle exch def + \begingroup% + \use@par% + \pst@makesmall\pst@hbox% + \pst@Verb{ + Alpha 90 sub \pst@number\pst@braceWidth 0 lt { 180 add } if + \ifx\psk@rot\@empty\else\psk@rot\space add \fi + /rotAngle ED }% \setbox\pst@hbox=\hbox{% - \pst@Verb{rotAngle \tx@RotBegin}% - \box\pst@hbox\pst@Verb{\tx@RotEnd}% + \pst@Verb{ rotAngle \tx@RotBegin }% + \box\pst@hbox\pst@Verb{ \tx@RotEnd }% }% - \psput@{#1}\pst@hbox - \endgroup - \ignorespaces% -} + \psput@{#1}\pst@hbox% + \endgroup% + \ignorespaces} % \def\psbrace{\pst@object{psbrace}} \def\psbrace@i(#1)(#2)#3{% @@ -377,6 +385,79 @@ % the original table % \def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-],)-(,]-[,|>-<|} % +% v : Vee arrow (inside) v,V,f and F by Christophe FOUREY +% V : Vee arrow (outside) +% f : Filled vee arrow (inside) +% F : Filled vee arrow (outside) +\edef\pst@arrowtable{\pst@arrowtable,v-v,V-V,f-f,F-F,t-t,T-T} + +% Vee arrow +\define@key[psset]{pstricks-add}{veearrowlength}{\pst@getlength{#1}\psk@veearrowlength} +\psset[pstricks-add]{veearrowlength=3mm} % default projected length +\define@key[psset]{pstricks-add}{veearrowangle}{\pst@getangle{#1}\psk@veearrowangle} +\psset[pstricks-add]{veearrowangle=30} % default angle +\define@key[psset]{pstricks-add}{veearrowlinewidth}{\pst@getlength{#1}\psk@veearrowlinewidth} +\psset[pstricks-add]{veearrowlinewidth=.35mm} % default vee arrow line width + +% Filled vee arrow +\define@key[psset]{pstricks-add}{filledveearrowlength}{\pst@getlength{#1}\psk@filledveearrowlength} +\psset[pstricks-add]{filledveearrowlength=3mm} % default projected length +\define@key[psset]{pstricks-add}{filledveearrowangle}{\pst@getangle{#1}\psk@filledveearrowangle} +\psset[pstricks-add]{filledveearrowangle=15} % default angle +\define@key[psset]{pstricks-add}{filledveearrowlinewidth}{\pst@getlength{#1}\psk@filledveearrowlinewidth} +\psset[pstricks-add]{filledveearrowlinewidth=.35mm} % default vee arrow line width + +\pst@def{VeeArrow}<% + 1 setlinecap % round caps + 1 setlinejoin % round join + setlinewidth % vee arrow line width + /y ED % projected length + 2 div /a ED % angle (divide by 2) + /t ED % false = inside, true = outside + a sin a cos div y mul /x ED % perpendicular length : x=tan(a).y + t { 1 -1 scale } if % if outside : symmetry + x neg y moveto % point #1 + 0 0 L % point #2 + x y L % point #3 + {closepath gsave fill grestore} if % if filled : close and fill + stroke % draw line + 0 t {y 2 mul} {0} ifelse moveto> % if outside : twice longer line + +% VeeArrow : filled? outside? (total) angle (projected) length (arrow) line width + +\@namedef{psas@v}{% + false false \psk@veearrowangle \psk@veearrowlength \psk@veearrowlinewidth \tx@VeeArrow} +\@namedef{psas@V}{% + false true \psk@veearrowangle \psk@veearrowlength \psk@veearrowlinewidth \tx@VeeArrow} +\@namedef{psas@f}{% + true false \psk@filledveearrowangle \psk@filledveearrowlength \psk@filledveearrowlinewidth \tx@VeeArrow} +\@namedef{psas@F}{% + true true \psk@filledveearrowangle \psk@filledveearrowlength \psk@filledveearrowlinewidth \tx@VeeArrow} + +% And An another arrowhead +% architectural tick / oblique arrow + +% Tick arrow +\define@key[psset]{pstricks-add}{tickarrowlength}{\pst@getlength{#1}\psk@tickarrowlength} +\psset[pstricks-add]{tickarrowlength=1.5mm} % default projected length +\define@key[psset]{pstricks-add}{tickarrowlinewidth}{\pst@getlength{#1}\psk@tickarrowlinewidth} +\psset[pstricks-add]{tickarrowlinewidth=.35mm} % default tick arrow line width + +\pst@def{TickArrow}<% + 1 setlinecap % round caps + 1 setlinejoin % round join + setlinewidth % tick line width + /y ED % projected length + /t ED % false = normal, true = reversed + t { 1 -1 scale } if % if reversed : symmetry + y neg y moveto % point #1 + y y neg L % point #2 + stroke % draw line + 0 0 moveto> % origin + +\@namedef{psas@t}{ false \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow } +\@namedef{psas@T}{ true \psk@tickarrowlength \psk@tickarrowlinewidth \tx@TickArrow } +% % HookLeft/RightArrow \newdimen\pshooklength \newdimen\pshookwidth @@ -524,15 +605,14 @@ % % Modified version of \begin@ClosedObj \def\begin@ClosedObj{% - \leavevmode - \pst@killglue - \begingroup - \use@par - \solid@star - \ifpsdoubleline \pst@setdoublesep \fi - \pst@addarrowdef% DG addition - \init@pscode% -} + \leavevmode% + \pst@killglue% + \begingroup% + \use@par% + \solid@star% + \ifpsdoubleline\pst@setdoublesep\fi% + \pst@addarrowdef% DG addition + \init@pscode} % % Redefinition of the PostScript /Line macro to print the intermediate % arrow on each segment of the line @@ -2670,7 +2750,7 @@ %% #4 value of the derivative (y and t can be used) % \define@key[psset]{pstricks-add}{filename}{\def\psk@filename{#1}}% -\define@boolkey[psset]{pstricks-add}[PST@]{saveData}[true]{}% \ifPST@saveData +\define@boolkey[psset]{pstricks-add}[Pst@]{saveData}[true]{} % \ifPst@saveData \psset[pstricks-add]{saveData=false,filename=PSTdata} % \def\psplotDiffEqn{\pst@object{psplotDiffEqn}}% initial code by Dominique 2005-05-21 @@ -2680,7 +2760,7 @@ \use@par% \@nameuse{beginplot@\psplotstyle}% \addto@pscode{% - \ifPST@saveData /PST@data (\psk@filename) (w) file def \fi + \ifPst@saveData /Pst@data (\psk@filename) (w) file def \fi /x #1 def % first value /x1 #2 def % last value /y [ #3 ] def % values for t=0 @@ -2836,12 +2916,12 @@ \ifx\psk@whichord\@empty 0 \else \psk@whichord\space \fi get % \else \psk@plotfuncy\space \fi \pst@number\psyunit mul - \ifPST@saveData + \ifPst@saveData 2 copy \pst@number\psyunit div exch \pst@number\psxunit div - 20 string cvs PST@data exch writestring - PST@data (\space) writestring - 20 string cvs PST@data exch writestring - PST@data (\string\n) writestring + 20 string cvs Pst@data exch writestring + Pst@data (\space) writestring + 20 string cvs Pst@data exch writestring + Pst@data (\string\n) writestring \fi } def }% @@ -2849,7 +2929,7 @@ \@pstfalse \@nameuse{testqp@\psplotstyle}% \if@pst\psplot@ii\else\psplot@iii\fi - \addto@pscode{\ifPST@saveData PST@data closefile \fi} + \addto@pscode{\ifPst@saveData Pst@data closefile \fi} \endgroup% \ignorespaces% } @@ -3025,28 +3105,28 @@ braceWidth=0.35,bracePos=0.5,% arrowscale=1,% %%%%%%%%% pst-node %%%%%%%%%% - lineAngle=0,% - nodealign=false,% - href=0,% - vref=.7ex,% - framesize=10pt,% - nodesep=0pt,% - arm=10pt,% - offset=0pt,% - angle=0,% - arcangle=8,% - ncurv=.67,% - loopsize=1cm,% - boxsize=.4cm,% - nrot=0,% - npos=,% - tpos=0.5,% - shortput=none,% - colsep=1.5cm,% - rowsep=1.5cm,% - mcol=c,% - mnode=R,% - emnode=none + lineAngle=0, + nodealign=false, + href=0, + vref=.7ex, + framesize=10pt, + nodesep=0pt, + arm=10pt, + offset=0pt, + angle=0, + arcangle=8, + ncurv=.67, + loopsize=1cm, + boxsize=.4cm, + nrot=0, + npos=, + tpos=0.5, + shortput=none, + colsep=1.5cm, + rowsep=1.5cm, + mcol=c, + mnode=R, + emnode=none% }} % \resetOptions |