[NTG-context] Problem with letter module

Wolfgang Schuster schuster.wolfgang at googlemail.com
Thu Jan 19 00:21:29 CET 2012

Am 18.01.2012 um 21:14 schrieb Romain Diss:

> Hi,
> I am writing a letter with the 'letter' module (mkiv and last beta) and the 
> \encl{} command doesn't work anymore. I know that the module has been rewriten 
> recently but I can't find any doc or examples of the new syntax. I tried to 
> look at the source code but it doesn't help.
> So is there any command which replace \encl{}? And is there any documentation 
> (even succint) of the new module?

With the new version of the module I tried to get rid of a few things which lead
to problems or which didn’t fit into context normal syntax. The \encl, \cc and \ps
had been such a thing and all three value can now only bet set as keyval argument,
e.g. \startletter[enclosure=…]

There isn’t a new documentation yet but I’ll give a short overview.

There is now only one way to set values for the letter variables in this is \setupletter
with it’s keyval syntax, e.g. \setupletter[name=…,address=…]. The \setlettervalue
command from the previous version is gone and won’t come back.

The letter environment has now only optional argument which acts like a local
version of \setupletter where the values are only used in the environment.
When you use your document only for a single letter without anything else
you can even drop \starttext and \stoptext because this is handled by \startletter
and \stopletter.

To change the labels in the reference line for the “Date” string you have
to use the \setuplettertext command, a special version of \setuplabeltext only
for the letter module.

Styles are still loaded with \useletterstyle but when you want to put your own
settings in a style file you have to name the file “letter-<style>.tex|mkiv”. To load
the style you need only the <style> part as argument for the command because
the “letter-” part is always added. It doesn't matter if you use tex or mkiv as file
extension because the file is found in either case.


More information about the ntg-context mailing list