diff options
author | Karl Berry <karl@freefriends.org> | 2013-08-19 22:50:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-08-19 22:50:31 +0000 |
commit | 1bc8d960b33b7c52f207689addc2380b5eedda58 (patch) | |
tree | f26ec275d3c8d65a3a23ae1186b85e01a8de2aa6 /Master/texmf-dist/tex/latex/lcg/lcg.sty | |
parent | 4fc059d84872dabd58b4d041eeaa55e5669feef7 (diff) |
lcg (19aug13)
git-svn-id: svn://tug.org/texlive/trunk@31474 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lcg/lcg.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lcg/lcg.sty | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/lcg/lcg.sty b/Master/texmf-dist/tex/latex/lcg/lcg.sty index 0a7b330c74d..8b615ea0abb 100644 --- a/Master/texmf-dist/tex/latex/lcg/lcg.sty +++ b/Master/texmf-dist/tex/latex/lcg/lcg.sty @@ -6,7 +6,7 @@ %% %% lcg.dtx (with options: `lcg') %% -%% Copyright (c) 2001, 2003, 2008 Erich Janka -- Das Vollpreiskind (janka@utanet.at) +%% Copyright (c) 2001--2013 Erich Janka (erich.janka@gmail.com) %% %% This package may be distributed and/or modified under the terms of the %% LaTeX Project Public License, as described in lppl.txt in the base @@ -17,7 +17,7 @@ %% %% This program consits of the files lcg.dtx and lcg.ins \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lcg}[2008/09/10 v1.2 generating random numbers] +\ProvidesPackage{lcg}[2013/08/09 v1.3 generating random numbers] \RequirePackage{keyval} \@ifundefined{rand}{} {\PackageWarning{lcg}{Command `rand' already defined}} @@ -193,13 +193,13 @@ } % end of \rand \def\r@nd{% \ifnum \cr@nd < \@ne% then ... initialize generator - \cr@nd = \the\time - \advance \cr@nd \inputlineno - \multiply \cr@nd \thepage - \advance \cr@nd \the\year + \cr@nd = \the\time + \advance \cr@nd \inputlineno + \multiply \cr@nd \value{page} + \advance \cr@nd \the\year \multiply \cr@nd \the\month \multiply \cr@nd \the\day - \advance \cr@nd \inputlineno + \advance \cr@nd \inputlineno \if \qui@t y% \else \typeout{Random number generator initialized to \the\cr@nd}% @@ -217,6 +217,7 @@ \ifnum \cr@nd < \z@% \advance \cr@nd 2147483647 % cr@nd = (a*z mod m) > 0 \fi + \global\cr@nd=\cr@nd % persist the change outside current scope \fi }% end of \r@nd \initr@nd % initialize the package |