Re: [NTG-context] letter: backaddress
Hallo Wolfgang,
You're mixing different things.
What is the difference between
\setupletterstyle[option][backaddress=yes]
With \setupletterstyle[<element>=yes|no] you can show or hide elements
ok!
\setupletterstyle[backaddress][alternative=yes]
In 'default.nli' I found
\defineletterelement[\v!backaddress][\v!auto] {\doifelselettervalue\c!backaddress {\lettervalue\c!backaddress} {\lettervalue\c!fromname \doiflettervalue\c!fromaddress\\ \lettervalue\c!fromaddress}}
what I interpret in the following way:
If 'backaddress'=auto If exist a constant 'backaddress' use it else compose one from 'fromname' and 'fromaddress'
The constant needs a content, if there is no content for 'backadress' the field is filled with 'fromname' and 'fromaddress'.
So let's test if I have understand this: With \setupletterstyle[option][backaddress=no|yes] one can disable|enable a backaddress. With \setupletterstyle[backaddress][alternative=no|yes|auto] one can select between no backadress| a composed backaddress from the fromdata| the yes behaviour if no predefined backaddress is defined And to define such a own backaddress, one uses \setlettervalue{backaddress}{something} Hopefully this is right! Wolfgang
Am 28.03.10 15:39, schrieb Wolfgang Werners-Lucchini:
And to define such a own backaddress, one uses
\setlettervalue{backaddress}{something}
Hopefully this is right!
When you want something which can be used for \setupletterstyle[<1>][alternative=<2>] you need \defineletterelement[<1>][<2>]{...}, which \setlettervalue{<A>}{<B>} you set a variable which can be used with \lettervalue{<A>}, e.g. \usemodule[letter] \defineletterelement[foot][myalternative]{\midaligned{Can you see me?}} \setupletterstyle[footer][alternative=myalternative] \setlettervalue{bankleitzahl}{76430000} %\setlettervalue{kontonummer}{} \starttext \startletter \lettervalue{bankleitzahl} \doifelselettervalue{kontonummer} {Die Kontonummer lautet \lettervalue{kontonummer}} {Keine Kontonummer angegeben} \stopletter \stoptext Wolfgang
participants (2)
-
Wolfgang Schuster
-
Wolfgang Werners-Lucchini