Otared KAVIAN wrote:

Indeed I guess that this is due to the random seed used by LuaTeX: is it
possible to force a new random seed upon each typesetting?

The randomseed is set by context, and saved between consecutive runs of
the same file. Normally, this is what you would want: just imagine what
happens if each of the luatex runs in a 'context' call used a different
value always.

However (this is mostly for Hans), there is a bug in that process: all
randomseeds in mkiv appear to be between 0 and 1. Since math.randomseed() expects an integer, this gives almost no
randomness at all to the seed values.

If you want near-random randomness, you can set the seed yourself
based on the return value of os.time():

  \ctxlua{math.randomseed(os.time())}

Best wishes,
Taco



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to