ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* recursion/loop with counter?
@ 2005-01-06 13:25 Henning Hraban Ramm
  2005-01-06 13:38 ` Vit Zyka
  2005-01-06 14:41 ` Hans Hagen
  0 siblings, 2 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2005-01-06 13:25 UTC (permalink / raw)


Hello again!

In a form I need a lot of empty, but numbered fields.
Can I access the counter of \dorecurse somehow, or is there another  
loop command?

e.g.
\dorecurse{20}{\bTR \bTD \LoopCounter bottles of beer \eTD \bTD{\strut}  
\eTD \eTR}
or
\dorecurse{20}{\definefield[Fld\LoopCounter][line][MySetup][]\field[Fld\ 
LoopCounter]}


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: recursion/loop with counter?
  2005-01-06 13:25 recursion/loop with counter? Henning Hraban Ramm
@ 2005-01-06 13:38 ` Vit Zyka
  2005-01-06 14:41 ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Vit Zyka @ 2005-01-06 13:38 UTC (permalink / raw)


Henning Hraban Ramm wrote:
> In a form I need a lot of empty, but numbered fields.
> Can I access the counter of \dorecurse somehow, or is there another  

\recurselevel

Vit Zyka

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: recursion/loop with counter?
  2005-01-06 13:25 recursion/loop with counter? Henning Hraban Ramm
  2005-01-06 13:38 ` Vit Zyka
@ 2005-01-06 14:41 ` Hans Hagen
  2005-01-06 19:35   ` Henning Hraban Ramm
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2005-01-06 14:41 UTC (permalink / raw)


Henning Hraban Ramm wrote:
> \dorecurse{20}{\bTR \bTD \LoopCounter bottles of beer \eTD \bTD{\strut}  
> \eTD \eTR}

\dorecurse{20}
   {\bTR \expanded{\bTD \recurselevel bottles of beer \eTD} \bTD \strut \eTD \eTR}

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: recursion/loop with counter?
  2005-01-06 14:41 ` Hans Hagen
@ 2005-01-06 19:35   ` Henning Hraban Ramm
  2005-01-07  8:42     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2005-01-06 19:35 UTC (permalink / raw)


Am 06.01.2005 um 15:41 schrieb Hans Hagen:
> \dorecurse{20}
>   {\bTR \expanded{\bTD \recurselevel bottles of beer \eTD} \bTD \strut 
> \eTD \eTR}

But what if I need it in a call to some function like:

\dorecurse{10}{\SkillField{Skill\expanded\recurselevel}}

Then I always get 0 (or an error in some cases).


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: recursion/loop with counter?
  2005-01-06 19:35   ` Henning Hraban Ramm
@ 2005-01-07  8:42     ` Hans Hagen
  2005-01-07 10:52       ` m-letter Rob Ermers
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2005-01-07  8:42 UTC (permalink / raw)


Henning Hraban Ramm wrote:
> Am 06.01.2005 um 15:41 schrieb Hans Hagen:
> 
>> \dorecurse{20}
>>   {\bTR \expanded{\bTD \recurselevel bottles of beer \eTD} \bTD \strut 
>> \eTD \eTR}
> 
> 
> But what if I need it in a call to some function like:
> 
> \dorecurse{10}{\SkillField{Skill\expanded\recurselevel}}

\dorecurse{10}{\expanded{\SkillField{Skill\recurselevel}}}

\expanded is one of the more interesting commands, it does *not* expand the 
\SkillField, only what comes after it

\startexpanded ... \stopexpanded does expand everything,

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 9+ messages in thread

* m-letter
  2005-01-07  8:42     ` Hans Hagen
@ 2005-01-07 10:52       ` Rob Ermers
  2005-01-07 11:06         ` m-letter Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Rob Ermers @ 2005-01-07 10:52 UTC (permalink / raw)


Dear friends,

Some time ago Wolfgang Zilig asked on this forum if the letter module is 
still supported. He also sent his log file, the last line of which reads:

