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 ___________________________________________________________________________________