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
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
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
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
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
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
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
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 ___________________________________________________________________________________
participants (2)
-
Andreas Harder
-
Wolfgang Schuster