# [NTG-context] Description nesting

Hans Hagen pragma at wxs.nl
Sat May 6 10:29:56 CEST 2006

nico wrote:
> Hello,
>
> Is there a way to nest some descriptions, where the nested descriptions
> respect the enclosing indentation?
>
> Funnily the wiki speaks about the subject
> (http://wiki.contextgarden.net/Description) but doesn't give any solution
> (btw, the given solution to have several paragraphs in a description looks
> obsolete since \start \stop works pretty well).
>
you can play with this patch

\setvalue{@@description\v!hanging}[#1]#2%
\leftskip
\noindent\ignorespaces
\ifnum\insidedefinition=\plusone
\ifdim\leftskip>\zeropoint \relax
\fi
\fi
\fi
\ifnum\insidedefinition>\zerocount
\fi
\ifhbox\@@descriptionbox\unhcopy\else\copy\fi\@@descriptionbox
\kern\ifdim\!!widthb=\zeropoint .75em\else\!!widthb\fi
\ignorespaces
\@@dodescription}

> Here is an example that I would like to see working:
>
> \definedescription[descr][
>
> \setupwhitespace[medium]
>
> \starttext
>
> \startdescr{Para}
>    This is a shorter item label, and some text that talks about it.
>    The text is wrapped into a paragraph, with successive lines indented.
>
>    This is another paragraph under the "Para" item.
>
>    \startdescr{SubPara1}
>    This is a shorter item label, and some text that talks about it.
>    The text is wrapped into a paragraph, with successive lines indented.
>    \stopdescr
>    \startdescr{SubPara2}
>    This is a shorter item label, and some text that talks about it.
>    The text is wrapped into a paragraph, with successive lines indented.
>    \stopdescr
> \stopdescr
>
> \stoptext
> _______________________________________________
> ntg-context mailing list
> ntg-context at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

--

-----------------------------------------------------------------