Am 29.07.2012 um 13:10 schrieb Martin Scholz <[email protected]>:
> Thx Wolfgang,
>
> this makes sense, as I still had your old examples online and build my
> letters after that I was just wondering if I did something wrong or missed
> something in using it, but that way it is more flexible and with an
>
> /input{addrfile}
>
> in the below way one should also be able to still use a kind of the old way
> having a separated addressfile but with a more flexible layout.
>
> Again million thx for clearing it
The new version of the module has now a built in system for address entries,
named “addressentry”.
With the command \defineaddressentry you can create a new entry and with the
command \addressentry you can access them. Instead of specifying each entry by
name you can also set a default name with the addressentry key for
\startletter/\setupletter which is now used when omit the first argument of
\addressentry.
\usemodule[letter]
\setupletteroptions
[ bodyfont=calluna,
whitespace=line]
\defineaddressentry
[frodo]
[lastname={Beutlin},
firstname={Frodo},
address={Der Bühl\\Beutelsend/Hobbingen im Auenland},
1={Bilbo Beutlin},
2={Rauchen von Pfeifenkraut},
3={der Ringträger},
4={Bilbos Erbe}]
\defineaddressentry
[sam]
[lastname={Gamdschie},
firstname={Samweis},
address={Beutelhaldenweg 3\\Hobbingen im Auenland},
1={Rosie Kattun},
2={Knullen},
3={des Ringträgers treuester Gefährte}]
\defineaddressentry
[tom]
[lastname={Bombadil},
firstname={Tom},
address={Im Alten Wald},
1={Goldbeere},
2={trällern von Nonsensliedern},
3={Meister von Wald, Wasser und Berg}]
\setupaddressentry
[name={\addressentry[firstname]~\addressentry[lastname]}]
\startletter
[addressentry=tom,
toname={\addressentry[name]},
toaddress={\addressentry[address]},
opening={Lieber \addressentry[name],},
closing={„O Frühling und Sommerzeit und danach wieder Frühling!\\O Wind auf
dem Wasserfall und Lachen des Laubes!“}]
oder \addressentry[tom][3], wie Dich Deine geliebte \addressentry[tom][1]
nennt. Kannst Du Dich noch an einen Herrn \addressentry[frodo][lastname],
genauer gesagt \addressentry[frodo][firstname]~\addressentry[frodo][lastname],
denn es gab ja auch noch den Herrn \addressentry[frodo][1], erinnern. Er war
\addressentry[frodo][3] im dritten Zeitalter und \addressentry[frodo][3].
Begleitet wurde er von
\addressentry[sam][firstname]~\addressentry[sam][lastname],
\addressentry[sam][3].
Beider Vorlieben waren sehr weltlich. Der \addressentry[frodo][firstname]
genoss das \addressentry[frodo][2], sein Gefährte schätzte eine gute Mahlzeit
mit \addressentry[sam][2].
Weißt du noch? Mithrandir hat Dir bestimmt viel von ihnen erzählt.
\stopletter
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________