From: Curious Learn <curiouslearn@gmail.com>
To: ntg-context@ntg.nl
Subject: Two questions - Cross Referencing (Automated label generation + Random items)
Date: Tue, 3 Mar 2009 13:17:03 +0000 (UTC) [thread overview]
Message-ID: <loom.20090303T130404-820@post.gmane.org> (raw)
As I mentioned earlier, I am trying to use Context to make a multiple choice
test. I have two questions.
(1) Suppose I want to get a list of answers to the the multiple choice
questions. One way I can think of doing this is by assigning a label to the
CORRECT answer as done in the following code and then referring to that label.
Is there a way these labels can be generated automatically, instead of
hardcoding them as I have done below?
defineenumeration[problem][text= ,location=inleft]
\setupenumerations[problem][stopper=)]
\defineitemgroup[choices][levels=1]
\setupitemgroup[choices][1][a,packed]
\nextrandom
\starttext
\problem This is the first question.
\startchoices
\startitem This is incorrect answer 1. \stopitem
\startitem This is a wrong answer too. \stopitem
\startitem[1] This is the CORRECT answer. \stopitem
\startitem Yet another wrong answer. \stopitem
\stopchoices
\problem This is the second question.
\startchoices
\startitem[2] This is the CORRECT answer. \stopitem
\startitem This is a wrong answer too. \stopitem
\startitem This is not a correct choice. \stopitem
\startitem Yet another wrong answer. \stopitem
\stopchoices
Answers to the questions
\in[1]
\in[2]
\stoptext
(2) When I add the option "random" to the itemgroup
(\setupitemgroup[choices][1][a,packed,random]) then as expected the choices are
listed in a random order. However, the label does not change with the choice
listing. I want the reference to be attached to the CORRECT answer, which
changes its position with random option. Is there a way to have the reference
reflect the letter corresponding to the correct answer.
Thanks in advance for your help. I really appreciate it.
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2009-03-03 13:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 13:17 Curious Learn [this message]
2009-03-03 23:37 ` Wolfgang Schuster
2009-03-04 12:54 ` Curious Learn
2009-03-04 13:26 ` Wolfgang Schuster
2009-03-04 15:53 ` Curious Learn
2009-03-04 16:04 ` Mikael Persson
2009-03-04 16:23 ` pst-labo a pstricks module batela
2009-03-07 9:44 ` Wolfgang Schuster
2009-03-04 17:10 ` Two questions - Cross Referencing (Automated label generation + Random items) Curious Learn
2009-03-04 14:01 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20090303T130404-820@post.gmane.org \
--to=curiouslearn@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).