summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-30 21:03:57 +0000
committerKarl Berry <karl@freefriends.org>2018-01-30 21:03:57 +0000
commitd2c05b2de7a771e9d41c10ca2bd7b8db46f0e9ff (patch)
treea8c83fb519e4be9777194ab89405a653dbb7da94 /Master
parent20dc5772c5dd5e8fd6b15ab3c7d241a5cbe0fb01 (diff)
pstricks-add (30jan18)
git-svn-id: svn://tug.org/texlive/trunk@46491 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/Changes3
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/data/demo3.data12
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib13
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdfbin5069046 -> 5066803 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex80
-rw-r--r--Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex60
-rw-r--r--Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty3
7 files changed, 138 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes
index dd5c770fc84..55a452ec803 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/Changes
+++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes
@@ -1,4 +1,4 @@
-%% $Id: Changes 555 2017-09-18 06:19:41Z herbert $
+%% $Id: Changes 716 2018-01-29 22:19:16Z herbert $
%%
pstricks-add.pro -----------
0.23 2009-12-17 - add RGBtoGRAY and WavelengthToGRAY
@@ -39,6 +39,7 @@ pstricks-add.sty ----------- (hv)
pstricks-add.tex ----------- (hv)
+ v 3.85 2018-01-29 - added area computing for \psStep
v 3.84 2017-09-16 - added \psRandomPointsArea
v 3.83a 2017-08-24 - updated documentation
v 3.83 2017-05-10 - use the star version for \psChar if no extra
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/data/demo3.data b/Master/texmf-dist/doc/generic/pstricks-add/data/demo3.data
index 298a59572c4..f9672cf2562 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/data/demo3.data
+++ b/Master/texmf-dist/doc/generic/pstricks-add/data/demo3.data
@@ -1,13 +1,13 @@
- 1989 3.08
- 1990 3.1
+1989 3.08
+ 1990 3.10
1991 3.08
1992 3.21
- 1993 5.0
+ 1993 5.00
1994 2.27
1995 3.53
- 1996 3.8
- 1997 2.8
+ 1996 3.80
+ 1997 2.80
1998 4.15
1999 3.32
- 2000 1.4
+ 2000 1.40
2001 2.46
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib
index ad51b4ed40f..7fed79e8889 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.bib
@@ -1,4 +1,3 @@
-%% -*-bibtex-*-
@STRING{tugboat = {TUGboat} }
@STRING{beiprogramm = {{\TeX}-Beiprogramm} }
@STRING{bretter = {Bretter, die die Welt bedeuten} }
@@ -15,7 +14,7 @@
@STRING{theatertage = {{\TeX}-Theatertage} }
@Book{PSTricks2,
- author = {Herbert Vo\ss},
+ author = {Herbert Voß},
title = {{\PST} {G}rafik f\"ur \TeX{} und \LaTeX},
edition = {7},
publisher = {DANTE -- Lehmanns},
@@ -24,7 +23,7 @@
}
@Book{PSTricks-E,
- author = {Herbert Vo\ss},
+ author = {Herbert Voß},
title = {{\PST} {G}raphics for \LaTeX},
edition = {1},
publisher = {UIT},
@@ -58,7 +57,7 @@
address = {London}
}
@Article{ dtk02.2:jackson.voss:plot-funktionen,
- author = {Laura E. Jackson and Herbert Vo{\ss}},
+ author = {Laura E. Jackson and Herbert Voß},
title = {Die Plot-Funktionen von {\texttt{pst-plot}}},
journal = dtk,
year = 2002,
@@ -78,7 +77,7 @@
}
@Article{ dtk02.1:voss:mathematischen,
- author = {Herbert Vo{\ss}},
+ author = {Herbert Voß},
title = {Die mathematischen {F}unktionen von {P}ost{S}cript},
journal = dtk,
year = 2002,
@@ -92,7 +91,7 @@
abstract = { \PS, faktisch genauso alt wie {\TeX}, ist im
Verh{\"a}ltnis dazu allgemein noch weniger bekannt, wenn es
darum geht zu beurteilen, was es denn nun im eigentlichen
- Sinne ist. Au{\ss}erdem wird h{\"a}ufig vergessen, dass
+ Sinne ist. Außerdem wird h{\"a}ufig vergessen, dass
sich mit den \PS-Funktionen viele Dinge erledigen lassen,
bei denen sonst auf externe Programme zur{\"u}ckgegriffen
wird. Dies wird im Folgenden f{\"u}r die mathematischen
@@ -101,7 +100,7 @@
}
@Book{tlgc2,
- author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}},
+ author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Voß},
title = {The {\LaTeX} {G}raphics {C}ompanion},
publisher = {{Addison-Wesley Publishing Company}},
edition = 2,
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
index dbf288aa51f..26a93dcddb3 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
index 10daa5f3f51..7e765d5035c 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
@@ -1,7 +1,7 @@
-%% $Id: pstricks-add-doc.tex 333 2016-09-01 19:36:09Z herbert $
+%% $Id: pstricks-add-doc.tex 718 2018-01-30 09:11:28Z herbert $
%
-\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings,
- headexclude,footexclude,oneside]{pst-doc}
+\documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
+ headinclude=false,footinclude=false,oneside]{pst-doc}
\listfiles
\usepackage{biblatex}
\addbibresource{pstricks-add-doc.bib}
@@ -83,7 +83,7 @@ a lot of the macros won't work in the expected way.
you have installed \LPack{pst-xkey} which is part of the
\LPack{xkeyval}-package, and that all packages that use the old
keyval interface are loaded \textbf{before} the
-\LPack{xkeyval}.\cite{xkeyval}
+\LPack{xkeyval}.
\item the option \Lkeyword{tickstyle} from \LPack{pst-plot} is no longer supported; use \Lkeyword{ticksize} instead.
\item the option \Lkeyword{xyLabel} is no longer supported; use the option \Lkeyword{labelFontSize} instead.
\item if \LPack{pstricks-add} is loaded together with the package \LPack{pst-func} then \Lkeyword{InsideArrow}
@@ -1616,7 +1616,7 @@ function. The available option is
with \Lkeyword{lower} as the default setting. The syntax of the function is
\begin{BDef}
-\Lcs{psStep}\OptArgs\Largr(x1,x2)\Largb{n}\Largb{function}
+\Lcs{psStep}\OptArgs\Largr{$x1,x2$}\Largb{n}\Largb{function}
\end{BDef}
%$
@@ -1649,6 +1649,9 @@ the mathematical function in postfix or algebraic notation (with
\end{pspicture}
\end{LTXexample}
+
+
+
\begin{LTXexample}[pos=t,preset=\centering]
\psset{yunit=1.25cm,plotpoints=200}
\begin{pspicture}(-0.5,-1.5)(10,1.5)
@@ -1691,6 +1694,7 @@ the mathematical function in postfix or algebraic notation (with
\end{pspicture}
\end{LTXexample}
+
There is also an optional argument \Lkeyword{noVerticalLines} which suppresses all
vertical lines of the step function in the output.
@@ -1778,6 +1782,70 @@ vertical lines of the step function in the output.
\fi
+
+
+With setting the optional argument \Lkeyword{saveSumValue}
+it is possible to calculate the area under the rectangles. The value is saved in a macro \Lcs{pstAreaA},
+for the next call of \Lcs{psStep} in the macro \Lcs{pstAreaB} and so on. The values are calculated
+on PostScript level, the reason why two \LaTeX\ runs are needed. for every \Lcs{psStep} there will
+be an external file \verb|\jobname-area#.tex| which has the definition of the macros \nxLcs{pstArea?}.
+In this documentation the following \Lcs{psStep} is the 10th call of this function, the reason
+why we have to choose \Lcs{pstAreaJ} and so on:
+
+\clearpage
+
+%\begin{LTXexample}[pos=t,preset=\centering]
+\psset{plotpoints=200}%
+\begin{pspicture}(-0.5,-2.25)(10,3)
+\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-2.25)(10,3)%
+\psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*sin(x)}%
+\psset{linewidth=0.5pt}%
+\psStep[algebraic,linecolor=magenta,StepType=upper,saveSumValue](0,9){20}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2.5){\textcolor{magenta}{Uppersum: \pstAreaJ}}%
+\psStep[algebraic,linecolor=blue,saveSumValue](0,9){20}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2){\textcolor{blue}{Lowersum: \pstAreaK}}%
+\end{pspicture}
+%\end{LTXexample}
+
+\begin{lstlisting}
+\psset{plotpoints=200}%
+\begin{pspicture}(-0.5,-2.25)(10,3)
+\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-2.25)(10,3)%
+\psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*sin(x)}%
+\psset{linewidth=0.5pt}%
+\psStep[algebraic,linecolor=magenta,StepType=upper,saveSumValue](0,9){20}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2.5){\textcolor{magenta}{Uppersum: \pstAreaJ}}%
+\psStep[algebraic,linecolor=blue,saveSumValue](0,9){20}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2){\textcolor{blue}{Lowersum: \pstAreaK}}%
+\end{pspicture}
+\end{lstlisting}
+
+
+%\begin{LTXexample}[pos=t,preset=\centering]
+\psset{plotpoints=200}%
+\begin{pspicture}(-0.5,-2.25)(10,3)
+\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-2.25)(10,3)%
+\psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*sin(x)}%
+\psset{linewidth=0.1pt}%
+\psStep[algebraic,linecolor=magenta,StepType=upper,saveSumValue](0,9){100}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2.5){\textcolor{magenta}{Uppersum: \pstAreaL}}%
+\psStep[algebraic,linecolor=blue,saveSumValue](0,9){100}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2){\textcolor{blue}{Lowersum: \pstAreaM}}%
+\end{pspicture}
+%\end{LTXexample}
+
+\begin{lstlisting}
+\psset{plotpoints=200}%
+\begin{pspicture}(-0.5,-2.25)(10,3)
+\psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-2.25)(10,3)%
+\psplot[linewidth=1.5pt,algebraic]{0}{10}{sqrt(x)*sin(x)}%
+\psset{linewidth=0.1pt}%
+\psStep[algebraic,linecolor=magenta,StepType=upper,saveSumValue](0,9){100}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2.5){\textcolor{magenta}{Uppersum: \pstAreaL}}%
+\psStep[algebraic,linecolor=blue,saveSumValue](0,9){100}{sqrt(x)*sin(x)}%
+\rput[l](0.2,2){\textcolor{blue}{Lowersum: \pstAreaM}}%
+\end{pspicture}
+\end{lstlisting}
\clearpage
%--------------------------------------------------------------------------------------
@@ -3379,7 +3447,7 @@ converters and many connectors.
\end{center}
\egroup
-\begin{lstlisting}[label={fig:aiglelapin},xrightmargin=-1.5cm]
+\begin{lstlisting}[label={fig:aiglelapin2},xrightmargin=-1.5cm]
\def\InitCond{ 0 10 10}%% xa ya xl
\def\Faiglelapin{\Vaigle*(y[2]-y[0])/sqrt(y[1]^2+(y[2]-y[0])^2)|%
-\Vaigle*y[1]/sqrt(y[1]^2+(y[2]-y[0])^2)|%
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 40326d63171..4c276769710 100644
--- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
+++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
@@ -1,4 +1,4 @@
-%% $Id: pstricks-add.tex 327 2016-09-01 18:59:35Z herbert $
+%% $Id: pstricks-add.tex 718 2018-01-30 09:11:28Z herbert $
%%
%% This is file `pstricks-add.tex',
%%
@@ -31,8 +31,8 @@
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
\ifx\PSTmathLoaded\endinput\else \input pst-math \fi
%
-\def\fileversion{3.84}
-\def\filedate{2017/09/16}
+\def\fileversion{3.85}
+\def\filedate{2018/01/29}
\let\pstricksaddFV\fileversion
\message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)}
%
@@ -712,6 +712,9 @@ a add
\define@key[psset]{pstricks-add}{adamsorder}{\def\psk@adamsorder{#1}}%
%\define@key[psset]{pstricks-add}{varstepincrease}{\def\psk@varstepincrease{#1}}% varrk4
%
+\define@boolkey[psset]{pstricks-add}[Pst@]{saveSumValue}[true]{}
+\psset[pstricks-add]{saveSumValue=false}
+
\define@key[psset]{pstricks-add}{StepType}{\pst@expandafter\psset@@StepType{#1}\@nil}%
\def\psset@@StepType#1#2\@nil{%
\ifx#1u\let\psk@StepType\@ne
@@ -723,19 +726,35 @@ a add
\define@boolkey[psset]{pstricks-add}[Pst@]{noVerticalLines}[true]{}%
\psset{noVerticalLines=false}
%
+\newcount\pst@stepcount
+\pst@stepcount=1
+\def\get@Letter#1;{%
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or
+ K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or X\or
+ Y\or Z\else0\fi}
+
+
\def\psStep{\def\pst@par{}\pst@object{psStep}}
\def\psStep@i(#1,#2)#3#4{%
- \begin@ClosedObj%
+ \expandafter\xdef\csname pstArea\get@Letter\the\pst@stepcount;\endcsname{undef}%
+ \IfFileExists{\jobname-area\the\pst@stepcount.tex}{\input{\jobname-area\the\pst@stepcount.tex}}{}%
+ \begin@ClosedObj
\addto@pscode{
+ \ifPst@saveSumValue
+ /AreaFile (\jobname-area\the\pst@stepcount.tex) (w) file def
+ AreaFile (\string\% Created by \string\\psStep\string\n ) writestring
+ \fi
/Func \ifPst@algebraic (#4) tx@addDict begin AlgParser end cvx \else {#4} \fi def
/x #1 def
/dx #2 #1 sub #3 div def
/scx { \pst@number\psxunit mul } def
/scy { \pst@number\psyunit mul } def
+ /Area 0 def
+%
\ifcase\psk@StepType % 0->lower, height is always f(x)
x scx 0 moveto
#3 {
- Func
+ Func dup dx mul Area add /Area ED
scy dup x scx exch \ifPst@noVerticalLines moveto \else lineto \fi
/x x dx add def
x scx exch lineto
@@ -745,11 +764,14 @@ a add
x scx 0 moveto
#3 {
/x x dx add def
- Func scy dup x dx sub scx exch
+ Func \ifPst@saveSumValue dup dx mul Area add /Area ED \fi
+ scy dup x dx sub scx exch
\ifPst@noVerticalLines moveto \else lineto \fi
x scx exch lineto
x scx 0 \ifPst@noVerticalLines moveto \else lineto \fi
} repeat
+ \ifPst@saveSumValue
+ \fi
\or % 2-> Riemann
/eps3 500 def %% increased from 100 to 500 20140507
/xMinMax [] def
@@ -761,7 +783,7 @@ a add
/Min Max def
/t x def % save x value
eps3 {
- Func
+ Func \ifPst@saveSumValue dup dx mul Area add /Area ED \fi
dup
Max lt { /Max exch def } { dup Min gt { /Min exch def }{ pop } ifelse } ifelse
/x x dt add def
@@ -781,10 +803,14 @@ a add
x yMin \ifPst@noVerticalLines moveto \else lineto \fi
closepath
} repeat
+ \ifPst@saveSumValue
+ \fi
\or % 3->inf(imum)
- x scx 0 moveto
+ x scx 0 moveto
#3 {
- \ifPst@algebraic Func \else #4 \fi /yMin ED % Max value f(x)
+ \ifPst@algebraic Func \else #4 \fi
+ \ifPst@saveSumValue dup dx mul Area add /Area ED \fi
+ /yMin ED % Max value f(x)
/xStart x def
/xEnd xStart dx add def
/DX dx 100 div def
@@ -801,9 +827,11 @@ a add
closepath x scx 0 moveto
} repeat
\or % 4-> sup(remum)
- x scx 0 moveto
+ x scx 0 moveto
#3 {
- \ifPst@algebraic Func \else #4 \fi /yMax ED % Max value f(x)
+ \ifPst@algebraic Func \else #4 \fi
+ \ifPst@saveSumValue dup dx mul Area add /Area ED \fi
+ /yMax ED % Max value f(x)
/xStart x def
/xEnd xStart dx add def
/DX dx 100 div def
@@ -820,10 +848,18 @@ a add
closepath x scx 0 moveto
} repeat
\fi
+ \ifPst@saveSumValue
+ AreaFile (\string\\gdef\string\\pstArea\get@Letter\the\pst@stepcount;\string{) writestring
+ Area 10 string cvs AreaFile exch writestring
+ AreaFile (\string}\string\n) writestring
+ AreaFile closefile
+ \fi
}%
+ \global\advance\pst@stepcount by 1
\psk@fillstyle
\pst@stroke
- \end@ClosedObj%
+ \end@ClosedObj
+ \ignorespaces
}
%
\define@key[psset]{pstricks-add}{Derive}{\def\psk@Derive{#1}}
diff --git a/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty b/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty
index d97d56533e2..c7b73696431 100644
--- a/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty
+++ b/Master/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty
@@ -1,4 +1,4 @@
-%% $Id: pstricks-add.sty 37 2014-07-22 13:52:12Z herbert $
+%% $Id: pstricks-add.sty 718 2018-01-30 09:11:28Z herbert $
%
\RequirePackage{pstricks}
\RequirePackage{pst-plot}
@@ -6,6 +6,7 @@
\RequirePackage{pst-3d}
\RequirePackage{pst-math}
\RequirePackage{multido}
+
\ProvidesPackage{pstricks-add}[2010/02/11 v. 0.14 package wrapper for
pstricks-add.tex (hv)]
\input{pstricks-add.tex}