diff options
author | Karl Berry <karl@freefriends.org> | 2010-02-01 23:42:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-02-01 23:42:50 +0000 |
commit | 3556ffda02def0f822bd81adaa1a0f331e850ed6 (patch) | |
tree | c26f57e2781c870aeb3bb1a907f2db9822f7be27 /Master/texmf-dist/tex | |
parent | f3e45a772d199f398f301984a90991b4199cee23 (diff) |
pst-coil 1.03 (1feb10)
git-svn-id: svn://tug.org/texlive/trunk@16895 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex | 82 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty | 12 |
2 files changed, 61 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex b/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex index 077c71d5885..49a1f17a217 100644 --- a/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex +++ b/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex @@ -1,3 +1,4 @@ +%% $Id: pst-coil.tex 278 2010-02-01 12:37:08Z herbert $ %% BEGIN pst-coil.tex %% %% Coils and zigzags with PSTricks @@ -20,8 +21,8 @@ \fi \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % -\def\fileversion{1.01} -\def\filedate{2010/01/30} +\def\fileversion{1.03} +\def\filedate{2010/02/01} % \edef\TheAtCode{\the\catcode`\@} \catcode`\@=11 @@ -60,33 +61,6 @@ \showpointsfalse \end@OpenObj} % -\define@key[psset]{pst-coil}{frequency}[1]{\def\psk@frequency{#1 }} -\define@key[psset]{pst-coil}{amplitude}[1]{\def\psk@amplitude{#1 }} -\define@key[psset]{pst-coil}{ppoints}[360]{\def\psk@ppoints{#1 }} -\define@key[psset]{pst-coil}{function}[sin]{\def\psk@function{#1 }} -\psset[pst-coil]{frequency=1,amplitude=1,ppoints=360,function=sin} -% -\def\tx@Sin{Sin } -% -\def\pssin{\pst@object{pssin}} -\def\pssin@i{\pst@getarrows\pssin@ii} -\def\pssin@ii(#1){\@ifnextchar({\pssin@iii{1}(#1)}{\pssin@iii{\z@}(0,0)(#1)}} -\def\pssin@iii#1(#2)(#3){% - \begin@OpenObj - \pst@getcoor{#2}\pst@tempa - \pst@getcoor{#3}\pst@tempb - \pst@optcp{#1}\pst@tempa - \addto@pscode{% - \pst@tempa \pst@tempb - \psk@frequency \psk@amplitude \pst@number\psyunit mul - \psk@coilarmA \psk@coilarmB - \psk@ppoints - { \psk@function } - \pst@coildict \tx@Sin end - }% - \showpointsfalse% - \end@OpenObj} -% \def\tx@CoilLoop{CoilLoop } \def\tx@Coil{Coil } \def\psCoil{\def\pst@par{}\pst@object{psCoil}} @@ -165,13 +139,61 @@ \def\pczigzag{\def\pst@par{}\pst@object{pczigzag}} \def\pczigzag@i{\pc@object\nczigzag@ii} % +\def\pst@checkUnit#1#2{\expandafter\pst@checkUnit@i#1!!#2} +\def\pst@checkUnit@i{\@ifnextchar*% + {\def\pst@roundValue{true }\pst@checkUnit@ii}% + {\def\pst@roundValue{false }\pst@checkUnit@ii*}} +\def\pst@checkUnit@ii*#1!!#2{% + \edef\ps@next{#1}% + \ifx\ps@next\@empty\let\pst@num\z@% + \else\expandafter\pst@@checknum\ps@next..\@nil% + \fi% + \ifnum\pst@num=\z@\pst@getlength{#1}{#2}\def\pst@relativePeriod{false }% + \else% + \def\pst@relativePeriod{true }% + \edef#2{\ifnum\pst@num=\tw@-\fi\the\pst@cntg.% + \expandafter\@gobble\the\pst@cnth\space}% + \fi} +% +\define@key[psset]{pst-coil}{periods}[1]{\pst@checkUnit{#1}{\psk@periods}} +\define@key[psset]{pst-coil}{amplitude}[1]{\def\psk@amplitude{#1 }} +\define@key[psset]{pst-coil}{ppoints}[360]{\def\psk@ppoints{#1 }} +\define@key[psset]{pst-coil}{function}[sin]{\def\psk@function{#1 }} +\psset[pst-coil]{periods=1,amplitude=1,ppoints=360,function=sin} +% +\def\tx@Sin{Sin } +\def\pssin{\pst@object{pssin}} +\def\pssin@i{\pst@getarrows\pssin@ii} +\def\pssin@ii(#1){\@ifnextchar({\pssin@iii{1}(#1)}{\pssin@iii{\z@}(0,0)(#1)}} +\def\pssin@iii#1(#2)(#3){% + \begin@OpenObj + \pst@getcoor{#2}\pst@tempa + \pst@getcoor{#3}\pst@tempb + \pst@optcp{#1}\pst@tempa + \addto@pscode{% + \pst@tempa \pst@tempb + \psk@periods + \pst@relativePeriod + \pst@roundValue + \psk@amplitude \pst@number\psyunit mul + \psk@coilarmA \psk@coilarmB + \psk@ppoints + { \psk@function } + \pst@coildict \tx@Sin end + }% + \showpointsfalse% + \end@OpenObj} +% \def\ncsin{\pst@object{ncsin}} \def\ncsin@i{\check@arrow{\ncsin@ii}} \def\ncsin@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{% \tx@NCCoor tx@Dict begin 4 2 roll - \psk@frequency \psk@amplitude \pst@number\psyunit mul + \psk@periods + \pst@relativePeriod + \pst@roundValue + \psk@amplitude \pst@number\psyunit mul \psk@coilarmA \psk@coilarmB \psk@ppoints { \psk@function } diff --git a/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty b/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty index 2e3a98d15ef..25e0f37a186 100644 --- a/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty +++ b/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty @@ -1,7 +1,13 @@ +%% $Id: pst-coil.sty 278 2010-02-01 12:37:08Z herbert $ \RequirePackage{pstricks} -\ProvidesPackage{pst-coil}[2006/08/11 package wrapper for pst-coil.tex (hv)] +\ProvidesPackage{pst-coil}[2010/02/01 package wrapper for + pst-coil.tex (hv)] \input{pst-coil.tex} +\IfFileExists{pst-coil.pro}{% + \ProvidesFile{pst-coil.pro} + [2010/02/01 v. 1.03, PostScript prologue file (hv)] + \@addtofilelist{pst-coil.pro}}{}% \ProvidesFile{pst-coil.tex} - [\filedate\space v\fileversion\space `pst-coil' (tvz)] -\IfFileExists{pst-coil.pro}{\@addtofilelist{pst-coil.pro}}{}% + [\filedate\space v\fileversion\space `PST-coil' (tvz,hv)] \endinput + |