Re: [NTG-context] \itemize[random] does not work

2009-03-01 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes:

 \defineitemgroup[choices]
 
 \startmode[random]
\setupitemgroup[choices][1][random]
\nextrandom % to get rid of the randomize bug
 \stopmode

 Compile this file with texexec --mode=random  to get random choices, 
 compile without --mode=... to get normal behaviour. 

Thanks very much Aditya. That's awesome. I am going to try that for the next
test I make.









___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-03-01 Thread batela


For multiple choice you can try:

http://fourier.math.uoc.gr/~mk/much/example/

see:

 [NTG-context] create and grade multiple choice exams with MUCH an  
ConTeXT


have a nice day


Em 27/02/2009, às 10:45, Curious Learn escreveu:

I was not aware of this cool feature in Context. This could be very  
useful in
making multiple choice tests. I have one question. Is there a simple  
way in
which one can switch between itemized lists that are random and  
non-random? For
example, if I have 40 multiple choice questions, each of which has the  
following

form:

Question Text
\startitemize[random]
\startitem first item \stopitem
\startitem second item \stopitem
\startitem third item \stopitem
\startitem fourth item \stopitem
\stopitemize

If I want the PDF file that has the items in the order I entered them  
in (i.e.,
not a random permutation); is it possible to do that in a way other  
than going

and taking out the random from each itemize environment?

Thanks.


___ 

If your question is of interest to others as well, please add an entry  
to the Wiki!


maillist : ntg-context@ntg.nl /  
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___ 





Um Abraço,

Jorge Magalhães
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-03-01 Thread Wolfgang Schuster


Am 27.02.2009 um 22:22 schrieb Aditya Mahajan:

I've also noticed a strange thing: the first item always is the  
first -

it won't get mixed with the others.


There is a bug somewhere in the initialization of the random number  
generator. The first random number is always 1. An easy work around  
is to add \nextrandom somewhere before \starttext and then the first  
item will be random.



The best would be to add

  \appendtoks\nextrandom\to\everystarttext

to the core.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-03-01 Thread Hans Hagen

Wolfgang Schuster wrote:


Am 27.02.2009 um 22:22 schrieb Aditya Mahajan:


I've also noticed a strange thing: the first item always is the first -
it won't get mixed with the others.


There is a bug somewhere in the initialization of the random number 
generator. The first random number is always 1. An easy work around is 
to add \nextrandom somewhere before \starttext and then the first item 
will be random.



The best would be to add

  \appendtoks\nextrandom\to\everystarttext

to the core.


i'd rather try to figure out why the initialization fails; i noticed it 
a while ago, but couldn't find the reason


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-03-01 Thread Wolfgang Schuster
On Sun, Mar 1, 2009 at 7:46 PM, Hans Hagen pra...@wxs.nl wrote:

 i'd rather try to figure out why the initialization fails; i noticed it a
 while ago, but couldn't find the reason

Don't know why this happens with the randomizer in thrd-ran.tex but
it's easy to solve it in supp-ran.tex

Line 72 is '\ifx\normaluniformdeviate\undefined' but \normaluniformdeviate
is not defined but \uniformdeviate is defined (I guess \bindprimitive in
syst-ini.tex prefixed the commands with 'normal' in a earlier version).

You should also remove the normal prefix from the \nextrandom redefinition
in supp-ran.tex

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Wolfgang Schuster
On Fri, Feb 27, 2009 at 11:57 AM, Marcin Borkowski
mb...@atos.wmid.amu.edu.pl wrote:
 Hello,

 I've noticed that \startitemize[random] does not mix the items randomly.
 Is it a bug or am I doing something wrong?

A simple \item is not enough, you need a \startitem ... \stopitem pair.
Please add a note to the wiki.

