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