[OS X TeX] Variable

Alain Schremmer Schremmer.Alain at gmail.com
Wed May 3 21:40:09 CEST 2006


Christopher Allen wrote:

> I don't know probsoln at all. Specifically, I don't know how i and j 
> get assigned. 

Up to now, I have just assigned them as i=question number in question 
folder, j = variant number in the file. So, for instance, Q22-5 is the 
fifth variant in file 22 in the question folder. But when I enter this 
by hand—so far I haven't been able to write a single Apple script both 
for lack of time and lack of ability. (The programmer's mind is 
something different or at least so I fathom when I listen to my Software 
Engineer son)

> When I've wanted to do calculations and the like, I've used
>
> \usepackage{calc}
>
> followed by groups of things like
>
> \newcounter{xyz}
> \setcounter{xyz}{\value{abc}*12}
> \addtocounter{xyz}{1}
> \arabic{xyz}
>
> If probsoln uses regular counters, I would think they would be 
> accessible via various other commands for counters. The various 
> commands for counters won't really care if the counters keep being 
> changed, just whether the counters are present and what values they hold.
>
>> (1) I am using probsoln which uses \PSNrandseed{N} to seed the 
>> randomness of the multiple choices. I would like to have in the 
>> document a line that says to print the particular N.
>
>
> So, how about
>
> \newcounter{seedNumber}
> \setcounter{seedNumber}{123} % 123 would be whatever seed number 
> you've chosen
> \arabic{seedNumber} % to print the seed number
> \PSNrandseed{\value{seedNumber}} % to use the seed number as you were 
> before
>
> Would that do what you want?
>
> I have to run, but I'll think on #2. #3 and #4 are beyond me. Hope 
> that helps.

No doubt for some idiotic reason I have forgotten, I hadn't realized 
that calc was actually computing so now I will at least read the doc.

I will try all of this in a couple of days and get back to report.

Grateful regards
--schremmer
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list