diff options
author | Karl Berry <karl@freefriends.org> | 2017-09-12 22:16:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-09-12 22:16:46 +0000 |
commit | 645fea73b8e358e5c54f71495e375bce13497714 (patch) | |
tree | a8a2811e06438c5ec0bc0c9b120b8d2e716b423d /Master/texmf-dist/tex | |
parent | 572e6e6b61efe78bcd5a3a4b43cafcb0e97eb518 (diff) |
randomlist (12sep17)
git-svn-id: svn://tug.org/texlive/trunk@45281 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/randomlist/randomlist.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/randomlist/randomlist.tex | 34 |
2 files changed, 20 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/generic/randomlist/randomlist.sty b/Master/texmf-dist/tex/generic/randomlist/randomlist.sty index 30cb94e7500..da72a3f65f1 100644 --- a/Master/texmf-dist/tex/generic/randomlist/randomlist.sty +++ b/Master/texmf-dist/tex/generic/randomlist/randomlist.sty @@ -7,9 +7,9 @@ %% randomlist.dtx (with options: `latex') %% %% randomlist.dtx -%% Copyleft 2013-2016 J.-C. Charpentier & C. Tellechea +%% Copyleft 2013-2017 J.-C. Charpentier & C. Tellechea %% Packages `randomlist' to use with (La)eTeX -%% Copyleft (L) 2013-2016 Jean-C\^ome Charpentier & Christian Tellechea. +%% Copyleft (L) 2013-2017 Jean-C\^ome Charpentier & Christian Tellechea. %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -28,7 +28,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1995/06/01] \ProvidesPackage{randomlist} - [2016/07/13 v1.2 Package for random list (JCC, CT)] + [2017/09/11 v1.3 Package for random list (JCC, CT)] \RequirePackage{xkeyval} \DeclareOptionX{seed}{\gdef\RL@seed{#1}} \ExecuteOptions{seed=0} diff --git a/Master/texmf-dist/tex/generic/randomlist/randomlist.tex b/Master/texmf-dist/tex/generic/randomlist/randomlist.tex index 80832ce90c5..74a6d26422a 100644 --- a/Master/texmf-dist/tex/generic/randomlist/randomlist.tex +++ b/Master/texmf-dist/tex/generic/randomlist/randomlist.tex @@ -7,9 +7,9 @@ %% randomlist.dtx (with options: `tex') %% %% randomlist.dtx -%% Copyleft 2013-2016 J.-C. Charpentier & C. Tellechea +%% Copyleft 2013-2017 J.-C. Charpentier & C. Tellechea %% Packages `randomlist' to use with (La)eTeX -%% Copyleft (L) 2013-2016 Jean-C\^ome Charpentier & Christian Tellechea. +%% Copyleft (L) 2013-2017 Jean-C\^ome Charpentier & Christian Tellechea. %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -98,9 +98,9 @@ \newcount\RL@random@b \def\RLsetrandomseed#1{% \ifnum#1=0 - \RL@random \numexpr \time + \year * \month * \day \relax + \global\RL@random \numexpr \time + \year * \month * \day \relax \else - \RL@random \numexpr \ifnum#1<0 -\fi#1 \relax + \global\RL@random \numexpr \ifnum#1<0 -\fi#1 \relax \fi } \ifx\RL@seed\@undefined @@ -109,24 +109,24 @@ \RLsetrandomseed{\RL@seed} \fi \def\RL@nextrand{% - \RL@random@a=\RL@random - \divide\RL@random@a 127773 - \RL@random@b=\RL@random@a - \multiply\RL@random@a -2836 - \multiply\RL@random@b -127773 - \advance\RL@random\RL@random@b - \multiply\RL@random 16807 - \advance\RL@random\RL@random@a + \global\RL@random@a=\RL@random + \global\divide\RL@random@a 127773 + \global\RL@random@b=\RL@random@a + \global\multiply\RL@random@a -2836 + \global\multiply\RL@random@b -127773 + \global\advance\RL@random\RL@random@b + \global\multiply\RL@random 16807 + \global\advance\RL@random\RL@random@a \ifnum\RL@random<0 - \advance\RL@random 2147483647 + \global\advance\RL@random 2147483647 \fi } \def\RLuniformdeviate#1#2{% \RL@nextrand - \RL@random@a=\RL@random - \RL@random@b=\RL@random - \divide\RL@random@a \numexpr#1\relax - \RL@random@b \numexpr\RL@random@b - \RL@random@a * (#1)\relax + \global\RL@random@a=\RL@random + \global\RL@random@b=\RL@random + \global\divide\RL@random@a \numexpr#1\relax + \global\RL@random@b \numexpr\RL@random@b - \RL@random@a * (#1)\relax \expandafter\edef\csname #2\endcsname{\number\RL@random@b}% }% \newtoks\@ListOfList |