I want to create unique ID numbers for my documents, and am doing so using a random number generator like this:
\usepackage[first=1, last=100000000]{lcg}
\newcommand{\random}{\rand\arabic{rand}}
However, really I would like to create a random number once on first build of the document and then have the same number used from then on in subsequent builds. Can I do this? and if so, how?
seed
option for lcg (page 2 of manual).seed
option will help? The OP wants an initial random integer that is then retained for subsequent builds. I assume you are suggesting to use a seed value. But if the OP must enter a random seed, then they might as well just input a random document number instead, correct? Now if the OP needs many persistent random numbers generated in a single document, then I can see how a seed value would be useful.