ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <w.egger@boede.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \dorecurse and \recurselevel in Natural Tables
Date: Fri, 6 Mar 2009 12:20:49 +0100	[thread overview]
Message-ID: <A3E6AF6B-16F5-43D3-998E-09F8D1225605@boede.nl> (raw)
In-Reply-To: <alpine.LNX.2.00.0903052159170.29619@ybpnyubfg.ybpnyqbznva>

Hi Aditya,

Happy luaTeXing. Great summary.

Willi

On Mar 6, 2009, at 4:05 AM, Aditya Mahajan wrote:

> On Thu, 5 Mar 2009, luigi scarso wrote:
>
>> On Thu, Mar 5, 2009 at 12:09 PM, Wolfgang Schuster
>> <schuster.wolfgang@googlemail.com> wrote:
>>>
>>> Am 05.03.2009 um 01:17 schrieb luigi scarso:
>>>
>>>> \starttext
>>>> %%% TeX version
>>>> \bTABLE
>>>> \dorecurse{5}
>>>> {\bTR\expandafter \bTD \recurselevel. \eTD\expandafter
>>>>        \bTD \recurselevel  \eTD\eTR}
>>>> \eTABLE
>>>>
>>>> \dorecurse{2}
>>>> {\recurselevel. \recurselevel\crlf}
>>>
>>> And you think it's a good idea to use \expandafter in your document?
>> TeX  version, not context ... :)
>> btw
>> \expandafer is not so bad, if used moderatly .
>>
>>>
>>> \expanded is the tool for users to get this result without knowledge
>>> about TeX internals and expansion, this is from core-ntb:
>>>
>>> % permits \expanded{\bTD ... \eTD}
>>>
>>> \unexpanded\def\eTR{}
>>> \unexpanded\def\eTD{}
>>> \unexpanded\def\eTH{}
>>> \unexpanded\def\eTN{}
>> yes, of course one need to know about \expandafter... so is not so  
>> different .
>> But it's context style.
>>
>>>
>>>> %%% luatex version
>>>> \startluacode
>>>>   tprint = function(s) tex.sprint(tex.ctxcatcodes,s) end
>>>>   tprint('\\bTABLE')
>>>>   for j = 1,5 do
>>>>       tprint('\\bTR')
>>>>       tprint('\\bTD' .. j .. '.' .. '\\eTD' .. '\\bTD' .. j .. '\ 
>>>> \eTD')
>>>>       tprint('\\eTR')
>>>>   end
>>>>   tprint('\\eTABLE')
>>>> \stopluacode
>>>> \stoptext
>>>
>>> Nice solution and real alternative for package writers to avoid  
>>> \expandafter
>>> and \expanded but nothing for a normal user, I should keep this  
>>> in my mind.
>> Are you sure ?
>> What is a normal user ?
>> As soon as you use \dorecurse , you become a programmer .
>>
>> And sooner or later, everyone become a programmer, because it's
>> impossible to write a format that satisfied
>> all your needs .
>
> My summary of this thread:
> http://randomdeterminism.wordpress.com/2009/03/05/tex-programming- 
> the-past-the-present-and-the-future/
>
> Aditya________________________________________________________________ 
> ___________________
> 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
> ______________________________________________________________________ 
> _____________

___________________________________________________________________________________
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
___________________________________________________________________________________


  parent reply	other threads:[~2009-03-06 11:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04 19:35 Curious Learn
2009-03-04 19:53 ` luigi scarso
2009-03-04 20:04   ` luigi scarso
2009-03-05  0:17   ` luigi scarso
2009-03-05 11:09     ` Wolfgang Schuster
2009-03-05 11:27       ` luigi scarso
2009-03-05 12:00         ` Wolfgang Schuster
2009-03-05 13:23           ` luigi scarso
2009-03-05 13:52             ` Wolfgang Schuster
2009-03-05 14:23               ` luigi scarso
2009-03-05 14:53                 ` Wolfgang Schuster
2009-03-05 15:08                   ` luigi scarso
2009-03-06  3:05         ` Aditya Mahajan
2009-03-06  6:41           ` luigi scarso
2009-03-06 10:47             ` Wolfgang Schuster
2009-03-06 11:20           ` Willi Egger [this message]
2009-03-06 13:01           ` Curious Learn
2009-03-06 13:32             ` Arthur Reutenauer
2009-03-06 16:15               ` Curious Learn
2009-03-06 13:35             ` luigi scarso
2009-03-06 14:49           ` Wolfgang Schuster
2009-03-06 16:33             ` Aditya Mahajan
2009-03-06 17:07               ` Wolfgang Schuster
2009-03-06 16:38           ` Aditya Mahajan
2009-03-04 20:35 ` Wolfgang Schuster
2009-03-04 20:57   ` Curious Learn
2009-03-04 21:11     ` Wolfgang Schuster
2009-03-04 21:43       ` Aditya Mahajan
2009-03-04 21:51         ` Wolfgang Schuster
2009-03-04 22:17       ` Curious Learn
2009-03-04 22:35         ` Wolfgang Schuster

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=A3E6AF6B-16F5-43D3-998E-09F8D1225605@boede.nl \
    --to=w.egger@boede.nl \
    --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).