summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/Changes8
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdfbin253967 -> 271634 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex66
-rw-r--r--Master/texmf-dist/dvips/pst-coil/pst-coil.pro13
-rw-r--r--Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex82
-rw-r--r--Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty12
6 files changed, 128 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-coil/Changes b/Master/texmf-dist/doc/generic/pst-coil/Changes
index 7dfbafe2755..3e7c54cf69a 100644
--- a/Master/texmf-dist/doc/generic/pst-coil/Changes
+++ b/Master/texmf-dist/doc/generic/pst-coil/Changes
@@ -2,11 +2,19 @@ pst-coil.sty --------
2006-08-11 message for loading the pro file
pst-coil.tex --------
+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
+ - rename option frequency to period
v. 1.01 2010-01-30 added \pcsin and ncsin for trigonometrial
functions which connect two nodes
v. 1.00 2006-08-11 using pst-xkey for the key handling
pst-coil.pro --------
+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
+ - rename option frequency to period
v. 1.01 2010-01-30 added subroutine Sin for trigonometrial
functions which connect two nodes
v. 1.00 2006-11-05 small tweaks to the code
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
index ffc560fbf94..73235d74a8b 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
Binary files differ
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 59385bf9df2..419791c44f1 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,10 +1,10 @@
-%% $Id: pst-plot-doc.tex 264 2010-01-22 13:00:07Z herbert $
+%% $Id: pst-coil-doc.tex 277 2010-02-01 12:36:13Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc}
\listfiles
\usepackage[utf8]{inputenc}
-\usepackage{pst-coil,pst-node}
+\usepackage{pst-plot,pst-node,pst-coil}
\SpecialCoor
\let\pstFV\fileversion
\let\belowcaptionskip\abovecaptionskip
@@ -12,7 +12,7 @@
\def\bgImage{%
\begin{pspicture}(6,2)
\cnode*(0,1){4pt}{A}\cnode*(6,1){4pt}{B}
- \pcsin[linecolor=red,amplitude=0.75,frequency=20,function=dup 0.1 mul sin exch cos add](A)(B)
+ \pcsin[linecolor=red,amplitude=0.75,periods=20,function=dup 0.1 mul sin exch cos add](A)(B)
\end{pspicture}
}
\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
@@ -42,7 +42,7 @@ elaborated on at the corresponding places.
\vfill
\noindent
Thanks to:
-Denis Girou, Marco Daniel
+Marco Daniel, Denis Girou, Uwe Siart.
\end{abstract}
\clearpage
@@ -68,10 +68,10 @@ valid for \LPack{pst-coil}.
\Lkeyword{coilarmB} & <value[unit]> & 0.5cm\\
\Lkeyword{coilaspect} & <angle> & 45\\
\Lkeyword{coilinc} & <angle> & 45\\
-\Lkeyword{frequency} & <value> & 1\\
+\Lkeyword{periods} & <value> & 1\\
\Lkeyword{amplitude} & <value> & 1\\
\Lkeyword{function} & <PS code> & sin\\
-\Lkeyword{ppoints} & <dots per period> & 360\\
+\Lkeyword{ppoints} & <dots per periods> & 360\\
\end{longtable}
% ---------------------------------------------------------------------------------------
@@ -294,32 +294,64 @@ effort.
\subsection{\nxLkeyword{ppoints}}
% ---------------------------------------------------------------------------------------
By default a line or node connection divides the total length into 360 segments.
-This should be increased for long distances or great frequencies.
+This should be increased for long distances or a large number of periodss.
\medskip\noindent
\begin{LTXexample}[width=5.5cm]
\begin{pspicture}(5,2)
\pssin[ppoints=2000,
- frequency=30](0,1)(5,1)
+ periods=30](0,1)(5,1)
\end{pspicture}
\end{LTXexample}
% ---------------------------------------------------------------------------------------
-\subsection{\nxLkeyword{frequency}}
+\subsection{\nxLkeyword{periods}}
% ---------------------------------------------------------------------------------------
-The line from A to B is plotted as one period, which is the same as the relative
-\Lkeyword{frequency}=1. A setting of \Lkeyword{frequency}=3.3 plots the function 3.3 times
+The line from A to B is plotted by default as one period, which is the same as the relative
+\Lkeyword{periods}=1. A setting of \Lkeyword{periods}=3.3 plots the function 3.3 times
for the given length.
\medskip\noindent
\begin{LTXexample}[width=5.5cm]
\begin{pspicture}(5,2)
\pssin[linecolor=blue](0,1)(5,1)
-\pssin[frequency=3.3](0,1)(5,1)
+\pssin[periods=3.3](0,1)(5,1)
\end{pspicture}
\end{LTXexample}
+A value without an unit for the period is always relative, with an unit it will
+be an absolute value.
+
+\medskip\noindent
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+\psaxes(5mm,0)(4.5,2)
+\psset{coilarm=5mm}
+\pssin[linecolor=blue](0,1)(5,1)
+\pssin[periods=1cm](0,1)(5,1)
+\pssin[periods=2cm,linestyle=dashed](0,1)(5,1)
+\end{pspicture}
+\end{LTXexample}
+
+With a star as prefix the absolute value will be rounded 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}}
% ---------------------------------------------------------------------------------------
@@ -348,7 +380,7 @@ The following example plots the defualt curve and one with the function $y=cos(x
\pssin[linecolor=blue](0,1)(\linewidth,1)
\pssin[function=dup sin mul cos,
linecolor=red,ppoints=10000,
- frequency=6](0,1)(\linewidth,1)
+ periods=6](0,1)(\linewidth,1)
\end{pspicture}
\end{LTXexample}
@@ -359,10 +391,10 @@ The following example plots the defualt curve and one with the function $y=cos(x
shaped lines possible.\index{zigzag line}
\begin{BDef}
-\LcsStar{pscoil}\OptArgs\OptArg*{\Largb{arrows}}\OptArg{\Largr{\coord0}}\Largr{\coord1}\\
+\LcsStar{pscoil}\OptArgs\OptArg*{\Largb{arrows}}\OptArg*{\coord0}\coord1\\
\LcsStar{psCoil}\OptArgs\Largb{angle1}\Largb{angle2}\\
-\LcsStar{pszigzag}\OptArgs\OptArg*{\Largb{arrows}}\OptArg{\Largr{\coord0}}\Largr{\coord1}\\
-\LcsStar{pssin}\OptArgs\OptArg*{\Largb{arrows}}\OptArg{\Largr{\coord0}}\Largr{\coord1}
+\LcsStar{pszigzag}\OptArgs\OptArg*{\Largb{arrows}}\OptArg*{\coord0}\coord1\\
+\LcsStar{pssin}\OptArgs\OptArg*{\Largb{arrows}}\OptArg*{\coord0}\coord1
\end{BDef}
\begin{itemize}
@@ -464,7 +496,7 @@ is loaded, then the following node connections are available:
\begin{pspicture}(5,2)
\pnode(0,1){A}
\pnode(5,1){B}
-\ncsin[amplitude=0.5,frequency=30,coilarm=5pt,
+\ncsin[amplitude=0.5,periods=30,coilarm=5pt,
function=dup 0.1 mul sin exch sin add]{A}{B}
\end{pspicture}
\end{LTXexample}
diff --git a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
index 2bde2b1f5c2..518703e43f9 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.01, 2010/01/30
+% Version 1.03, 2010/02/01
% For distribution, see pstricks.tex.
%
/tx@CoilDict 40 dict def tx@CoilDict begin
@@ -36,7 +36,10 @@
/PointsPerPeriod ED
/ArmB ED
/ArmA ED
- /Amplitude ED /Frequency ED
+ /Amplitude ED
+ /roundValue ED
+ /relativePeriod ED
+ /Periods ED
/y1 ED /x1 ED /y0 ED /x0 ED
x0 y0 translate y1 y0 sub x1 x0 sub 2 copy Pyth
dup /TotalLength ED
@@ -44,11 +47,15 @@
Atan rotate
1 0 0 0 ArrowA ArmA 0 lineto
/mtrx CM def
+ relativePeriod
+ {}
+ { SinLength Periods div roundValue { cvi } if
+ /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
1 xStep 360 { % PointsPerPeriod times
dup dxStep mul ArmA add exch % x pos and value for the func
- Frequency mul Func Amplitude mul lineto
+ Periods mul Func Amplitude mul lineto
} for
mtrx setmatrix TotalLength ArmB sub 0 lineto CP
TotalLength 0 ArrowB lineto
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
+