[NTG-pdftex] \random?

Hans Hagen pragma at wxs.nl
Thu Jun 23 00:37:19 CEST 2005


Pawel Jackowski wrote:
> Hi All,
> 
> a couple of months ago I was asked to implement a simple random number 
> generator in TeX. It is not very hard for uniform distributions, but I 
> couldn't find satisfactory way to make it reliable and expandable. The 
> problem is that all generators I know (I'm not expirienced in that 
> stuff) use recently generated random number to make another one. For TeX 
> it means we need to make an assignment.

In ConTeXt I use Donald Arseneau's plain tex random.tex. It's normally ok (esp 
if we'd have a milliseconds counter)

> OK, there is no many practical reasons for that (: I've found two however.
> * if \pdfuniquresname is in use, one may want to make his own named 
> resources unique as well
> * when playing i.e. with page backgrounds or other TeX-based pictures, 
> it might be nice to have a possibility to use random text 
> size/color/position.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the ntg-pdftex mailing list