* Letter Module: backaddress
@ 2009-10-08 14:01 Andreas Harder
2009-10-08 20:53 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Harder @ 2009-10-08 14:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
now that the foldmarks work … how to set the backaddress?
\usemodule[letter]
\setupletterstyle
[option]
[backaddress=yes]
\setupletterstyle
[backaddress]
[bottomframe=on]
\setupletter
[fromname={Max Mustermann},
fromaddress={Musterstr. 12\\123456 Musterstadt}]
\setupletter
[toname={Empfänger},
toaddress={Postfach 123456\\60498 Frankfurt am Main}]
\starttext
\startletter
[opening={Sehr geehrte Damen und Herren,},
closing={Mit freundlichen Grüßen}]
\input tufte
\stopletter
\stoptext
Regards,
Andreas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-08 14:01 Letter Module: backaddress Andreas Harder
@ 2009-10-08 20:53 ` Wolfgang Schuster
2009-10-08 23:24 ` Andreas Harder
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2009-10-08 20:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 08.10.2009 um 16:01 schrieb Andreas Harder:
> Hi,
>
> now that the foldmarks work … how to set the backaddress?
Another thing to document, I already forgot who it works.
> \setupletterstyle
> [option]
> [backaddress=yes]
This setting is not necessary because most elements are enable by
default,
you could also drop the first bracket pair for global parameters.
> \setupletterstyle
> [backaddress]
> [bottomframe=on]
\setupletterstyle
[backaddress]
[alternative=yes, % default: no
bottomframe=on]
For alternative you can select between:
- no : no content for the backaddress
- yes : use 'fromname' and 'fromaddress'
- auto : check if there is text in the 'backaddress' key, if not then
use 'fromname' and 'fromaddress'
The separator between each element in the backaddress can be changed
with
\setupletterstyle
[backaddress]
[separator=...]
the default value is ', ' (comma + space).
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-08 20:53 ` Wolfgang Schuster
@ 2009-10-08 23:24 ` Andreas Harder
2009-10-09 4:45 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Harder @ 2009-10-08 23:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello Wolfgang,
thank you for your explanations!
One more question: it would be nice if the rule under the back-address
would have the same length an the back-addres. Is there a convenient
way? I tried something with \textbackgrounds (example below) but
without success.
% from the wiki:
\startuseMPgraphic{underline}
\iftracepositions
show_multi_pars
\else
draw_multi_pars
\fi ;
path p ; p := boundingbox currentpicture ;
currentpicture := currentpicture shifted (0,-StrutDepth/3) ;
setbounds currentpicture to p ;
\stopuseMPgraphic
\definetextbackground
[underline]
[location=text,alternative=1,background=underline,frame=off]
\setupletterstyle
[backaddress]
[alternative=yes,
before={\starttextbackground[underline]},
after=\stoptextbackground]
Andreas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-08 23:24 ` Andreas Harder
@ 2009-10-09 4:45 ` Wolfgang Schuster
2009-10-09 8:11 ` Andreas Harder
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2009-10-09 4:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 09.10.2009 um 01:24 schrieb Andreas Harder:
> Hello Wolfgang,
>
> thank you for your explanations!
When I think about the default setup this would make more sense:
\setupletterstyle[backaddress=no]
\setupletterstyle[backaddress][alternative=auto]
WHat do you think?
> One more question: it would be nice if the rule under the back-
> address would have the same length an the back-addres. Is there a
> convenient way? I tried something with \textbackgrounds (example
> below) but without success.
\setupletterstyle
[backaddress]
[frame]
[width=fit]
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-09 4:45 ` Wolfgang Schuster
@ 2009-10-09 8:11 ` Andreas Harder
2009-10-09 10:45 ` Wolfgang Schuster
2009-10-10 7:13 ` Wolfgang Schuster
0 siblings, 2 replies; 8+ messages in thread
From: Andreas Harder @ 2009-10-09 8:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1077 bytes --]
Am 09.10.2009 um 06:45 schrieb Wolfgang Schuster:
>
> When I think about the default setup this would make more sense:
>
> \setupletterstyle[backaddress=no]
> \setupletterstyle[backaddress][alternative=auto]
>
> WHat do you think?
I think it would be more intuitive that way.
>> One more question: it would be nice if the rule under the back-
>> address would have the same length an the back-addres. Is there a
>> convenient way? I tried something with \textbackgrounds (example
>> below) but without success.
>
> \setupletterstyle
> [backaddress]
> [frame]
> [width=fit]
Thank you! I tried to set width=fit, but without the frame-option …
Now one have to care of the width (I think there is no maxwidth-option
for frame setups?), so I tried to set the backgroundaddress-style to
style={\ifdim\framedwidth<85mm \tfx \else \tfxx \fi}. But the problem
is, that \framedwidth measures with the default font size … Or do you
know a solution? ;)
Bit by bit I get an idea of how to customize the letter-module settings.
Andreas
[-- Attachment #1.2: Type: text/html, Size: 1667 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-09 8:11 ` Andreas Harder
@ 2009-10-09 10:45 ` Wolfgang Schuster
2009-10-10 7:13 ` Wolfgang Schuster
1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2009-10-09 10:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1236 bytes --]
Am 09.10.2009 um 10:11 schrieb Andreas Harder:
>> When I think about the default setup this would make more sense:
>>
>> \setupletterstyle[backaddress=no]
>> \setupletterstyle[backaddress][alternative=auto]
>>
>> WHat do you think?
>
> I think it would be more intuitive that way.
I will change this then in the next release, you could then enable the
backaddress with \setupletterstyle[backaddres=yes]
>>> One more question: it would be nice if the rule under the back-
>>> address would have the same length an the back-addres. Is there a
>>> convenient way? I tried something with \textbackgrounds (example
>>> below) but without success.
>>
>> \setupletterstyle
>> [backaddress]
>> [frame]
>> [width=fit]
>
> Thank you! I tried to set width=fit, but without the frame-option …
> Now one have to care of the width (I think there is no maxwidth-
> option for frame setups?),
autowidth=force
> so I tried to set the backgroundaddress-style to style={\ifdim
> \framedwidth<85mm \tfx \else \tfxx \fi}. But the problem is, that
> \framedwidth measures with the default font size … Or do you know a
> solution? ;)
Let me think about this (no time at the moment).
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2229 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-09 8:11 ` Andreas Harder
2009-10-09 10:45 ` Wolfgang Schuster
@ 2009-10-10 7:13 ` Wolfgang Schuster
2009-10-11 15:43 ` Andreas Harder
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2009-10-10 7:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 09.10.2009 um 10:11 schrieb Andreas Harder:
> Now one have to care of the width (I think there is no maxwidth-
> option for frame setups?), so I tried to set the backgroundaddress-
> style to style={\ifdim\framedwidth<85mm \tfx \else \tfxx \fi}. But
> the problem is, that \framedwidth measures with the default font
> size … Or do you know a solution? ;)
\usemodule[letter]
\setupletterstyle[backaddress=yes]
\defineletterelement[backaddress][size]
{\setbox\scratchbox\hbox{\tfx\letterelement[backaddress][yes]}%
\ifdim\wd\scratchbox<\framedwidth
\framed[frame=off,bottomframe=on,width=fit]{\tfx\letterelement
[backaddress][yes]}%
\else
\framed[frame=off,bottomframe=on,width=fit]{\tfxx\letterelement
[backaddress][yes]}%
\fi}
\setupletterstyle[backaddress][alternative=size]
\setupletter
[fromname={Max Mustermann},
fromaddress={Musterstr. 12\\123456 Musterstadt}]
\setupletter
[toname={Empfänger},
toaddress={Postfach 123456\\60498 Frankfurt am Main}]
\starttext
\startletter
[opening={Sehr geehrte Damen und Herren,},
closing={Mit freundlichen Grüßen}]
\input tufte
\stopletter
\setupletter
[fromname={Klaus}]
\startletter
[opening={Sehr geehrte Damen und Herren,},
closing={Mit freundlichen Grüßen}]
\input tufte
\stopletter
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Letter Module: backaddress
2009-10-10 7:13 ` Wolfgang Schuster
@ 2009-10-11 15:43 ` Andreas Harder
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Harder @ 2009-10-11 15:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello Wolfgang,
thanks again!
Greetings,
Andreas
Am 10.10.2009 um 09:13 schrieb Wolfgang Schuster:
>
> Am 09.10.2009 um 10:11 schrieb Andreas Harder:
>
>> Now one have to care of the width (I think there is no maxwidth-
>> option for frame setups?), so I tried to set the backgroundaddress-
>> style to style={\ifdim\framedwidth<85mm \tfx \else \tfxx \fi}. But
>> the problem is, that \framedwidth measures with the default font
>> size … Or do you know a solution? ;)
>
> \usemodule[letter]
>
> \setupletterstyle[backaddress=yes]
>
> \defineletterelement[backaddress][size]
> {\setbox\scratchbox\hbox{\tfx\letterelement[backaddress][yes]}%
> \ifdim\wd\scratchbox<\framedwidth
> \framed[frame=off,bottomframe=on,width=fit]{\tfx\letterelement
> [backaddress][yes]}%
> \else
> \framed[frame=off,bottomframe=on,width=fit]{\tfxx\letterelement
> [backaddress][yes]}%
> \fi}
>
> \setupletterstyle[backaddress][alternative=size]
>
> \setupletter
> [fromname={Max Mustermann},
> fromaddress={Musterstr. 12\\123456 Musterstadt}]
>
> \setupletter
> [toname={Empfänger},
> toaddress={Postfach 123456\\60498 Frankfurt am Main}]
>
> \starttext
>
> \startletter
> [opening={Sehr geehrte Damen und Herren,},
> closing={Mit freundlichen Grüßen}]
> \input tufte
>
> \stopletter
>
> \setupletter
> [fromname={Klaus}]
>
> \startletter
> [opening={Sehr geehrte Damen und Herren,},
> closing={Mit freundlichen Grüßen}]
> \input tufte
> \stopletter
>
> \stoptext
>
> Wolfgang
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an
> entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / 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
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-10-11 15:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-08 14:01 Letter Module: backaddress Andreas Harder
2009-10-08 20:53 ` Wolfgang Schuster
2009-10-08 23:24 ` Andreas Harder
2009-10-09 4:45 ` Wolfgang Schuster
2009-10-09 8:11 ` Andreas Harder
2009-10-09 10:45 ` Wolfgang Schuster
2009-10-10 7:13 ` Wolfgang Schuster
2009-10-11 15:43 ` Andreas Harder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).