texlive[49425] Master/texmf-dist: pst-math (16dec18)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 16 22:52:02 CET 2018


Revision: 49425
          http://tug.org/svn/texlive?view=revision&revision=49425
Author:   karl
Date:     2018-12-16 22:52:02 +0100 (Sun, 16 Dec 2018)
Log Message:
-----------
pst-math (16dec18)

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

Modified: trunk/Master/texmf-dist/doc/generic/pst-math/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-math/Changes	2018-12-16 21:51:40 UTC (rev 49424)
+++ trunk/Master/texmf-dist/doc/generic/pst-math/Changes	2018-12-16 21:52:02 UTC (rev 49425)
@@ -1,4 +1,5 @@
 ..... pst-math.sty/pro
+0.65 2018-12-16  - allow lists with more than 100 numbers
 0.64 2018-12-13  - added macros for creating lists of randoms
 0.63 2014-07-30  - added the arc secans functions
 0.61 2010-10-02  - moved vasicek into pst-func to make the

Modified: trunk/Master/texmf-dist/doc/generic/pst-math/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-math/README	2018-12-16 21:51:40 UTC (rev 49424)
+++ trunk/Master/texmf-dist/doc/generic/pst-math/README	2018-12-16 21:52:02 UTC (rev 49425)
@@ -5,4 +5,4 @@
 hvoss at tug.org
 
 
-%% $Id: README 859 2018-12-13 15:31:03Z herbert $
+%% $Id: README 864 2018-12-15 21:15:11Z herbert $

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

Modified: trunk/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex	2018-12-16 21:51:40 UTC (rev 49424)
+++ trunk/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex	2018-12-16 21:52:02 UTC (rev 49425)
@@ -1,4 +1,4 @@
-%% $Id: pst-math-doc.tex 859 2018-12-13 15:31:03Z herbert $
+%% $Id: pst-math-doc.tex 864 2018-12-15 21:15:11Z herbert $
 \documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,
    headings=small, headinclude=false,footinclude=false,oneside,abstract=on]{pst-doc}
 \usepackage{pst-math}
@@ -471,8 +471,11 @@
 
 \section{Random numbers}
 Package \LPack{pst-math} supports the creation of random number lists where a number will
-appear only once. 
+appear only once. %But there is a different handling of the macros for Lua\LaTeX\ and the
+%other \TeX\ engines. %With Lua\TeX\ all random numbers are build with the help of Lua which
+%has the advantage that there will be no problem with \TeX's limited parameter stack size.
 
+
 \begin{BDef}
 \Lcs{defineRandIntervall}\Largr{min,max}{maxNo}\\
 \Lcs{makeSimpleRandomNumberList}\% multiple values possible\\
@@ -493,7 +496,7 @@
 \end{LTXexample}
 
 
-In the next example a random number appears only \emph{once} in the list. There no multiple
+In the next example a random number appears only \emph{once} in the list. There are no multiple
 numbers:
 
 
@@ -507,7 +510,7 @@
 
 
 \begin{LTXexample}[pos=t]
-\newcounter{RandNo} \setcounter{RandNo}{1}
+\newcounter{RandNo}
 \def\n{5} \def\N{\the\numexpr\n*\n}
 \defineRandIntervall(1,\N){\N}
 \makeRandomNumberList  \setcounter{RandNo}{1}
@@ -518,7 +521,7 @@
      \stepcounter{RandNo}}}
 \end{pspicture}
 \setcounter{RandNo}{1}
-\def\n{6} \def\N{\the\numexpr\n*\n}
+\def\n{10} \def\N{\the\numexpr\n*\n}
 \defineRandIntervall(1,\N){\N}
 \makeRandomNumberList  \setcounter{RandNo}{1}
 \begin{pspicture}(\n,\n)

Modified: trunk/Master/texmf-dist/dvips/pst-math/pst-math.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-math/pst-math.pro	2018-12-16 21:51:40 UTC (rev 49424)
+++ trunk/Master/texmf-dist/dvips/pst-math/pst-math.pro	2018-12-16 21:52:02 UTC (rev 49425)
@@ -3,8 +3,8 @@
 %
 % Author          : Christophe JORSSEN 
 % Author          : Herbert Voß <hvoss at tug.org>
-% Last Mod        : $Date: 2018/12/13 $
-% Version         : 0.64 $
+% Last Mod        : $Date: 2018/12/16 $
+% Version         : 0.65 $
 %
 /PI 3.14159265359 def
 /ENeperian 2.71828182846 def

