Jean-Philippe Rey schrieb am 24.05.2019 um 13:49:
Hello Everybody,

Le 8 avr. 2019 à 15:26, Henning Hraban Ramm <> a écrit :

How would you approach serial letters, e.g. to all members of a club?
(Actually I need to send out donation receipts.)

I’d like to use the letter module, since my usual letter design is using it.

I can export the addresses to CSV, JSON, Lua tables or whatever or transfer 
them to a SQLite db.
Would it make more sense to read them in Lua and combine this data with a 
buffer, or to write a single tex file for every letter?
I know how to do the latter, but I’d like to learn a more ConTeXt-ish way.
Would it make sense to use the bibliographies module?
I have the same need. I tried a basic solution:

======================= Start failing example

   closing={Sincerely yours,}


   Blah blah \GLciv.



\GenLetter[civ={M.}, to={Pierre Durand}, adr={Trifouillis-les-Oies}]

======================= End failing example

My idea being to generate as many letters I like by multiplying the \GenLetter 

However, I get an error message I don’t understand. Can someone point to the 
thing I am doing wrong ?
The problem is that you put the letter-environment in a command but the environment uses the buffer mechanism to store the content which doesn't work when it is used in a command definition.

What you have to do is to move the content of the letters out of the \GenLetter command, you can use the lettercontent-environment for this. In the \GenLetter command you now use the \placeletter command to flush the content of the letter with the current values for the address etc.

%%%% begin example

     closing={Sincerely yours,}]

  [   toname=\correspondenceparameter{to},

  Blah blah \correspondenceparameter{civ}.



\GenLetter[civ={M.}, to={Pierre Durand}, adr={Trifouillis-les-Oies}]

%%%% end example


If your question is of interest to others as well, please add an entry to the 

maillist : /
webpage  : /
archive  :
wiki     :

Reply via email to