From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81196 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \recurselevel inside \bTABLE\eTABLE Date: Sun, 17 Mar 2013 22:52:21 +0100 Message-ID: <51463B15.70307@wxs.nl> References: <7D8B2708-F031-462D-924F-FD05FA7544F7@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1363557155 16630 80.91.229.3 (17 Mar 2013 21:52:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Mar 2013 21:52:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 17 22:53:01 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHLVi-0007f4-Va for gctc-ntg-context-518@m.gmane.org; Sun, 17 Mar 2013 22:52:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1BFEF101F3; Sun, 17 Mar 2013 22:52: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 zh-ZCPe1Ybsn; Sun, 17 Mar 2013 22:52:33 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id B9E31101EB; Sun, 17 Mar 2013 22:52:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9E2A8101EB for ; Sun, 17 Mar 2013 22:52:32 +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 r5uOlmBN5Xsr for ; Sun, 17 Mar 2013 22:52:31 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 65FA3101E3 for ; Sun, 17 Mar 2013 22:52:31 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2HMBcK5011793 for ; Sun, 17 Mar 2013 23:11:39 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.103; Original-Received: from [10.100.1.103] (unverified [10.100.1.103]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 11701-1713362 for multiple; Sun, 17 Mar 2013 22:52:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=11; city=Den Haag; latitude=52.0833; longitude=4.3000; http://maps.google.com/maps?q=52.0833,4.3000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01JcKbCvN - 046403186496 - 20130317 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 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:81196 Archived-At: On 3/17/2013 10:38 PM, Aditya Mahajan wrote: > On Sun, 17 Mar 2013, Wolfgang Schuster wrote: > >> >> Am 17.03.2013 um 13:00 schrieb Willi Egger : >> >>> Dear all, >>> >>> I should prepare a form with a table. The table rows should be numbered. >>> >>> How can I get get this done by using \recurselevel. >>> In the attached minimal example all rows are numbered with 0. >>> >>> \starttext >>> \subject{bTABLE--eTABLE: recurse creates rows} >>> \bTABLE >>> \dorecurse{3} >>> {\bTR >>> \bTD \recurselevel \eTD >>> \eTR} >>> \eTABLE >>> >>> What do i do wrongly here? >> >> You=92re doing nothing wrong but you have to expand the value of the >> counter. >> >> One feature of natural tables is the calculated width of the cells, to >> do this context stores >> the content of all cells in a token register, i.e. context stores >> \recurselevel as content >> of the cell and not the value of the iteration. This content is >> processed after all cells >> have been stored and the \recurselevel macro uses at this moment its >> default value 0. >> >> To expand the value of the counter use \expanded{=85} to force a expansi= on. >> >> \bTABLE >> \dorecurse{3}{\bTR\bTD\recurselevel\eTD\eTR} >> \eTABLE > > There was a long discussion on this a couple of years back. Summarized > here: > > http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-pas= t-the-present-and-the-future/ or \startluacode context.bTABLE() context.bTR() context.bTD() context.mathematics("(+)") context.eTD() for y =3D 1,6 do context.bTD() context(y) context.eTD() end context.eTR() for x =3D 1,6 do context.bTR() context.bTD() context(x) context.eTD() for y =3D 1,6 do context.bTD() context(x+y) context.eTD() end context.eTR() end context.eTABLE() \stopluacode ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________