[dev-context] \hskip for hanging descriptions

Wolfgang Schuster schuster.wolfgang at gmail.com
Wed Nov 14 18:29:52 CET 2012


Am 14.11.2012 um 18:23 schrieb Hans Hagen <pragma at wxs.nl>:

> On 11/14/2012 11:29 AM, Marco Patzer wrote:
>> Hi Hans,
>> 
>> do you have any objections changing the following \kern into a
>> \hskip?
>> 
>> \startsetups[\??constructionrenderings:\v!hanging]
>>     % tricky: leftskipadaption is somewhat unpredictable
>>     \let\\=\crlf
>>     \noindent
>>     \advance\leftskip-\leftskipadaption\relax
>>     \ifdim\leftskipadaption=\zeropoint
>>         \leftskipadaption1.5\emwidth\relax % just some default
>>         \ifnum\c_strc_constructions_nested_state=\plusone
>>             \ifdim\leftskip>\zeropoint \relax
>>                 \leftskipadaption\leftskip
>>             \fi
>>         \fi
>>     \fi
>>     \ifnum\c_strc_constructions_nested_state>\zerocount % was
>> \ifnum\c_strc_constructions_nested_state=\plusone
>> \advance\leftskip\leftskipadaption % but we're already further on \fi
>>     \hskip-\leftskipadaption\relax
>>     \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox
>> - \kern\ifdim\constructionsheaddistance=\zeropoint .75\emwidth\else\constructionsheaddistance\fi
>> + \hskip\ifdim\constructionsheaddistance=\zeropoint .75\emwidth\else\constructionsheaddistance\fi
>> \useconstructionstyleandcolor\c!style\c!color \ignorespaces
>> \stopsetups
> 
> changing skips/kerns is always somewhat dangerous as one suddenly can get unwanted breaks ... is there a use case?

Marco posted the following example a while ago:

\definedescription
  [description]
  [alternative=hanging,
   width=broad]

\starttext

\startdescription{conclusion that}
 \input knuth
\stopdescription

\startdescription{conclusion that the designer of a new system must not only be literally}
 \input knuth
\stopdescription

\stoptext

Wolfgang


More information about the dev-context mailing list