texlive[49413] Master/texmf-dist: pst-func (14dec18)

commits+karl at tug.org commits+karl at tug.org
Fri Dec 14 22:55:21 CET 2018


Revision: 49413
          http://tug.org/svn/texlive?view=revision&revision=49413
Author:   karl
Date:     2018-12-14 22:55:21 +0100 (Fri, 14 Dec 2018)
Log Message:
-----------
pst-func (14dec18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-func/Changes
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
    trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro
    trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
    trunk/Master/texmf-dist/tex/latex/pst-func/pst-func.sty

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2018-12-14 01:23:13 UTC (rev 49412)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2018-12-14 21:55:21 UTC (rev 49413)
@@ -1,4 +1,5 @@
 ..... pst-func.tex
+0.92  2018-12-13  - allow algebraic mode for \pscumIntegral
 0.91  2018-11-15  - new algorithm for sin/cos integral to prevent problems
                     with large values 
 0.90  2018-11-14  - fix bug with latest Ghostscript 
@@ -111,6 +112,7 @@
 
 
 ..... pst-func.pro
+0.17  2018-12-13  - allow algebraic mode for Simpson
 0.16  2018-11-15  - new algorithm for Si/si/Ci/ci
 0.15  2013-06-10  - fix bug with wrong arrow in psBezier#
 0.14  2013-06-03  - fix bug with arrow in psBezier#

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2018-12-14 01:23:13 UTC (rev 49412)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2018-12-14 21:55:21 UTC (rev 49413)
@@ -1,12 +1,10 @@
-%% $Id: pst-func-doc.tex 918 2014-05-19 12:32:37Z herbert $
+%% $Id: pst-func-doc.tex 861 2018-12-13 20:40:06Z herbert $
 \documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,
    headings=small, headinclude=false,footinclude=false,oneside]{pst-doc}
-\usepackage[utf8]{inputenc}
 \usepackage{pst-func}
 \let\pstFuncFV\fileversion
 \usepackage{pst-math}
 \usepackage{pstricks-add}
-\usepackage{luatex85}
 \usepackage{animate}
 \renewcommand\bgImage{%
 \psset{yunit=4cm,xunit=3}
@@ -19,7 +17,8 @@
   \psGaussI[linewidth=1pt]{-2}{2}%
   \psGauss[linecolor=cyan, mue=0.5, linewidth=2pt]{-1.75}{1.75}%
   \psGauss[sigma=1, linecolor=blue, linewidth=2pt]{-1.75}{1.75}
-\end{pspicture}}
+\end{pspicture}%
+}
 
 %\usepackage[style=dtk]{biblatex}
 \addbibresource{pst-func-doc.bib}
@@ -92,6 +91,7 @@
 \end{abstract}
 
 
