From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47474 Path: news.gmane.org!not-for-mail From: batela Newsgroups: gmane.comp.tex.context Subject: Re: blocks in LuaTex Date: Tue, 17 Feb 2009 18:33:37 +0000 Message-ID: <8ba6659fc3cb564b45c7f441ce24ed2f@tugamail.com> References: <8655F72B-1081-4B70-849F-AA5A83C5FA04@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v624) Content-Type: multipart/mixed; boundary=Apple-Mail-2-1037863887 X-Trace: ger.gmane.org 1234895771 19761 80.91.229.12 (17 Feb 2009 18:36:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 18:36:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Feb 17 19:37:25 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 1LZUou-0008HQ-AO for gctc-ntg-context-518@m.gmane.org; Tue, 17 Feb 2009 19:37:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 96BEE1FB77; Tue, 17 Feb 2009 19:35:58 +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 15164-01-4; Tue, 17 Feb 2009 19:34:30 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B25761FB3C; Tue, 17 Feb 2009 19:34:30 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 60B391FB3C for ; Tue, 17 Feb 2009 19:34:28 +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 15164-01-3 for ; Tue, 17 Feb 2009 19:33:46 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by ronja.ntg.nl (Postfix) with ESMTP id E56FC1FB38 for ; Tue, 17 Feb 2009 19:33:46 +0100 (CET) Original-Received: from sapo.pt (relay6.ptmail.sapo.pt [212.55.154.26]) by filter4-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with SMTP id n1HIXjRQ004284 for ; Tue, 17 Feb 2009 19:33:46 +0100 Original-Received: (qmail 13097 invoked from network); 17 Feb 2009 18:33:40 -0000 Original-Received: from unknown (HELO sapo.pt) (10.134.37.163) by relay6 with SMTP; 17 Feb 2009 18:33:40 -0000 Original-Received: (qmail 26966 invoked from network); 17 Feb 2009 18:33:40 -0000 X-AntiVirus: PTMail-AV 0.3-0.92.0 X-Virus-Status: Clean (0.02012 seconds) Original-Received: from unknown (HELO [192.168.1.7]) (as9938358@sapo.pt@[85.244.56.59]) (envelope-sender ) by mta13 (qmail-ldap-1.03) with SMTP for ; 17 Feb 2009 18:33:38 -0000 In-Reply-To: <8655F72B-1081-4B70-849F-AA5A83C5FA04@gmail.com> X-Mailer: Apple Mail (2.624) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.55.154.26; country=PT; region=14; city=Lisboa; latitude=38.7167; longitude=-9.1333; http://maps.google.com/maps?q=38.7167,-9.1333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 181365043 - b31f2cf25acb X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:47474 Archived-At: --Apple-Mail-2-1037863887 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Dear Sir, thanks for your reply. The original code is written by Hans and had=20 worked perfectly (see the attach). Em 17/02/2009, =E0s 5:57, Wolfgang Schuster escreveu: > > Am 17.02.2009 um 18:36 schrieb batela: > >> Im the past I make some exams using the file in the attach. Now, I=20= >> need to prepare another exam but this old file don't work with the=20 >> new Context version. >> >> I had defined a block designed question bat \startquestion isn't re= --Apple-Mail-2-1037863887 Content-Transfer-Encoding: 7bit Content-Type: application/x-tex; x-unix-mode=0744; name="exam_from_Hans.tex" Content-Disposition: attachment; filename=exam_from_Hans.tex \startelements dutch english german czech italian romanian french begin: beginvan start anfang zacatek inizio inceput debut end: eindvan stop ende konec fine sfarsit fin \stopelements \defineenumeration[Answer][text=Question] \defineenumeration[Question] \defineblock[answer,question] \setupblock[answer][before={\startAnswer\resetscore},after={\savescore\stopAnswer}] \setupblock[question][before={\startQuestion},after={\stopQuestion}] \makecounter{totalscore} \definelist[Score] [pagenumber=no, width=5em, height=broad, textcommand=\showscores, numbercommand=\showquestionnumber, ] \def\showscores#1{\dotfill\emspace#1~points} \def\showquestionnumber#1{Question~#1} \def\score[#1]% {\incrementcounter{totalscore}{#1}% \dotfill\emspace#1~points\endgraf} \def\resetscore{\resetcounter{totalscore}} \def\savescore{\expanded{\dowritetolist{Score} {\convertednumber[Answer]}{\countervalue{totalscore}}{Question}}} \hideblocks[answer,question] \def\generateexam {\title{Exam} \useblocks[question] \title{Scores} \placelist[Score][criterium=all] \title{Criteria} \useblocks[answer]} \starttext \startquestion In a body with mass=2 kg is applied a force of 2N. Which is the body acceleration? \startanswer write F = m a \score[5] solve a = F/m \score[4] find and write correctly a = 1 m/s2 \score[1] \stopanswer \stopquestion \startquestion In a body with mass=2 kg is applied a force of 2N. Which is the body acceleration? \startanswer write F = m a \score[5] solve a = F/m \score[14] find and write correctly a = 1 m/s2 \score[10.5] \stopanswer \stopquestion \generateexam \stoptext --Apple-Mail-2-1037863887 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed >> cognised. Why? Thanks for your support. > > Your question has nothing to do with the block mechanism. Your example > can't work because you defined the enumerations 'Question' and = 'Answer' > but not 'question' and 'answer'. > > Wolfgang > > = _______________________________________________________________________=20= > ____________ > If your question is of interest to others as well, please add an entry = =20 > to the Wiki! > > maillist : ntg-context@ntg.nl / =20 > 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 > = _______________________________________________________________________=20= > ____________ > > Abra=E7os, Jorge Manuel de Almeida Magalh=E3es --Apple-Mail-2-1037863887 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --Apple-Mail-2-1037863887--