From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86423 Path: news.gmane.org!not-for-mail From: Xan Newsgroups: gmane.comp.tex.context Subject: Re: solutions and problems Date: Sun, 23 Feb 2014 21:12:56 +0100 Message-ID: <20140223211256.995de895b9bee380d281f8e8@telefonica.net> References: <20140220101511.0c8fac08c374f6eb81424e44@telefonica.net> <20140220132233.a836d8f54fcf1cad6c02abd1@telefonica.net> <20140221102820.6b3cd633b35893d1a16c1ec0@telefonica.net> <20140222184537.617522aac557ab64c217971b@telefonica.net> <20140223200945.4cc7e7a24161e9dd3f367440@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 1393186732 4070 80.91.229.3 (23 Feb 2014 20:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Feb 2014 20:18:52 +0000 (UTC) Cc: mailing list for ConTeXt users To: Wolfgang Schuster Original-X-From: ntg-context-bounces@ntg.nl Sun Feb 23 21:19:02 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 1WHfVt-0003CI-25 for gctc-ntg-context-518@m.gmane.org; Sun, 23 Feb 2014 21:19:01 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 43764101F2; Sun, 23 Feb 2014 21:19:00 +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 I0AVR7HTQeSc; Sun, 23 Feb 2014 21:18:58 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9691E101E3; Sun, 23 Feb 2014 21:18:58 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B33A5101E3 for ; Sun, 23 Feb 2014 21:18:57 +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 2yDBF6NEhHDM for ; Sun, 23 Feb 2014 21:18:54 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id D600A101E1 for ; Sun, 23 Feb 2014 21:18:44 +0100 (CET) Original-Received: from smtp.movistar.es (smtp20.acens.net [86.109.99.144]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s1NKIgwF031395 for ; Sun, 23 Feb 2014 21:18:43 +0100 X-CTCH-RefID: str=0001.0A0B020C.530A57A0.00EA, 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 5309D9AD0002B36E; Sun, 23 Feb 2014 20:18:40 +0000 In-Reply-To: <20140223200945.4cc7e7a24161e9dd3f367440@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: 0RLtUiGQG - 72c1060bd7b9 - 20140223 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:86423 Archived-At: > > Can you help me? > > Your counter settings are useless because context stores only the environment plus content for the answers, nothing is done with them at this point. When you flush the answer blocks context sees them for the first time and the counter for the questions is 3 at this point and this is why you get always the same value. Is there any way of first evaluate \getnumber[exercici] and then store the content, and not inversely (as context does now)? > > \defineenumeration[exercici][text=Exercici] > \defineenumeration[resposta][text=Solucions] > > \defineblock[resposta] > \hideblocks[resposta] > > \starttext > > \startexercici Question 1 > \beginresposta > \resposta Answer 1 \par > \endresposta > \stopexercici > > \startexercici Question 2 > \beginresposta > \incrementcounter[resposta] > \endresposta > \stopexercici > > \startexercici Question 3 > \beginresposta > \resposta Answer 3 \par > \endresposta > \stopexercici > > \subject{Answers} > > \selectblocks[resposta] > > \stoptext > > Wolfgang Increment counter *every* time is possible option, but in fact very annoying: if I have 100 exercises (now I have more than this) and I have only 20 exercises, then I have to put "\incrementcounter" in 80 exercises. It's a tedious thing. Is there any more "relaxing" thing: assuming that I have 'resposta' nested in 'exercici' like \startexercici \beginresposta \resposta Answer X \endresposta \stopexercici ? Thanks another time, Xan ___________________________________________________________________________________ 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 ___________________________________________________________________________________