+
 \section{\nxLcs{psBezier\#}}
 This macro can plot a B\'ezier spline from order $1$ up to $9$ which needs
 (order+$1$) pairs of given coordinates.
@@ -120,6 +120,7 @@
 \Lcs{psBezier}\Larg{\#}\OptArgs\coord0\coord1\coordn
 \end{BDef}
 
+
 The number of steps between the first and last control points is given
 by the keyword \Lkeyword{plotpoints} and preset to $200$. It can be
 changed in the usual way. 
@@ -1265,6 +1266,9 @@
 Finally, in green it is presented the integral of a Gaussian from -3 to 3, where the 
 variance is varying from 0.1 to 10.
 
+
+\psset{algebraic=false}
+
 \begin{LTXexample}
 \psset{xunit=1cm,yunit=4cm}
 \begin{pspicture}[linewidth=1pt](-5,-.2)(5,0.75)
@@ -1279,6 +1283,21 @@
 In the second example, a convolution is performed using two rectangle functions. 
 The result (in red) is a \Index{trapezoid function}.
 
+
+\begin{LTXexample}
+\psset{xunit=0.5cm,yunit=4cm}
+\begin{pspicture}[linewidth=1pt](-11,-1.5)(11,1.5)
+  \psaxes[dx=1cm,Dx=2]{->}(0,0)(-10.5,-1.25)(10.5,1.25)
+  \psCumIntegral[plotpoints=2000,Simpson=10,algebraic]{-10}{10}{-sin(x/2)/2}
+  \psplot[plotpoints=2000,linestyle=dashed,linecolor=red,algebraic]{-10}{10}{cos(x/2)}
+  \rput(4,0.5){\textcolor{red}{$\displaystyle\cos\left(\frac{x}2\right)$}}
+  \rput*(0,-1.1){$\displaystyle\int\limits\frac{-\sin(\frac{x}2)}{2}\mathrm dx$}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
 \clearpage
 \section{Distributions}
 All distributions which use the $\Gamma$- or $\ln\Gamma$-function need the \LPack{pst-math} package,
@@ -1335,6 +1354,8 @@
 
 
 
+
+
 \clearpage
 
 

Modified: trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro	2018-12-14 01:23:13 UTC (rev 49412)
+++ trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro	2018-12-14 21:55:21 UTC (rev 49413)
@@ -1,4 +1,4 @@
-%% $Id: pst-func.pro 918 2014-05-19 12:32:37Z herbert $
+%% $Id: pst-func.pro 861 2018-12-13 20:40:06Z herbert $
 %%
 %% This is file `pst-func.pro',
 %%
@@ -16,7 +16,7 @@
 %%   `pst-func' is a PSTricks package to plot special math functions
 %%
 %%
-%% version 0.16 / 2018-11-15  Herbert Voss
+%% version 0.17 / 2018-12-13  Herbert Voss
 %
 /tx at FuncDict 100 dict def
 tx at FuncDict begin
@@ -281,8 +281,9 @@
   end
 } def
 %
-/Simpson { % on stack must be a b M   --- simple version ---
+/Simpson { % on stack must be a b M useXVal   --- simple version ---
 % /SFunc must be defined 
+  /useX ED  % for algebraic functions which uses f(x)
   /M ED /b ED /a ED
   /h b a sub M 2 mul div def
   /s1 0 def
@@ -289,17 +290,18 @@
   /s2 0 def
   1 1 M {
     /k exch def
-    /x k 2 mul 1 sub h mul a add def
-    /s1 s1 x SFunc add def
+    /xVal k 2 mul 1 sub h mul a add def
+    /s1 s1 xVal useX { /x exch def } if SFunc add def
   } for
   1 1 M 1 sub {
     /k exch def
-    /x k 2 mul h mul a add def
-    /s2 s2 x SFunc add def
+    /xVal k 2 mul h mul a add def
+    /s2 s2 xVal useX { /x exch def } if SFunc add def
   } for
-  /I a SFunc b SFunc add s1 4 mul add s2 2 mul add 3 div h mul def
+  /I a useX { /x exch def } if SFunc b useX { /x exch def } if SFunc add s1 4 mul add s2 2 mul add 3 div h mul def
 } def
 %
+%
 /LogGamma { 5 dict begin	% z on stack
   /z ED
   /sum 0 def

Modified: trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2018-12-14 01:23:13 UTC (rev 49412)
+++ trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2018-12-14 21:55:21 UTC (rev 49413)
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 920 2014-05-20 18:21:51Z herbert $
+%% $Id: pst-func.tex 861 2018-12-13 20:40:06Z herbert $
 %%
 %% This is file `pst-func.tex',
 %%
@@ -31,8 +31,8 @@
 % interface to the `xkeyval' package
 \pst at addfams{pst-func}
 %
-\def\fileversion{0.91}
-\def\filedate{2018/11/15}
+\def\fileversion{0.92}
+\def\filedate{2018/12/13}
 \message{`PST-func' v\fileversion, \filedate\space (hv)}
 %
 \pstheader{pst-func.pro}
@@ -306,7 +306,7 @@
 %    a scx 0 moveto
     a scx 0 \@nameuse{beginqp@\psplotstyle}
     \psk at plotpoints 1 sub {
-      a b \psk at Simpson % a b M on Stack
+      a b \psk at Simpson false % a b M useXval on Stack
       tx at FuncDict begin Simpson I end % y value on stack
       scy b scx exch \@nameuse{doqp@\psplotstyle} %lineto
       /b b dx add def
@@ -470,10 +470,12 @@
     /b a dx add def
     /scx { \pst at number\psxunit mul } def
     /scy { \pst at number\psyunit mul } def
-    tx at FuncDict begin /SFunc { #3 } def end
+    tx at FuncDict begin
+     /SFunc \ifPst at algebraic (#3) tx at AlgToPs begin AlgToPs end cvx \else { #3 } \fi def
+    end
     a scx 0 moveto
     \psk at plotpoints 1 sub {
-      a b \psk at Simpson % a b M on Styack
+      a b \psk at Simpson\space \ifPst at algebraic true \else false \fi  % a b M useX on Stack
       tx at FuncDict begin Simpson I end % y value on stack
       scy b scx exch lineto
       /b b dx add def
@@ -498,12 +500,12 @@
     /scx { \pst at number\psxunit mul } def
     /scy { \pst at number\psyunit mul } def
     tx at FuncDict begin /SFunc { t #5 } def end
-      a b \psk at Simpson % a b M on Stack
+      a b \psk at Simpson false % a b M useX on Stack
       tx at FuncDict begin Simpson I end % y value on stack
       scy t scx exch moveto
       /t t dd add def
     \psk at plotpoints 1 sub {
-      a b \psk at Simpson % a b M on Stack
+      a b \psk at Simpson false % a b M useXon Stack
       tx at FuncDict begin Simpson I end % y value on stack
       scy t scx exch lineto
       /t t dd add def
@@ -517,7 +519,7 @@
 %
 \def\psConv{\@ifnextchar[{\psConv at i}{\psConv at i[]}}
 \def\psConv at i[#1]#2#3(#4,#5)#6#7{%
-  \psIntegral[#1]{#2}{#3}(#4,#5){pop pop x #6\space x t neg add #7\space mul}%
+  \psIntegral[#1]{#2}{#3}(#4,#5){pop pop xVal #6\space xVal t neg add #7\space mul}%
 }%
 %
 \define at key[psset]{pst-func}{PrintVLimit}[1e-6]{\def\psFunc at PrintVLimit{#1 }}

Modified: trunk/Master/texmf-dist/tex/latex/pst-func/pst-func.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-func/pst-func.sty	2018-12-14 01:23:13 UTC (rev 49412)
+++ trunk/Master/texmf-dist/tex/latex/pst-func/pst-func.sty	2018-12-14 21:55:21 UTC (rev 49413)
@@ -1,5 +1,5 @@
 \RequirePackage{pstricks}
-\ProvidesPackage{pst-func}[2017/08/17 package wrapper for pst-func.tex (hv)]
+\ProvidesPackage{pst-func}[2018/12/13 package wrapper for pst-func.tex (hv)]
 \RequirePackage{pst-plot}
 \RequirePackage{pst-math}
 \RequirePackage{pst-tools}
@@ -10,7 +10,7 @@
 \ProvidesFile{pst-func.tex}
   [\filedate\space v\fileversion\space `PST-func' (hv)]
 \IfFileExists{pst-func.pro}{%
-  \ProvidesFile{pst-func.pro}[2014/05/07 v. 0.16,  PostScript prologue file (hv)]
+  \ProvidesFile{pst-func.pro}[2018/12/13 v. 0.17,  PostScript prologue file (hv)]
 \@addtofilelist{pst-func.pro}}{}%
 \endinput
-%% $Id: pst-func.sty 918 2014-05-19 12:32:37Z herbert $
+%% $Id: pst-func.sty 861 2018-12-13 20:40:06Z herbert $



More information about the tex-live-commits mailing list