summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lcg/lcg.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lcg/lcg.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lcg/lcg.sty15
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