I'd like to make LaTeX pick one image file randomly from a series of eight images, and include it. I found that ''lcg'' package can generate random numbers:
So i expected this line to include one of the images randomly:
Where the file names are excl01c.png, excl02c.png, and so on. The result was not like i have imagined, i got an error message:
Runaway definition? ->excl0\cr@nd = 126\advance \cr@nd \inputlineno \multiply \cr@nd 3\advance \ETC . ! TeX capacity exceeded, sorry [main memory size=3000000]. <argument> Random number generator initiali zed to \the \cr@nd
My question is what is the reason of this kind of error, and how to fix it, how to make LaTeX choose an image file randomly?