\startitemize[a,random]
\startitem A \stopitem
\startitem B \stopitem
\startitem C \stopitem
\stopitemize

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Marcin Borkowski
Dnia Fri, Feb 27, 2009 at 12:25:39PM +0100, Wolfgang Schuster napisa#322;(a):
 On Fri, Feb 27, 2009 at 11:57 AM, Marcin Borkowski
 mb...@atos.wmid.amu.edu.pl wrote:
  Hello,
 
  I've noticed that \startitemize[random] does not mix the items randomly.
  Is it a bug or am I doing something wrong?
 
 A simple \item is not enough, you need a \startitem ... \stopitem pair.
 Please add a note to the wiki.
 
 \startitemize[a,random]
 \startitem A \stopitem
 \startitem B \stopitem
 \startitem C \stopitem
 \stopitemize

Thanks for a speedy response!

I've also noticed a strange thing: the first item always is the first -
it won't get mixed with the others.

 Wolfgang

Regards

-- 
Marcin Borkowski (http://mbork.pl)

888 * ostre słowa * ostra muzyka * ostra płyta
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Wolfgang Schuster
2009/2/27 Marcin Borkowski mb...@atos.wmid.amu.edu.pl:

 Thanks for a speedy response!

 I've also noticed a strange thing: the first item always is the first -
 it won't get mixed with the others.

This is normal although I have here a document [1] where the first item
always appear between the other items, you can try if this did also
happen for you.

[1] http://wolfgang.schuster.googlepages.com/baytex

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Aditya Mahajan

On Fri, 27 Feb 2009, Wolfgang Schuster wrote:


2009/2/27 Marcin Borkowski mb...@atos.wmid.amu.edu.pl:


Thanks for a speedy response!

I've also noticed a strange thing: the first item always is the first -
it won't get mixed with the others.


This is normal although I have here a document [1] where the first item
always appear between the other items,


There is a bug somewhere in the initialization of the random number 
generator. The first random number is always 1. An easy work around is to 
add \nextrandom somewhere before \starttext and then the first item will 
be random.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Curious Learn
I was not aware of this cool feature in Context. This could be very useful in
making multiple choice tests. I have one question. Is there a simple way in
which one can switch between itemized lists that are random and non-random? For
example, if I have 40 multiple choice questions, each of which has the following
form:

Question Text
\startitemize[random]
\startitem first item \stopitem
\startitem second item \stopitem
\startitem third item \stopitem
\startitem fourth item \stopitem
\stopitemize

If I want the PDF file that has the items in the order I entered them in (i.e.,
not a random permutation); is it possible to do that in a way other than going
and taking out the random from each itemize environment?

Thanks.


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \itemize[random] does not work

2009-02-27 Thread Aditya Mahajan

On Fri, 27 Feb 2009, Curious Learn wrote:


I was not aware of this cool feature in Context. This could be very useful in
making multiple choice tests. I have one question. Is there a simple way in
which one can switch between itemized lists that are random and non-random? For
example, if I have 40 multiple choice questions, each of which has the following
form:

Question Text
\startitemize[random]
\startitem first item \stopitem
\startitem second item \stopitem
\startitem third item \stopitem
\startitem fourth item \stopitem
\stopitemize

If I want the PDF file that has the items in the order I entered them in (i.e.,
not a random permutation); is it possible to do that in a way other than going
and taking out the random from each itemize environment?


Use modes:

\defineitemgroup[choices]

\startmode[random]
  \setupitemgroup[choices][1][random]
  \nextrandom % to get rid of the randomize bug
\stopmode


\starttext

\startchoices[n]
  \startitem 1 \stopitem
  \startitem 2 \stopitem
  \startitem 3 \stopitem
  \startitem 4 \stopitem
  \startitem 5 \stopitem
\stopchoices

\stoptext

Compile this file with texexec --mode=random  to get random choices, 
compile without --mode=... to get normal behaviour. If you want random all 
the time and normal a few times, then change 
\startmode[random]...\stopmode

to
\stopnotmode[nonrandom]  \stopnotmode.

Then when you compile with texexec --mode=nonrandom you will not get 
random choices, if you compile without --mode=... you will get random 
answers.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___