Thanks Hans,
this solves the problem I had with the new implementation of \wordright.
It's not exactly a problem of \wordright, but the combination with
\groupedcommand.
Is \nextbox a new entry of latest versions?
I've seen also \nextboxwd, \nextboxht, etc.
So you can measure the next box to come in advance. Is it like that?
Is it a vbox when you're in vertical mode and a hbox when you are in
horizontal mode?
Is this interpretation of \dowithnextbox in \dowhatever right?
\dowithnextbox {.1.} \.2. {.3.}
1 COMMAND = {\ifdim\wd\nextbox<\hsize...}
2 CSNAME = \hbox
3 CONTENT = {#1}
Massi
Il 01/09/20 19:22, Hans Hagen ha scritto:
>
> fortunately there is a solution that takes less code:
>
> \unexpanded\def\whatever
> {\dosingleempty\dowhatever}
>
> \def\dowhatever[#1]%
> {\dowithnextbox
> {\ifdim\wd\nextbox<\hsize
> \wordright{\box\nextbox}%
> \par
> \else
> \par
> \penalty10000
> \startalignment[flushright]\unhbox\nextbox\stopalignment
> \fi}\hbox}
>
> \starttext
>
> \input ward \whatever{same line, right}
>
> \blank
>
> \input ward \whatever{\input tufte }
>
> \stoptext
>
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________