Modified: trunk/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-math/pst-math.sty	2018-12-16 21:51:40 UTC (rev 49424)
+++ trunk/Master/texmf-dist/tex/latex/pst-math/pst-math.sty	2018-12-16 21:52:02 UTC (rev 49425)
@@ -1,4 +1,4 @@
-% $Id: pst-math.sty 859 2018-12-13 15:31:03Z herbert $
+% $Id: pst-math.sty 864 2018-12-15 21:15:11Z herbert $
 %%
 %% This is file `pst-math.sty'.
 %%
@@ -12,13 +12,15 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{pst-math}[2018/12/13 v 0.64package wrapper for PSTricks pst-math.tex]
+\ProvidesPackage{pst-math}[2018/12/16 v 0.65 package wrapper for PSTricks pst-math.tex]
 \RequirePackage{pst-calculate}
+\RequirePackage{ifluatex}
+\RequirePackage{xstring}
 \input pst-math.tex
 \ProvidesFile{pst-math.tex}
   [\filedate\space v\fileversion\space `PST-math' (hv)]
 \IfFileExists{pst-math.pro}{\ProvidesFile{pst-math.pro}%
-    [2018/12/13 v. 0.64,  PostScript prologue file (hv)]
+    [2018/12/13 v. 0.65,  PostScript prologue file (hv)]
 \@addtofilelist{pst-math.pro}}{}%
 
 \newcounter{Rand at No}\newcounter{Random at Left}\newcounter{Random at Right}\newcounter{Random at No@max}%
@@ -30,6 +32,8 @@
   \setcounter{Random at No@max}{#3}%
   \setcounter{Rand at No}{0}%
   \def\RandomNumbers{}%
+  \def\R at Control{}%
+  \multido{\iA=1+1}{\theRandom at No@max}{\xdef\R at Control{0\R at Control}}%
 }
 
 \def\RandomNumbers{}%\pscalculate{randint(\theRandom at Left,\theRandom at Right)}}
@@ -43,41 +47,33 @@
     \else
       \xdef\RandomNumbers{\RandomNumbers,\@Number}%
     \fi
-%    \typeout{\RandomNumbers}%
   }%
 }
 %
 \def\makeRandomNumberList{%
   \edef\@Number{\pscalculate{randint(\theRandom at Left,\theRandom at Right)}}% Zufallszahl
-  \ifnum\theRand at No=\z@
-    \xdef\RandomNumbers{\@Number}%
-    \stepcounter{Rand at No}%
-    \xdef\@Number{\pscalculate{randint(\theRandom at Left,\theRandom at Right)}}% Zufallszahl
-  \fi
-  \add at Number{\@Number}\RandomNumbers!!}
+  \add at Number{\@Number}}
 
-\def\add at Number#1#2!!{\edef\x{\noexpand\add at Number@i#1;#2,,\relax}\x}
-\def\add at Number@i#1;#2,#3,#4\relax{%
-  \ifx\relax#2\relax % we found new number
-    \xdef\RandomNumbers{\RandomNumbers,#1}%
+\def\add at Number#1{%
+  \def\R at Left{}\def\R at Right{}\def\R at Value{}%
+  \StrChar{\R at Control}{#1}[\R at Value]
+  \ifnum\R at Value=0 
     \stepcounter{Rand at No}%
-    \ifnum\theRand at No>\theRandom at No@max
-      \def\next{}% Neue Zahl?
-    \else 
-      \def\next{\makeRandomNumberList}
-    \fi%
-  \else
-    \ifnum#1=#2 % no new number
-      \def\next{\makeRandomNumberList}%
-    \else 
-      \ifx\relax#3\relax 
-        \def\next{\add at Number@i#1;,,\relax}%
-      \else %
-        \def\next{\add at Number@i#1;#3,#4\relax}%
-      \fi
+    \ifnum\theRand at No=1\relax
+      \gdef\RandomNumbers{#1}%
+    \else
+      \xdef\RandomNumbers{\RandomNumbers,#1}%
     \fi
+    \StrLeft{\R at Control}{\the\numexpr#1-1}[\R at Left]%
+    \StrRight{\R at Control}{\the\numexpr\theRandom at No@max-#1}[\R at Right]%
+    \xdef\R at Control{\R at Left1\R at Right}%
   \fi
-  \ifnum\theRand at No<\theRandom at No@max \next \fi
+  \ifnum\theRand at No=\theRandom at No@max
+    \def\next{}%
+  \else
+    \def\next{\makeRandomNumberList}%
+  \fi
+  \next
 }
 \def\getNumberFromList#1{%
   \global\count0 = 1
@@ -92,5 +88,6 @@
   \next
 }
 
+\endinput
 
-\endinput
+



More information about the tex-live-commits mailing list