summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-16 21:52:02 +0000
committerKarl Berry <karl@freefriends.org>2018-12-16 21:52:02 +0000
commitfdbdef80eba0c9bc973e568e0900c2f29ab170cc (patch)
tree9121159b25d61dbb5d124951f91c03aac0a7757c /Master
parent52c4d6235300874bb21256274d1404e5cc38b86a (diff)
pst-math (16dec18)
git-svn-id: svn://tug.org/texlive/trunk@49425 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/README2
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdfbin231364 -> 231813 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex13
-rw-r--r--Master/texmf-dist/dvips/pst-math/pst-math.pro4
-rw-r--r--Master/texmf-dist/tex/latex/pst-math/pst-math.sty57
6 files changed, 39 insertions, 38 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-math/Changes b/Master/texmf-dist/doc/generic/pst-math/Changes
index b1f9a7c0328..6a228ba8973 100644
--- a/Master/texmf-dist/doc/generic/pst-math/Changes
+++ b/Master/texmf-dist/doc/generic/pst-math/Changes
@@ -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
diff --git a/Master/texmf-dist/doc/generic/pst-math/README b/Master/texmf-dist/doc/generic/pst-math/README
index 67d090656a0..2838a7bf4b6 100644
--- a/Master/texmf-dist/doc/generic/pst-math/README
+++ b/Master/texmf-dist/doc/generic/pst-math/README
@@ -5,4 +5,4 @@ The macros for random numbers cannot be used with xelatex!
hvoss@tug.org
-%% $Id: README 859 2018-12-13 15:31:03Z herbert $
+%% $Id: README 864 2018-12-15 21:15:11Z herbert $
diff --git a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf
index 995dede1238..97b00889d7c 100644
--- a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
index 9978ef0148b..d40e7eb2f8f 100644
--- a/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-math/pst-math-doc.tex
@@ -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,7 +471,10 @@ nested.
\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}\\
@@ -493,7 +496,7 @@ Random list: \RandomNumbers
\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 @@ numbers:
\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 @@ numbers:
\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)
diff --git a/Master/texmf-dist/dvips/pst-math/pst-math.pro b/Master/texmf-dist/dvips/pst-math/pst-math.pro
index b9210312bdd..1d4f70369af 100644
--- a/Master/texmf-dist/dvips/pst-math/pst-math.pro
+++ b/Master/texmf-dist/dvips/pst-math/pst-math.pro
@@ -3,8 +3,8 @@
%
% Author : Christophe JORSSEN
% Author : Herbert Voß <hvoss@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
diff --git a/Master/texmf-dist/tex/latex/pst-math/pst-math.sty b/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
index af9cb22710f..0c0f1aef407 100644
--- a/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
+++ b/Master/texmf-dist/tex/latex/pst-math/pst-math.sty
@@ -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@No}\newcounter{Random@Left}\newcounter{Random@Right}\newcounter{Random@No@max}%
@@ -30,6 +32,8 @@
\setcounter{Random@No@max}{#3}%
\setcounter{Rand@No}{0}%
\def\RandomNumbers{}%
+ \def\R@Control{}%
+ \multido{\iA=1+1}{\theRandom@No@max}{\xdef\R@Control{0\R@Control}}%
}
\def\RandomNumbers{}%\pscalculate{randint(\theRandom@Left,\theRandom@Right)}}
@@ -43,41 +47,33 @@
\else
\xdef\RandomNumbers{\RandomNumbers,\@Number}%
\fi
-% \typeout{\RandomNumbers}%
}%
}
%
\def\makeRandomNumberList{%
\edef\@Number{\pscalculate{randint(\theRandom@Left,\theRandom@Right)}}% Zufallszahl
- \ifnum\theRand@No=\z@
- \xdef\RandomNumbers{\@Number}%
- \stepcounter{Rand@No}%
- \xdef\@Number{\pscalculate{randint(\theRandom@Left,\theRandom@Right)}}% Zufallszahl
- \fi
- \add@Number{\@Number}\RandomNumbers!!}
+ \add@Number{\@Number}}
-\def\add@Number#1#2!!{\edef\x{\noexpand\add@Number@i#1;#2,,\relax}\x}
-\def\add@Number@i#1;#2,#3,#4\relax{%
- \ifx\relax#2\relax % we found new number
- \xdef\RandomNumbers{\RandomNumbers,#1}%
+\def\add@Number#1{%
+ \def\R@Left{}\def\R@Right{}\def\R@Value{}%
+ \StrChar{\R@Control}{#1}[\R@Value]
+ \ifnum\R@Value=0
\stepcounter{Rand@No}%
- \ifnum\theRand@No>\theRandom@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@Number@i#1;,,\relax}%
- \else %
- \def\next{\add@Number@i#1;#3,#4\relax}%
- \fi
+ \ifnum\theRand@No=1\relax
+ \gdef\RandomNumbers{#1}%
+ \else
+ \xdef\RandomNumbers{\RandomNumbers,#1}%
\fi
+ \StrLeft{\R@Control}{\the\numexpr#1-1}[\R@Left]%
+ \StrRight{\R@Control}{\the\numexpr\theRandom@No@max-#1}[\R@Right]%
+ \xdef\R@Control{\R@Left1\R@Right}%
+ \fi
+ \ifnum\theRand@No=\theRandom@No@max
+ \def\next{}%
+ \else
+ \def\next{\makeRandomNumberList}%
\fi
- \ifnum\theRand@No<\theRandom@No@max \next \fi
+ \next
}
\def\getNumberFromList#1{%
\global\count0 = 1
@@ -92,5 +88,6 @@
\next
}
-
\endinput
+
+