From 1bc8d960b33b7c52f207689addc2380b5eedda58 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Aug 2013 22:50:31 +0000 Subject: lcg (19aug13) git-svn-id: svn://tug.org/texlive/trunk@31474 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/lcg/lcg.pdf | Bin 145476 -> 265422 bytes Master/texmf-dist/source/latex/lcg/lcg.dtx | 19 ++++++++++--------- Master/texmf-dist/source/latex/lcg/lcg.ins | 2 +- Master/texmf-dist/tex/latex/lcg/lcg.sty | 15 ++++++++------- 4 files changed, 19 insertions(+), 17 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/lcg/lcg.pdf b/Master/texmf-dist/doc/latex/lcg/lcg.pdf index 2322ad3715f..ec67772522e 100644 Binary files a/Master/texmf-dist/doc/latex/lcg/lcg.pdf and b/Master/texmf-dist/doc/latex/lcg/lcg.pdf differ 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 % %\NeedsTeXFormat{LaTeX2e} -%\ProvidesPackage{lcg}[2008/09/10 v1.2 generating random numbers] +%\ProvidesPackage{lcg}[2013/08/09 v1.3 generating random numbers] %\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} diff --git a/Master/texmf-dist/source/latex/lcg/lcg.ins b/Master/texmf-dist/source/latex/lcg/lcg.ins index ea003047803..a3fbc96d34f 100644 --- a/Master/texmf-dist/source/latex/lcg/lcg.ins +++ b/Master/texmf-dist/source/latex/lcg/lcg.ins @@ -1,4 +1,4 @@ -%% File: lcg.ins Copyright (C) 2000 Erich Janka (janka@utanet.at) +%% File: lcg.ins Copyright (C) 2000--2013 Erich Janka (erich.janka@gmail.com) %% %% Docstrip installation instruction file for `lcg' 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 -- cgit v1.2.3