Re: [NTG-context] A macro which gives a random name

2015-04-19 Thread Otared Kavian
Hi Hans, Many thanks for your wonderful code… I modified a little bit the names you use in your code so that it may be used for other purposes as well (for instance if one wishes to select at random a certain number of exercises from different subsets among a huge a dataset of problems).

Re: [NTG-context] A macro which gives a random name

2015-04-19 Thread Hans Hagen
On 4/19/2015 9:51 AM, Otared Kavian wrote: Hi Hans, Many thanks for your wonderful code… I modified a little bit the names you use in your code so that it may be used for other purposes as well (for instance if one wishes to select at random a certain number of exercises from different

Re: [NTG-context] A macro which gives a random name

2015-04-18 Thread Wolfgang Schuster
Am 18.04.2015 um 18:55 schrieb Otared Kavian ota...@gmail.com: Hi everyone, In the example below I define a macro which chooses at random a name from a list of names. But I wonder whether this can be done in a more clever way without using a numerical macro created with math.random in

[NTG-context] A macro which gives a random name

2015-04-18 Thread Otared Kavian
Hi everyone, In the example below I define a macro which chooses at random a name from a list of names. But I wonder whether this can be done in a more clever way without using a numerical macro created with math.random in Lua. The shortcoming of the macro below is that before hand I must know

Re: [NTG-context] A macro which gives a random name

2015-04-18 Thread Otared Kavian
Hi Wolfgang, Thanks for your attention, but the problem with your solution is that each instance of \RandomFunctionName changes the name chosen, but I need something wihich remains the same name within a given situation (say each problem) but changes from problem to problem. For instance

Re: [NTG-context] A macro which gives a random name

2015-04-18 Thread Hans Hagen
On 4/18/2015 10:24 PM, Otared Kavian wrote: Hi again Wolfgang, Thanks to your hint, I could solve the problem… In case someone else would encounter a similar problem to solve, below is a macro which chooses an element from a list, it creates a control sequence (CS) containing that element and

Re: [NTG-context] A macro which gives a random name

2015-04-18 Thread Otared Kavian
Hi again Wolfgang, Thanks to your hint, I could solve the problem… In case someone else would encounter a similar problem to solve, below is a macro which chooses an element from a list, it creates a control sequence (CS) containing that element and it keeps the CS until the next time the macro