summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/lcg/lcg.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/lcg/lcg.dtx')
-rw-r--r--Master/texmf-dist/source/latex/lcg/lcg.dtx19
1 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/lcg/lcg.dtx b/Master/texmf-dist/source/latex/lcg/lcg.dtx
index f9f706e4763..052c5dd6996 100644
--- a/Master/texmf-dist/source/latex/lcg/lcg.dtx
+++ b/Master/texmf-dist/source/latex/lcg/lcg.dtx
@@ -1,6 +1,6 @@
% \iffalse
% File: lcg.dtx
-%% 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
@@ -12,7 +12,7 @@
%% This program consits of the files lcg.dtx and lcg.ins
%
%<lcg>\NeedsTeXFormat{LaTeX2e}
-%<lcg>\ProvidesPackage{lcg}[2008/09/10 v1.2 generating random numbers]
+%<lcg>\ProvidesPackage{lcg}[2013/08/09 v1.3 generating random numbers]
%<lcg>\RequirePackage{keyval}
%
%<*driver>
@@ -21,8 +21,8 @@
\begin{document}
\GetFileInfo{lcg.sty}
\title{The \texttt{lcg} package}
- \author{Erich Janka -- Das Vollpreiskind\\ \texttt{janka@utanet.at}}
- \date{2008/09/10 (v1.2)}
+ \author{Erich Janka\\ \texttt{erich.janka@gmail.com}}
+ \date{2013/08/09 (v1.3)}
\maketitle
\DocInput{lcg.dtx}
\end{document}
@@ -588,13 +588,13 @@
% \begin{macrocode}
\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}%
@@ -612,6 +612,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
% \end{macrocode}