From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86383 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: solutions and problems Date: Thu, 20 Feb 2014 14:13:19 +0100 Message-ID: <61E33008-2B95-4DA6-BE14-91B2A659221D@gmail.com> References: <20140220101511.0c8fac08c374f6eb81424e44@telefonica.net> <20140220132233.a836d8f54fcf1cad6c02abd1@telefonica.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1392902018 12047 80.91.229.3 (20 Feb 2014 13:13:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 13:13:38 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 20 14:13:47 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGTRc-0000Tg-SJ for gctc-ntg-context-518@m.gmane.org; Thu, 20 Feb 2014 14:13:40 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0482F101F2; Thu, 20 Feb 2014 14:13:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nN8lTbiXrGQh; Thu, 20 Feb 2014 14:13:33 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 929DF101E6; Thu, 20 Feb 2014 14:13:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 75C9D101E6 for ; Thu, 20 Feb 2014 14:13:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xm5EVg3O86pO for ; Thu, 20 Feb 2014 14:13:29 +0100 (CET) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id AE91E101E2 for ; Thu, 20 Feb 2014 14:13:29 +0100 (CET) Original-Received: from mail-bk0-x22a.google.com (mail-bk0-x22a.google.com [IPv6:2a00:1450:4008:c01::22a]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s1KDDNIp030845 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 20 Feb 2014 14:13:29 +0100 Original-Received: by mail-bk0-f42.google.com with SMTP id 6so613066bkj.29 for ; Thu, 20 Feb 2014 05:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=A0w56rsJnLQci+zggb9n0GB+2/ev8ASfoUj2FNowEFM=; b=MzrS6QDtOEjj1WqqksGivhRkpoCup02WHwi1McWH8RizbxZKqsIUnvgIJV099sPnQ+ XWDyfXzwRytmtvlAVOrQ/8p/E4YVhj4ZJ0ihYIfySaHrbuNcFFZgW+otqFXNAluB2p0s j7fyy+Qud6RG2vEMj2bFBl3x//oUbN13PRHhMyIcbVUBGZn3E7qbEbJ4st7Qm0YDj00/ c0Ed1dkUkJXctIjUHEgWRxNHnJZhic8bOBPAjxiseb8diXJmV5kb/xVW2alAyQrptyrN Xzy6Q+bNvlSxFMrGoy+qmky5KT7IW/qk8a1FxiQuqMgK2eOOJNLQ21RJouEAHoJxGa2x XS9g== X-Received: by 10.204.243.9 with SMTP id lk9mr586815bkb.93.1392902003530; Thu, 20 Feb 2014 05:13:23 -0800 (PST) Original-Received: from keima.localdomain (x2f21ea6.dyn.telefonica.de. [2.242.30.166]) by mx.google.com with ESMTPSA id r1sm3665191bkk.2.2014.02.20.05.13.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 05:13:21 -0800 (PST) In-Reply-To: <20140220132233.a836d8f54fcf1cad6c02abd1@telefonica.net> X-Mailer: Apple Mail (2.1827) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:4008:c01::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07LsBdnao - cc57f56e71e2 - 20140220 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:86383 Archived-At: Am 20.02.2014 um 13:22 schrieb Xan : > Not exactly. If you don't have the same number of answers that the number of questions, so your counter is not properly set. See that: > > \defineblock[question] > \defineblock[hint] > \defineblock[answer] > > \defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}] > \defineenumeration[hint] [alternative=hanging,width=4cm,text={Hint for question},stopper={.}] > \defineenumeration[answer] [alternative=hanging,width=4.5cm,text={Answer to question},stopper={.}] > > \keepblocks[question] > \hideblocks[hint] > \hideblocks[answer] > > \starttext > > \section{Questions} > > \beginquestion > \startquestion > Compute $4\times 5$. > \stopquestion > \endquestion > > > \beginhint > \starthint > Use the fact that $2\times 5 = 10$. > \stophint > \endhint > > %\beginanswer > %\startanswer > % $20$. > %\stopanswer > %\endanswer > > \beginquestion > \startquestion > What is the value of $100/10$? > \stopquestion > \endquestion > > \beginhint > \starthint > Remember that $10\times 10 = 100$. > \stophint > \endhint > > \beginanswer > \startanswer > $10$ > \stopanswer > \endanswer > > \section{Hints} > > \useblocks[hint] > > \section{Answers} > > \useblocks[answer] > > \stoptext > > If you comment one solution, then, you get "Answer to question 1", instead of "Answer of question 2", which is really. No always a question has an answer provided by me ;-) You can add a answer block which increments the answer counter. \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question}] \defineenumeration[answer] [text={Answer}] \keepblocks[question] \hideblocks[answer] \starttext \chapter{Question} \beginquestion \startquestion Question 1. \stopquestion \endquestion \beginanswer \startanswer Answer 1. \stopanswer \endanswer \beginquestion \startquestion Question 2. \stopquestion \endquestion \beginanswer \incrementcounter[answer] \endanswer \beginquestion \startquestion Question 3. \stopquestion \endquestion \beginanswer \startanswer Answer 3. \stopanswer \endanswer \chapter{Answers} \useblocks[answer] \stoptext 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________