Re: [NTG-context] letter: backaddress
Hallo,
\setupletterstyle[backaddress=yes]
it's a disabled by default but i forgot to do this also in the default style (most styles reset the layout and use default values before they modify it)
\setupletterstyle [backaddress] [alternative=auto,
'auto' is now the default value
Wolfgang
I do not understand the the main principle. What is the difference between \setupletterstyle[option][backaddress=yes] and \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' To use this, I tried to set \setupletterstyle[option][backaddress=auto] or \setupletterstyle[backaddress][alternative=auto] And I tried to set this constant backaddress, with setlettervalue{backaddress}{something} But no combination is working. What worked is \setupletterstyle[option][backaddress=yes] \setlettervalue{backaddress}{something} which should not work, because \defineletterelement[\v!backaddress][\v!yes] {\lettervalue\c!fromname \doiflettervalue\c!fromaddress\\ \lettervalue\c!fromaddress} is composing the 'backaddress' from the fromdata. My skills to read the sourcecode are very limited, so most likely I buhave something misunderstood. Wolfgang
Am 27.03.10 17:56, schrieb Wolfgang Werners-Lucchini:
I do not understand the the main principle.
You're mixing different things.
What is the difference between
\setupletterstyle[option][backaddress=yes]
In t-letter.tex you can fint this: \startsetups[\v!letter:\v!layer] \doif\@@@@lsoptionmarking \v!yes{\directsetup{\v!letter:\v!place:\v!foldmark }} \doif\@@@@lsoptionbackaddress\v!yes{\directsetup{\v!letter:\v!place:\v!backaddress}} \doif\@@@@lsoptionaddress \v!yes{\directsetup{\v!letter:\v!place:\v!address }} \doif\@@@@lsoptionreference \v!yes{\directsetup{\v!letter:\v!place:\v!reference }} \doif\@@@@lsoptionlocation \v!yes{\directsetup{\v!letter:\v!place:\v!location }} \doif\@@@@lsoptionlettermain \v!yes{\directsetup{\v!letter:\v!place:\v!lettermain }} \doif\@@@@lsoptionletternext \v!yes{\directsetup{\v!letter:\v!place:\v!letternext }} \stopsetups With \setupletterstyle[<element>=yes|no] you can show or hide elements (like the foldmarks or the backaddress) in the output.
\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'. \defineletterelements creates a macro, where the first argument is the name of the elements and the second a name for the alternative, e.g. \defineletterelement[<element>][<alternative>]{definition} You can use the created element with \setupletterstyle[<element>][alternative=<alterntive>], in your case \setupletterstyle[backaddress][alternative=auto] When you don't like this mechanism you can use the internal element setups itself with \startsetups letter:backaddress ... \stopsetups Wolfgang
participants (2)
-
Wolfgang Schuster
-
Wolfgang Werners-Lucchini