system         : macros of module letter loaded
(C:\texmf\tex\plain\base\letter.tex
! Undefined control sequence.
l.13 \nopagenumbers
?

I have been experimenting a few days with the letter module, exactly as 
described in xcorrespondence, with the use of an xml database. 
Unfortunately I cannot get it right either.

My log file shows a number of errors, the first being the  same as in 
Wolfgang's. The error seems to be not a missing file, since al files are 
found, but rather something  else.

Does anyone have a clue?

Kind regards,

Robert Ermers


specials       : fdf,tpd loaded
system         : macros of module letter loaded
(J:\tex\localtexmf\tex\context\base\m-letter.tex
system         : no macros found in module letter
color          : system rgb is global activated
system         : no macros found in module letter
)
system         : macros of module letter loaded
(J:\tex\texmf\tex\plain\base\letter.tex
! Undefined control sequence.
l.13 \nopagenumbers
?
! Undefined control sequence.
l.14 \headline
               ={\ifnum\pageno>1
?
! Font \logofont=stan70 at 70.0pt not loadable: Metric (TFM) file not found.
l.52 \font\logofont=stan70 at 70truept
?
....

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: m-letter
  2005-01-07 10:52       ` m-letter Rob Ermers
@ 2005-01-07 11:06         ` Taco Hoekwater
  2005-01-07 14:12           ` m-letter Rob Ermers
  0 siblings, 1 reply; 9+ messages in thread
From: Taco Hoekwater @ 2005-01-07 11:06 UTC (permalink / raw)



Hi,

Rob Ermers wrote:
> Dear friends,
> 
> Some time ago Wolfgang Zilig asked on this forum if the letter module is 
> still supported. He also sent his log file, the last line of which reads:
> 
> system         : macros of module letter loaded
> (C:\texmf\tex\plain\base\letter.tex
> ! Undefined control sequence.
> l.13 \nopagenumbers
> ?

That is a plain TeX input file, named "letter.tex". It is loaded because
ConTeXt uses the name you feed into \usemodule without prefix as last
resort (if it cannot find any version with a t-, s- or m- prefix).

It is not related to the ConTeXt letter module.

> specials       : fdf,tpd loaded
> system         : macros of module letter loaded
> (J:\tex\localtexmf\tex\context\base\m-letter.tex

What is in this file ? It is obviously present, but does it
actually contain the 'letter module' macros? (I doubt that)

Greetings, Taco

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: m-letter
  2005-01-07 11:06         ` m-letter Taco Hoekwater
@ 2005-01-07 14:12           ` Rob Ermers
  2005-01-10 22:53             ` m-letter John Culleton
  0 siblings, 1 reply; 9+ messages in thread
From: Rob Ermers @ 2005-01-07 14:12 UTC (permalink / raw)


Dear friends,

Thanks for your reactions to my previous message.

After some experimenting I succeeded in creating a letter with 
m-letter.tex and an xml database. I shall put the model on the wiki soon.

However, one problem remains to be solved. The command \input after 
\startbuffer is not recognised.

Do you have an idea how to get it right?

Regards,

Robert

\startbuffer[texletter]
\input brieftekst
\stopbuffer

\setvariables
[letter:data]
[address=\XMLflush{address},
prefix=\XMLflush{prefix},
initials=\XMLflush{initials},
formalname=\XMLflush{formalname},
informalname=\XMLflush{informalname},
content={\getbuffer[texletter]}
]

Result in pdf:

Geachte Heer Hagen,
“input brieftekst
Met vriendelijke groet,

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: m-letter
  2005-01-07 14:12           ` m-letter Rob Ermers
@ 2005-01-10 22:53             ` John Culleton
  0 siblings, 0 replies; 9+ messages in thread
From: John Culleton @ 2005-01-10 22:53 UTC (permalink / raw)


On Friday 07 January 2005 09:12, Rob Ermers wrote:
> Dear friends,
>
> Thanks for your reactions to my previous message.
>
> After some experimenting I succeeded in creating a letter with
> m-letter.tex and an xml database. I shall put the model on the wiki soon.
>
> However, one problem remains to be solved. The command \input after
> \startbuffer is not recognised.
>
> Do you have an idea how to get it right?
>
> Regards,
>
I don't know if this is helpful but I have used letterformat.tex which is 
taken from the Knuth _TeXBook_ 

For mailing list/ form letter applications I have used some truly ancient 
macros called "midnight macros" by Marcel Van der Goot.. 

The TeXsis macros by Eric Myers have a form letter application also. 
-- 
John Culleton

Short list of publishing/marketing books:
http://wexfordpress.com/tex/shortlist.pdf

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-01-10 22:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-06 13:25 recursion/loop with counter? Henning Hraban Ramm
2005-01-06 13:38 ` Vit Zyka
2005-01-06 14:41 ` Hans Hagen
2005-01-06 19:35   ` Henning Hraban Ramm
2005-01-07  8:42     ` Hans Hagen
2005-01-07 10:52       ` m-letter Rob Ermers
2005-01-07 11:06         ` m-letter Taco Hoekwater
2005-01-07 14:12           ` m-letter Rob Ermers
2005-01-10 22:53             ` m-letter John Culleton

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).