From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86381 Path: news.gmane.org!not-for-mail From: Xan Newsgroups: gmane.comp.tex.context Subject: Re: solutions and problems Date: Thu, 20 Feb 2014 13:22:33 +0100 Message-ID: <20140220132233.a836d8f54fcf1cad6c02abd1@telefonica.net> References: <20140220101511.0c8fac08c374f6eb81424e44@telefonica.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1392899309 12296 80.91.229.3 (20 Feb 2014 12:28:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 12:28:29 +0000 (UTC) Cc: mailing list for ConTeXt users To: otared@gmail.com Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 20 13:28:38 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 1WGSk1-0002C9-H3 for gctc-ntg-context-518@m.gmane.org; Thu, 20 Feb 2014 13:28:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C947C101EE; Thu, 20 Feb 2014 13:28: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 j2nHJaPVhpfn; Thu, 20 Feb 2014 13:28:34 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D5DFC101E6; Thu, 20 Feb 2014 13:28:34 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 313E2101E6 for ; Thu, 20 Feb 2014 13:28:34 +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 jgXD24vy-qAG for ; Thu, 20 Feb 2014 13:28:32 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 74386101E2 for ; Thu, 20 Feb 2014 13:28:22 +0100 (CET) Original-Received: from smtp.movistar.es (smtp20.acens.net [86.109.99.144]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s1KCSGcX013921 for ; Thu, 20 Feb 2014 13:28:20 +0100 X-CTCH-RefID: str=0001.0A0B0208.5305F4DF.009D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Spam: Unknown Original-Received: from rulot (81.32.88.229) by smtp.movistar.es (8.6.117.05) (authenticated as dxpublica) id 53038BAC00100F89; Thu, 20 Feb 2014 12:28:15 +0000 In-Reply-To: <20140220101511.0c8fac08c374f6eb81424e44@telefonica.net> X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.22; i686-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=86.109.99.144; country=ES; latitude=40.0000; longitude=-4.0000; http://maps.google.com/maps?q=40.0000,-4.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03LsAsgxM - 84f43a148b18 - 20140220 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:86381 Archived-At: 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 ;-) Thanks, > Hi, > > Maybe this is what you looking for: > > %%%% begin question-hint-answer.tex > \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 > %%%% end question-hint-answer.tex > > Best regards: OK ___________________________________________________________________________________ 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 ___________________________________________________________________________________