From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \dorecurse within TABLE
Date: Fri, 26 Oct 2012 12:17:15 +0200 [thread overview]
Message-ID: <CAG5iGsBX9JQez_g-1NbrO==WZMxVOVSWoWg9P9MjthyB2eSGTQ@mail.gmail.com> (raw)
In-Reply-To: <20121026115042.6852b97a@iram-hb-003386.extra.cea.fr>
[-- Attachment #1.1: Type: text/plain, Size: 1336 bytes --]
On Fri, Oct 26, 2012 at 11:50 AM, Alan BRASLAU <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
> 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
[-- Attachment #1.2: Type: text/html, Size: 2101 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-10-26 10:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-26 9:50 Alan BRASLAU
2012-10-26 10:17 ` luigi scarso [this message]
2012-10-26 10:27 ` Marco Patzer
2012-10-26 13:03 ` Alan BRASLAU
2012-10-26 13:16 ` Wolfgang Schuster
2012-10-26 13:19 ` Marco Patzer
[not found] ` <27567_1351256663_q9QD4MaY000605_20121026150359.109e8098@iram-hb-003386.extra.cea.fr>
2012-10-26 13:25 ` Alan BRASLAU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG5iGsBX9JQez_g-1NbrO==WZMxVOVSWoWg9P9MjthyB2eSGTQ@mail.gmail.com' \
--to=luigi.scarso@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).