[texhax] random order

Oleg Katsitadze olegkat at gmail.com
Fri Oct 13 14:31:03 CEST 2006


On Fri, Oct 13, 2006 at 07:31:09AM -0400, William Adams wrote:
> That way the ordering of the random elements would remain consistent  
> so long as the pagination / placement doesn't change.

Of course, this would be good if the result is to be
"frozen" (e.g., a book or an article; but then, why not just
hard-code the seed into the file?).  But I can imagine some
applications when different output is desirable every time
TeX runs (e.g., tests/questionnaires).  In this case this
might not be simple.  One solution I can think of is to save
the current seed into the .aux file.  Next time, read the
.aux file and compare the old seed with the new one; if it's
the same, then increment it, or use a generated random
number as a seed.

Best,
Oleg


More information about the texhax mailing list