On Wed, Apr 8, 2009 at 12:19 AM, Marcin Borkowski
Dnia Wed, Apr 08, 2009 at 12:13:01AM +0200, luigi scarso napisał(a):
On Wed, Apr 8, 2009 at 12:02 AM, Diego Depaoli
wrote: On Tue, Apr 7, 2009 at 11:47 PM, Wolfgang Schuster
wrote: \starttext
\def\breakeverywhere#1{\if#1\normalspace\space\else#1\allowbreak\fi}
\framed [width=4cm,align=normal] {\handletokens i want a framed where the text flushes to the next line without hyphenation. There is a way to get this result?\with\breakeverywhere}
\stoptext
YYYEEEEEEEEEEEEEESSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!! hmm. I should say ni . The problem are spaces . In this example I should expected that hy- => hy and some changes in glues and nothing else. Also text with \handletokens is ,well, "not so good " (ie horrible) .
I am not sure, but maybe that would be a good idea: gather 1,2,3,... tokens and pack them (as a whole) into an hbox until its width is greater than the frame width, output it, and repeat until there's nothing left. This would be very time-consuming (at least without lua), but it should preserve kerns etc.
Also, instead of examining the width, one could probably pack the tokens into an \hbox to ... {...} and examine the badness.
I don't dare to try to implement it, though - at least not at 00:17 AM;) or try-and-error with some elastic spaces
\def\breakeverywhere#1{\if#1\normalspace\hskip0.5ex plus0.1ex\else#1\allowbreak\fi} -- luigi