[NTG-context] Problem using \scale

Henning Hraban Ramm texml at fiee.net
Fri Feb 10 08:04:54 CET 2023


Am 09.02.23 um 22:42 schrieb Bruce Horrocks via ntg-context:
> I'm printing address labels. Sometimes an address has a long line that is too long to fit on the label with the result that it wraps. Instead of wrapping, I thought it would be nice to try and auto-scale the label and shrink it so that the long line just fits.
> 
> I'm using \crlf to break the address into lines and this doesn't play well with the \scale command, see MWE below, where the second frame is just one long line as the \crlf's seem to be ignored.
> 
> Is there a simple solution that allows \crlf and also scale?
> 
> \starttext
> \startbuffer[address]
> Name \crlf
> Address 1 \crlf
> A long line that wraps \crlf
> Town \crlf
> Postcode
> \stopbuffer
> \framed[width=3cm,align=flushleft]{\getbuffer[address]}
> \framed[width=3cm,align=flushleft]{\scale[factor=fit]{\getbuffer[address]}}
> \stoptext

Did you try \framedtext instead of \framed? (I didn’t test.)

Hraban



More information about the ntg-context mailing list