[OS X TeX] Variable

Alain Schremmer Schremmer.Alain at gmail.com
Fri May 12 18:38:31 EDT 2006


Christopher Allen wrote:

> I don't know probsoln at all. Specifically, I don't know how i and j  
> get assigned. 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.

I just tried it and it does exactly what I wanted.

I will now work on the suggestions for my other questions.

Very 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 MacOSX-TeX mailing list