[NTG-context] Limit text width in items

Hans Hagen j.hagen at xs4all.nl
Thu Jul 26 16:03:25 CEST 2018


On 7/26/2018 3:43 PM, Henning Hraban Ramm wrote:
> Am 2018-07-23 um 13:33 schrieb Henning Hraban Ramm <texml at fiee.net>:
> 
>> Hello again,
>>
>> in the MWE below I’d like to limit the run width of the item text so that the (page) number is standing out, e.g.
>>
>> • This is a long and winding text
>>    that leads to a number .......... 99
>>
>> The text can become one or several lines long.
>>
>> I tried to put the text in boxes, e.g. \simplealignedbox{}{}{\vbox{...}} but I got only ugly spacing.
>> Also, the last line of the text continues in that leaders and number.
>>
>> ---
>>
>> \def\leaderfill{\leaders\hbox to 1em{\hss. \hss}\hfill}
>>
>> \starttext
>>
>> \startitemize[packed,joinedup]
>> \startitem
>> 	\input tufte
>> 	\leaderfill 33
>> \stopitem
>> \startitem
>> 	\input knuth
>> 	\leaderfill 99
>> \stopitem
>> \stopitemize
>>
>> \stoptext
> 
> No idea? Anyone?
> Would it work to force an overfull hbox somehow in every last line?
\def\MyFill#1%
   {\leaders\hbox to 1em{\hss.\hss}\hfill
    \rlap{\hbox to \rightskip{\hss#1}}}

\showframe

\starttext

\startnarrower[2*right]
\startitemize[packed,joinedup]
\startitem
	\input tufte
	\MyFill{33}
\stopitem
\startitem
	\input knuth
	\MyFill{99}
\stopitem
\stopitemize
\stopnarrower

\stoptext

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list