5
votes
1answer
79 views

Print arguments of a macro in a random order

I have the following (simplified) LaTeX code that simply prints all its arguments. \newcommand{\mm}[4]{#1 #2 #3 #4} Now, I would like the arguments to be printed in a random order, e.g., #2 #1 #4 ...
17
votes
2answers
460 views

Selecting random elements from a comma separated list

I would like to have a command (either user-defined, or from a package, or whatever) that has the basic form: \selectNrandom{N}{list, of, comma, separated, elements}{code to execute} which will ...
7
votes
1answer
896 views

Conditional using non-integer numbers

I am trying to generate fractals using affine transformations. I need to generate a random number in the interval (0,1), and depending on the value of this random number choose a function to ...