Hello
I answer it yourself. I was experimented and thought about using buffers
and the problem is successfully for my library resolved :-)
I think that I found an interesting use of the letter module...
Jaroslav
Only for example :
\directlua{dofile("scancsv.lua")}
\setupcolors[state=start]
\usemodule[letter]
\setupletter
[fromname={The Author},
fromaddress={Hidden Street 2\\57895 Mystery town}]
\startbuffer[myletter]
\startletter[
toname={\Firstname\ \Name},
toaddress={\Street\\ \Zipcode\ \Town},
opening={Dear \Firstname,},
subject={Step by step guide to write a letter to \Firstname\ \Name},
closing={{\color Greetings from the Author} to \Name\ \Firstname}]
Thus, I came to the conclusion ... \Mygreeting
\stopletter
\stopbuffer
\starttext
\setheader
\opencsvfile{file1.csv}
% Recurse using
\dorecurse{5}{
\getbuffer[myletter]
\nextrow
\page
}
\page
% Or loop cycle
\opencsvfile{file2.csv}
\doloop{\ifnotEOF\getbuffer[myletter]\nextrow\else\exitloop\fi} %OK
\stoptext
Dne 29.8.2010 2:34, Jaroslav Hajtmar napsal(a):
Hello,
Can be deployed print letters due t-letter module in the cycle?
When I use recursion, then an error occurs.
I note that I am going to change the values (from CSV file) in a cycle
(that someone thought that I want to write a few the same letters in
cycle :-)
here is my example:
\usemodule[letter]
\starttext
\dorecurse{5}{
\startletter[
toname={Name},
toaddress={Address},
opening={Dear Name,},
subject={Step by step guide to write a letter},
closing={Greetings from the Author}]
Thus, I came to the conclusion ...
\stopletter
\page
}
\stoptext
Thanx, Jaroslav
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry
to the Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / 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
___________________________________________________________________________________