From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47834 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \itemize[random] does not work Date: Fri, 27 Feb 2009 18:45:10 -0500 (EST) Message-ID: References: <20090227105707.GD31711@atos.labs.wmid.amu.edu.pl> <115224fb0902270325m12ee291fw1e5487ea53cadf2c@mail.gmail.com> <20090227113620.GE31711@atos.labs.wmid.amu.edu.pl> <115224fb0902270347i27afe54em3d3a6af4508157a0@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235779495 14056 80.91.229.12 (28 Feb 2009 00:04:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Feb 2009 00:04:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Feb 28 01:06:10 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LdChl-0005KH-Jf for gctc-ntg-context-518@m.gmane.org; Sat, 28 Feb 2009 01:05:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 61EE21FB82; Sat, 28 Feb 2009 01:03:10 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20454-05-2; Sat, 28 Feb 2009 01:01:53 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 540161FB29; Sat, 28 Feb 2009 01:01:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 788EC1FB39 for ; Sat, 28 Feb 2009 01:00:29 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16677-05-2 for ; Sat, 28 Feb 2009 00:57:25 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by ronja.ntg.nl (Postfix) with ESMTP id 1BC831FB7F for ; Sat, 28 Feb 2009 00:52:33 +0100 (CET) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by filter3-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n1RNjoGs018646 for ; Sat, 28 Feb 2009 00:48:47 +0100 Original-Received: FROM [192.168.2.8] (c-71-234-195-113.hsd1.ct.comcast.net [71.234.195.113]) BY hellskitchen.mr.itd.umich.edu ID 49A87B2C.43E62.11399 ; 27 Feb 2009 18:45:48 -0500 In-Reply-To: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.82; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 186381500 - dd11062c8673 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47834 Archived-At: 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 ___________________________________________________________________________________