diff options
author | Karl Berry <karl@freefriends.org> | 2011-08-14 23:07:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-08-14 23:07:19 +0000 |
commit | a6f1bf5e02c8819c63809f345c5a803cb274c9d5 (patch) | |
tree | 4822d0d50c334c78c73d0edcf71b94a913879a68 /Master/texmf-dist | |
parent | 135d4e294c8799bf72c97ae9ae12f679d57a2450 (diff) |
pst-coil
git-svn-id: svn://tug.org/texlive/trunk@23558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-coil/Changes | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib | 38 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf | bin | 271634 -> 298604 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex | 99 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-coil/pst-coil.pro | 38 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pst-coil/Makefile | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex | 65 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty | 4 |
8 files changed, 196 insertions, 58 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-coil/Changes b/Master/texmf-dist/doc/generic/pst-coil/Changes index 3e7c54cf69a..9e342b4e6d2 100644 --- a/Master/texmf-dist/doc/generic/pst-coil/Changes +++ b/Master/texmf-dist/doc/generic/pst-coil/Changes @@ -1,7 +1,11 @@ pst-coil.sty -------- - 2006-08-11 message for loading the pro file + 2010-02-01 message for loading the pro file pst-coil.tex -------- +v. 1.05 2011-07-12 - added optional argument bow for circular + zigzags +v. 1.04 2010-02-02 - allow an absolute value for the period + with a rounding or truncating option v. 1.03 2010-02-01 - allow an absolute value for the period with a rounding option v. 1.02 2010-01-31 - allow an absolute value for the period @@ -11,6 +15,9 @@ v. 1.01 2010-01-30 added \pcsin and ncsin for trigonometrial v. 1.00 2006-08-11 using pst-xkey for the key handling pst-coil.pro -------- +v. 1.05 2011-07-12 - added circular function +v. 1.04 2010-02-02 - allow an absolute value for the period + with a rounding or truncating option v. 1.03 2010-02-01 - allow an absolute value for the period with a rounding option v. 1.02 2010-01-31 - allow an absolute value for the period diff --git a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib index ba07f2211ce..1e97f17565b 100644 --- a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib @@ -3,14 +3,13 @@ @STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } @Book{companion, - author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Dennis Roegel and Herbert Vo\ss}, + author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}}, title = {The {\LaTeX} {G}raphics {C}ompanion}, publisher = {{Addison-Wesley Publishing Company}}, - edition = {second}, + edition = second, year = {2007}, - address = {Boston, Mass.} + address = {Reading, Mass.} } - @Article{girou:01:, author = {Denis Girou}, title = {Pr\'esentation de {PST}ricks}, @@ -40,11 +39,29 @@ year = 1989, } +@Manual{pstricks, + Title = {PSTricks - {\PS} macros for generic {\TeX}}, + Author = {{Timothy Van} Zandt}, + Organization = {}, + Address = {\url{http://www.tug.org/application/PSTricks}}, + Note = {}, + year = 1993 +} + +@Manual{pst-coil, + Title = {\texttt{pst-coil}: Coils and zigzags}, + Author = {{Timothy Van} Zandt}, + Organization = {}, + Address = {\url{CTAN:graphics/pstricks/generic/}}, + Note = {}, + year = 1999 +} + @Manual{multido, Title = {\texttt{multido.tex} - a loop macro, that supports fixed-point addition}, Author = {{Timothy Van} Zandt}, Organization = {}, - Address = {\url{CTAN:/macros/generic/multido.tex}}, + Address = {\url{CTAN:/graphics/pstricks/generic/multido.tex}}, Note = {}, year = 1997 } @@ -52,9 +69,16 @@ @Book{PSTricks2, author = {Herbert Vo\ss{}}, title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, - edition = {fifth}, + edition = {third}, publisher = {DANTE -- Lehmanns}, - year = {2008}, + year = {2006}, address = {Heidelberg/Hamburg} } +@Book{PSTricks2-UIT, + author = {Herbert Vo\ss}, + title = {PSTricks -- Graphics for \LaTeX}, + publisher = {UIT}, + year = {2011}, + address = {Cambridge/UK} +} diff --git a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf Binary files differindex 73235d74a8b..4f1569b1d41 100644 --- a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex index 419791c44f1..201f8298c06 100644 --- a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex @@ -1,4 +1,4 @@ -%% $Id: pst-coil-doc.tex 277 2010-02-01 12:36:13Z herbert $ +%% $Id: pst-coil-doc.tex 539 2011-07-12 08:22:33Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc} \listfiles @@ -22,7 +22,7 @@ \begin{document} \title{\texttt{pst-coil}\\Special node connections \\\small v.\pstFV} \docauthor{Herbert Vo\ss} -\author{Timothy Van Zandt\\Herbert Vo\ss} +\author{Timothy Van Zandt\\Herbert Vo\ss\\Michael Sharpe} \date{\today} \maketitle @@ -55,12 +55,11 @@ Marco Daniel, Denis Girou, Uwe Siart. Table~\ref{tab:pst-coil:parameter} shows a compilation of the special parameters valid for \LPack{pst-coil}. -\begin{longtable}{@{}>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l@{}} -\caption{Compilation of all parameters for \texttt{pst-coil}}\label{tab:pst-coil:parameter}\\[-5pt] -\textrm{name} & \textrm{value} & \textrm{default}\\\hline -\endfirsthead -\textrm{name} & \textrm{value} & \textrm{default}\\\hline -\endhead +\begin{table}[!htb] +\caption{Compilation of all parameters for \texttt{pst-coil}}\label{tab:pst-coil:parameter} +\centering +\begin{tabular}{@{}>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l@{}}\toprule +\textrm{name} & \textrm{value} & \textrm{default}\\\midrule \Lkeyword{coilwidth} & <value[unit]> & 1cm\\ \Lkeyword{coilheight} & <value> & 1\\ \Lkeyword{coilarm} & <value[unit]> & 0.5cm\\ @@ -72,7 +71,9 @@ valid for \LPack{pst-coil}. \Lkeyword{amplitude} & <value> & 1\\ \Lkeyword{function} & <PS code> & sin\\ \Lkeyword{ppoints} & <dots per periods> & 360\\ -\end{longtable} +\Lkeyword{bow} & <value[unit]> & 0cm\\\bottomrule +\end{tabular} +\end{table} % --------------------------------------------------------------------------------------- \subsection{\texttt{coilwidth}}\label{subsec:pstcoil:coilwidth} @@ -83,7 +84,7 @@ diameter corresponds to the height with a perpendicular parallel projection transverse to the length. \medskip\noindent -\begin{minipage}{5cm} +\begin{minipage}[t]{5cm}\vspace{0pt} \begin{pspicture}(0,-5)(5,5) \pscoil(0,4)(3.5,4) { @@ -120,7 +121,7 @@ transverse to the length. \uput*[0](3.5,-0.5){0.50cm} \end{pspicture} \end{minipage}\hfill% -\begin{minipage}{\linewidth-5cm-1em} +\begin{minipage}[t]{\linewidth-5cm-1em}\vspace{0pt} \begin{lstlisting} \begin{pspicture}(0,-5)(5,5) \pscoil(0,4)(3.5,4) @@ -152,16 +153,12 @@ transverse to the length. \Lkeyword{coilheight} is in contrast to \Lkeyword{coilwidth} no length but only a factor, whereat the distance between two windings\index{winding} resp. jags is composed as follows: -\begin{equation}dx = coilheight\cdot coilwidth \end{equation} +$dx = coilheight\cdot coilwidth$ -As can be seen in the following example, not the same physical distance is -yielded. This is caused by the internal three dimensional -representation\index{three dimensional representation} of the coil; it is not -seen under an angle of $90^\circ$ but $45^\circ$. (Section~\ref{subsec:pstcoil:coilaspect}) \medskip\noindent \begin{LTXexample}[width=5cm] -\begin{pspicture}(0,-4)(5,5) +\begin{pspicture}(0,-3)(5,4) \pscoil(0,4)(3.5,4) {\psset{linewidth=0.2pt} \psline[arrowscale=2,tbarsize=3mm]{|<->|}(4.5,3.5)(4.5,4.5) @@ -181,10 +178,9 @@ seen under an angle of $90^\circ$ but $45^\circ$. (Section~\ref{subsec:pstcoil:c \end{pspicture} \end{LTXexample} - -\medskip\noindent +\vspace{0pt}\noindent \begin{LTXexample}[width=5cm] -\begin{pspicture}(0,-4)(5,5) +\begin{pspicture}[shift=2cm](0,-3)(5,4) \pszigzag(0,4)(3.5,4) { \psset{linewidth=0.2pt} \psline[arrowscale=2,tbarsize=3mm]{|<->|}(4.5,3.5)(4.5,4.5) @@ -204,6 +200,11 @@ seen under an angle of $90^\circ$ but $45^\circ$. (Section~\ref{subsec:pstcoil:c \end{pspicture} \end{LTXexample} +\bigskip +As can be seen in the above example, not the same physical distance is +yielded. This is caused by the internal three dimensional +representation\index{three dimensional representation} of the coil; it is not +seen under an angle of $90^\circ$ but $45^\circ$. (Section~\ref{subsec:pstcoil:coilaspect}) % --------------------------------------------------------------------------------------- @@ -291,6 +292,29 @@ effort. % --------------------------------------------------------------------------------------- +\subsection{\texttt{bow}}\label{subsec:pstcoil:bow} +% --------------------------------------------------------------------------------------- +The default value for \Lkeyword{bow} is 0pt which leads to the shown direct connections +between the two given point. With a positive or negative value circular zigzags are +possible. This option is not available for coils. + +\medskip\noindent +\begin{LTXexample}[width=6cm] +\psset{unit=0.6} +\begin{pspicture}[showgrid,shift=2cm](-1,-1)(9,9) +\pszigzag[bow=-0.4cm,coilheight=.3, + coilwidth=.75cm]{*->}(0,0)(4,4) +\pczigzag[linecolor=red,bow=2.5cm, + coilheight=0.3, + coilwidth=.75cm]{*->}(0,2)(6,6) +\pnode(3,5){A}\pnode(5,0){B} +\nczigzag[bow=2cm, + coilheight=0.3,]{A}{B} +\end{pspicture} +\end{LTXexample} + +\vspace{2\normalbaselineskip} +% --------------------------------------------------------------------------------------- \subsection{\nxLkeyword{ppoints}} % --------------------------------------------------------------------------------------- By default a line or node connection divides the total length into 360 segments. @@ -334,7 +358,7 @@ be an absolute value. \end{pspicture} \end{LTXexample} -With a star as prefix the absolute value will be rounded to get an +With a star as prefix the absolute real value will be truncated to get an integer number of periods. \medskip\noindent @@ -351,6 +375,23 @@ integer number of periods. \end{pspicture} \end{LTXexample} +With a double star as prefix the absolute real value will be rounded instead of truncated to get an +integer number of periods. + +\medskip\noindent +\begin{LTXexample}[width=5.5cm] +\begin{pspicture}(5,2) +\psset{coilarm=5mm} +\psaxes(5mm,0)(4.5,2) +\pssin[periods=1.1cm,linestyle=dotted, + linecolor=red](0,1)(5,1) +\pssin[periods=**1.1cm,linecolor=red](0,1)(5,1) +\pssin[periods=2.2cm,linestyle=dotted, + linecolor=blue](0,1)(5,1) +\pssin[periods=**2.2cm,linecolor=blue](0,1)(5,1) +\end{pspicture} +\end{LTXexample} + % --------------------------------------------------------------------------------------- \subsection{\nxLkeyword{amplitude}} @@ -460,11 +501,25 @@ then led to the specified arm length. \begin{pspicture}(4,4) \pszigzag[coilarm=.5cm,linewidth=1.5pt,coilwidth=.5cm]{|->}(4,3) \pszigzag[linecolor=red,coilheight=0.2](3,4)(3,1) -\pszigzag[doubleline=true,linecolor=cyan,coilheight=0.75](0,4)(3,0) +\pszigzag[doubleline,linecolor=cyan,coilheight=0.75](0,4)(3,0) \end{pspicture} \end{LTXexample} +\medskip\noindent +\begin{LTXexample}[width=4cm] +\begin{pspicture}(4,4) +\pszigzag[coilarm=.5cm, + linewidth=1.5pt,bow=5mm, + coilwidth=.5cm]{|->}(4,3) +\pszigzag[linecolor=red,bow=-1cm, + coilheight=0.2](3,4)(3,1) +\pszigzag[doubleline, + linecolor=cyan,bow=1cm, + coilheight=0.75](0,4)(3,0) +\end{pspicture} +\end{LTXexample} + % --------------------------------------------------------------------------------------- \section{Node connections}\label{sec:pstcoil:knotenverbindungen} % --------------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro index 518703e43f9..026f662e779 100644 --- a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro +++ b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro @@ -1,6 +1,6 @@ %!ps % PostScript prologue for pst-coil.tex. -% Version 1.03, 2010/02/01 +% Version 1.05, 2011/07/12 % For distribution, see pstricks.tex. % /tx@CoilDict 40 dict def tx@CoilDict begin @@ -49,7 +49,8 @@ /mtrx CM def relativePeriod {} - { SinLength Periods div roundValue { cvi } if + { SinLength Periods div + roundValue dup 0 eq { pop cvi } { 1 eq { round } if } ifelse /Periods ED } ifelse /dxStep SinLength 360 div def % the default step for x pos /xStep 360 PointsPerPeriod div def % the step for the for loop @@ -87,5 +88,38 @@ n { x w /w w neg def /x x h add def } repeat TotalLength ArmA sub 0 TotalLength 0 } def % + /ZigZagCirc { % x0 y0 x1 y1 bow h w ArmA ArmB on stack + /bow ED + /ArmB ED /ArmA ED + 2 div /w ED + w mul /h ED /y1 ED /x1 ED /y0 ED /x0 ED + x1 y1 translate % + y0 y1 sub x0 x1 sub 2 copy Pyth 2 div + /HalfLength ED + Atan /ang ED %angle of A relative to B + %rotate % so end B is origin and BA is horizontal, A to right + /theta bow abs HalfLength Atan 2 mul def %halfangular sector for arc + /theta2 theta 2 mul def % full arc + %/psi ang 90 sub theta sub def % angle of B from center if bow>0 + /rho HalfLength theta sin div def % radius of circle + bow 0 gt { /direc 1 def /thetaB ang 90 sub theta sub def } % travel B to A in pos drn + { /direc -1 def /thetaB ang 90 add theta add def } ifelse % travel B to A in neg drn + %thetaB=angle from center to B + rho thetaB 180 add PtoC translate % origin now at center + /h h rho div RadtoDeg def + /ArmA ArmA rho div RadtoDeg def /ArmB ArmB rho div RadtoDeg def + theta2 ArmA sub ArmB sub dup h div cvi /n ED n h mul + %HalfLength 2 mul ArmA sub ArmB sub dup h div cvi /n ED n h mul + sub 2 div dup ArmA add + /ArmA ED ArmB add /ArmB ED + /h h direc mul def % h is now angle increment for half-period + /rhoo rho w add def /rhoi rho w sub def % outer and inner radii + /arg thetaB ArmB direc mul add def % argument for 2nd point +% thetaB = direc = bow = HalfLength = theta = rho = arg = h = n = + mark rho thetaB PtoC rho arg PtoC /arg arg h 2 div add def + n { w 0 gt { rhoo }{ rhoi } ifelse arg PtoC /w w neg def /arg arg h add def } repeat + rho thetaB theta2 ArmA sub direc mul add PtoC rho thetaB theta2 direc mul add PtoC + } def +% end % END pst-coil.pro diff --git a/Master/texmf-dist/source/generic/pst-coil/Makefile b/Master/texmf-dist/source/generic/pst-coil/Makefile index 9d043ef7923..90af0ad8e4f 100644 --- a/Master/texmf-dist/source/generic/pst-coil/Makefile +++ b/Master/texmf-dist/source/generic/pst-coil/Makefile @@ -60,6 +60,7 @@ tds: # cp -u Changes $(TDS)/dvips/$(PACKAGE)/ cp -u $(PACKAGE).pro $(TDS)/dvips/$(PACKAGE)/ + cp -u $(PACKAGE).pro ~/Links/dvips-local/ # cp -u Changes $(TDS)/source/$(PACKAGE)/ cp -u $(MAIN).tex $(TDS)/source/$(PACKAGE)/ 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 49a1f17a217..1770fda18a9 100644 --- a/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex +++ b/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex @@ -1,4 +1,4 @@ -%% $Id: pst-coil.tex 278 2010-02-01 12:37:08Z herbert $ +%% $Id: pst-coil.tex 537 2011-07-12 08:07:40Z herbert $ %% BEGIN pst-coil.tex %% %% Coils and zigzags with PSTricks @@ -16,13 +16,13 @@ \message{ v\fileversion, \filedate} \csname PSTcoilsLoaded\endcsname \let\PSTcoilsLoaded\endinput -\ifx\PSTricksLoaded\endinput\else -\def\next{\input pstricks.tex}\expandafter\next -\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % -\def\fileversion{1.03} -\def\filedate{2010/02/01} +\ifx\PSTricksLoaded\endinput \else\input pstricks.tex\fi +\ifx\PSTnodeLoaded\endinput \else\input pst-node.tex\fi +\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi +% +\def\fileversion{1.05} +\def\filedate{2011/07/12} % \edef\TheAtCode{\the\catcode`\@} \catcode`\@=11 @@ -30,7 +30,14 @@ \pst@addfams{pst-coil} \pstheader{pst-coil.pro} \edef\pst@theheaders{\pst@theheaders,pst-coil.pro} -\def\pst@coildict{tx@CoilDict begin } +\def\pst@CoilDict{tx@CoilDict begin } +% +\def\tx@CoilLoop {\pst@CoilDict CoilLoop end } +\def\tx@Coil {\pst@CoilDict Coil end } +\def\tx@AltCoil {\pst@CoilDict AltCoil end } +\def\tx@ZigZag {\pst@CoilDict ZigZag end } +\def\tx@ZigZagCirc{\pst@CoilDict ZigZagCirc end } +\def\tx@Sin {\pst@CoilDict Sin end } % \define@key[psset]{pst-coil}{coilwidth}[1cm]{\pst@getlength{#1}\psk@coilwidth} \define@key[psset]{pst-coil}{coilheight}[1]{\pst@checknum{#1}\pscoilheight} @@ -57,12 +64,10 @@ \psk@coilwidth \pscoilheight \psk@coilarmA \psk@coilarmB \psk@coilaspect \psk@coilinc - \pst@coildict \tx@Coil end }% + \tx@Coil }% \showpointsfalse \end@OpenObj} % -\def\tx@CoilLoop{CoilLoop } -\def\tx@Coil{Coil } \def\psCoil{\def\pst@par{}\pst@object{psCoil}} \def\psCoil@i#1#2{% \begin@AltOpenObj @@ -76,15 +81,21 @@ \pscoilheight \psk@coilaspect \psk@coilinc - \pst@coildict \tx@AltCoil end + \tx@AltCoil \@nameuse{psls@\pslinestyle} }% \end@OpenObj} -\def\tx@AltCoil{AltCoil } +% +\define@key[psset]{pst-coil}{bow}[\z@]{% + \pst@getlength{#1}\psk@bow \pst@dima=\psk@bow pt + \pst@absdim{\pst@dima}{\pst@dimb} + \ifdim\pst@dimb<1pt \def\psk@bow{0}\fi} +\psset[pst-coil]{bow=\z@} % \def\pszigzag{\def\pst@par{}\pst@object{pszigzag}} \def\pszigzag@i{\pst@getarrows\pszigzag@ii} \def\pszigzag@ii(#1){\@ifnextchar({\pszigzag@iii{1}(#1)}{\pszigzag@iii{\z@}(0,0)(#1)}} \def\pszigzag@iii#1(#2)(#3){% + \addbefore@par{bow=0}% \begin@OpenObj \pst@getcoor{#2}\pst@tempa \pst@getcoor{#3}\pst@tempb @@ -96,13 +107,11 @@ \psk@coilwidth \psk@coilarmA \psk@coilarmB - \pst@coildict \tx@ZigZag end + \ifdim\psk@bow pt=\z@\tx@ZigZag\else\psk@bow\space\tx@ZigZagCirc\fi \psline@iii \tx@Line }% \end@OpenObj} % -\def\tx@ZigZag{ZigZag } -% \def\nccoil{\pst@object{nccoil}} \def\nccoil@i{\check@arrow{\nccoil@ii}} \def\nccoil@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{% @@ -114,11 +123,12 @@ \psk@coilwidth \pscoilheight \psk@coilarmA \psk@coilarmB \psk@coilaspect \psk@coilinc - \pst@coildict \tx@Coil end + \tx@Coil end }} % \def\pccoil{\def\pst@par{}\pst@object{pccoil}} \def\pccoil@i{\pc@object\nccoil@ii} +% \def\nczigzag{\pst@object{nczigzag}} \def\nczigzag@i{\check@arrow{\nczigzag@ii}} \def\nczigzag@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{% @@ -131,7 +141,7 @@ \psk@coilwidth \psk@coilarmA \psk@coilarmB - \pst@coildict \tx@ZigZag end + \ifdim\psk@bow pt=\z@\tx@ZigZag\else\psk@bow\space\tx@ZigZagCirc\fi \psline@iii \tx@Line end }} @@ -140,10 +150,17 @@ \def\pczigzag@i{\pc@object\nczigzag@ii} % \def\pst@checkUnit#1#2{\expandafter\pst@checkUnit@i#1!!#2} +% 3.5 relative value \def\pst@roundValue{-1} +% 3.5mm absolute value {-1} +% *3.5mm absolute value, with real->int conversion (truncate) {0} +% **3.5mm absolute value, with real->int conversion (round) {1} \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{% + {\def\pst@roundValue{0 }\pst@checkUnit@ii}% + {\def\pst@roundValue{-1 }\pst@checkUnit@iii**}} +\def\pst@checkUnit@ii*{\@ifnextchar*% + {\def\pst@roundValue{1 }\pst@checkUnit@iii*}% + {\pst@checkUnit@iii**}} +\def\pst@checkUnit@iii**#1!!#2{% \edef\ps@next{#1}% \ifx\ps@next\@empty\let\pst@num\z@% \else\expandafter\pst@@checknum\ps@next..\@nil% @@ -161,7 +178,6 @@ \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)}} @@ -179,7 +195,7 @@ \psk@coilarmA \psk@coilarmB \psk@ppoints { \psk@function } - \pst@coildict \tx@Sin end + \tx@Sin }% \showpointsfalse% \end@OpenObj} @@ -197,12 +213,13 @@ \psk@coilarmA \psk@coilarmB \psk@ppoints { \psk@function } - \pst@coildict \tx@Sin end + \tx@Sin end }} % \def\pcsin{\def\pst@par{}\pst@object{pcsin}} \def\pcsin@i{\pc@object\ncsin@ii} % +% \catcode`\@=\TheAtCode\relax \endinput %% 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 25e0f37a186..d5b0311532b 100644 --- a/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty +++ b/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty @@ -1,11 +1,11 @@ -%% $Id: pst-coil.sty 278 2010-02-01 12:37:08Z herbert $ +%% $Id: pst-coil.sty 539 2011-07-12 08:22:33Z herbert $ \RequirePackage{pstricks} \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)] + [2011/07/12 v. 1.05, PostScript prologue file (hv)] \@addtofilelist{pst-coil.pro}}{}% \ProvidesFile{pst-coil.tex} [\filedate\space v\fileversion\space `PST-coil' (tvz,hv)] |