From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78907 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: \dorecurse within TABLE Date: Fri, 26 Oct 2012 12:17:15 +0200 Message-ID: References: <20121026115042.6852b97a@iram-hb-003386.extra.cea.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1292150444==" X-Trace: ger.gmane.org 1351246645 28477 80.91.229.3 (26 Oct 2012 10:17:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2012 10:17:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 26 12:17:31 2012 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 1TRgyp-0002H6-0n for gctc-ntg-context-518@m.gmane.org; Fri, 26 Oct 2012 12:17:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9D2E5101F5; Fri, 26 Oct 2012 12:17:22 +0200 (CEST) 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 Gz7rSy6C736C; Fri, 26 Oct 2012 12:17:21 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0373B10207; Fri, 26 Oct 2012 12:17:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 429C010207 for ; Fri, 26 Oct 2012 12:17:20 +0200 (CEST) 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 kqoc7MAMGVsp for ; Fri, 26 Oct 2012 12:17:19 +0200 (CEST) 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 1AD12101F5 for ; Fri, 26 Oct 2012 12:17:18 +0200 (CEST) Original-Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q9QAOa3C020510 for ; Fri, 26 Oct 2012 12:24:37 +0200 Original-Received: by mail-ee0-f41.google.com with SMTP id c4so1157159eek.14 for ; Fri, 26 Oct 2012 03:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Q1h7tr21BHP4Zcn16tmYi0PNn8ciUQoCJnVqdZtEgBY=; b=esRRbBDZXteDpV0LhavJB3jDEd9KsFs+hBDEbrvCYilJAaiNgohOGLNNGkKco3qgor BmM7aijQBI4yWNw0g/Y9Z1HDJ8FfX46z5FoWF9RYSXpetmZJS0WQY7BXKvYFCYMEd6jn pCVl1XldL0Lu2deB/gHCnh7vaDhnWxplhRywGczbJ9/dHqtVPmr5Mc3thVukrM+P9pTs c8K2mwDnAf5p54vlg3h3mqF/P1o53gvAujbyR8gE8+UM84jNObAIIzo5i6PpmECVXWI3 Sy21e9hZaTC1P/F2sliMdrwI5HX4A5daDK/WlDG+BwJV1sXweMgdG+wnrF7iiBcwU5UE UVYg== Original-Received: by 10.14.214.133 with SMTP id c5mr30537546eep.8.1351246635618; Fri, 26 Oct 2012 03:17:15 -0700 (PDT) Original-Received: by 10.223.192.193 with HTTP; Fri, 26 Oct 2012 03:17:15 -0700 (PDT) In-Reply-To: <20121026115042.6852b97a@iram-hb-003386.extra.cea.fr> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01IfKoAdN - a2b817713946 - 20121026 (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:78907 Archived-At: --===============1292150444== Content-Type: multipart/alternative; boundary=047d7b603b98b851de04ccf39f50 --047d7b603b98b851de04ccf39f50 Content-Type: text/plain; charset=UTF-8 On Fri, Oct 26, 2012 at 11:50 AM, Alan BRASLAU wrote: > Does anyone have a solution to \dorecurse within TABLE? > Alan > > Minimal example: > > \starttext > \dorecurse{8}{\recurselevel\crlf} > > \bTABLE > \dorecurse{8}{\bTR\bTD\recurselevel\eTD\eTR} > \eTABLE > \stoptext > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ > table are strange, they can be parsed more than one time to achive the result If you use mkiv maybe the lua version is better \starttext \dorecurse{8}{\recurselevel\crlf} \startluacode global_cnt=0; \stopluacode \bTABLE %% ok, but why 17 ? \dorecurse{8}{\bTR\bTD\ctxlua{global_cnt=global_cnt+1;context(global_cnt-17)}:\recurselevel\eTD\eTR} \eTABLE %% straight \startluacode context.bTABLE() for i=1,8 do context.bTR() context.bTD() context(i) context.eTD() context.eTR() end context.eTABLE() \stopluacode \stoptext -- luigi --047d7b603b98b851de04ccf39f50 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Fri, Oct 26, 2012 at 11:50 AM, Alan B= RASLAU <alan.braslau@cea.fr> wrote:
Does anyone have a solution to \dorecurse within TABLE?
Alan

Minimal example:

\starttext
\dorecurse{8}{\recurselevel\crlf}

\bTABLE
\dorecurse{8}{\bTR\bTD\recurselevel\eTD\eTR}
\eTABLE
\stoptext
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =C2=A0: http= ://www.pragma-ade.nl / http://tex.aanhet.net
archive =C2=A0: http://foundry.supelec.fr/projects/contextrev/
wiki =C2=A0 =C2=A0 : http://contextgarden.net
___________________________________________________________________________= ________

table are strange, they can be parsed more than one = time to achive the result
If you use mkiv maybe the lua ve= rsion is better
\starttext
\dorecurse{8}{\recurselevel\crlf}
\star= tluacode
global_cnt=3D0;
\stopluacode
\bTABLE
%% ok, but why 17 ?
\dorec= urse{8}{\bTR\bTD\ctxlua{global_cnt=3Dglobal_cnt+1;context(global_cnt-17)}:\= recurselevel\eTD\eTR}
\eTABLE

%% straight
\startluacode
co= ntext.bTABLE()
for i=3D1,8 do
context.bTR()
context.bTD() context(i) context.eTD()context.eTR()
end
context.eTABLE()
\stopluacode

\stoptext=

--
luigi

--047d7b603b98b851de04ccf39f50-- --===============1292150444== 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1292150444==--