[NTG-context] small abstracts in table of contents?

Hans Hagen pragma at wxs.nl
Tue Nov 25 08:54:28 CET 2014


On 11/25/2014 8:18 AM, Otared Kavian wrote:
> Hi Gerben,
>
> As Wolfgang said, you can use something like this (example given by him some months ago on the mailing list):
>
> \definelist[chaptertext]
> \setuplist[chaptertext][style=\tfx,margin=3em,pagecommand=\gobbleoneargument]
>
> \starttext
>
> \placelist[chapter,chaptertext]
>
> \chapter{This is a chapter}
>
> \writetolist[chaptertext]{}{This is a small description of this chapter: \input ward }
>
> \input knuth.tex
>
> \stoptext

The mkiv way:

\starttext

\unexpanded\def\ShowSummary#1#2#3%
   {\inleftmargin{#1}\structurelistuservariable{summary}\blank}

\placelist[chapter][alternative=command,command=\ShowSummary]

\startchapter
   [title={This is a chapter}]
   [summary={This is a small description of this chapter}]

\input knuth.tex

\stopchapter

\startchapter
   [title={This is also a chapter}]
   [summary={This is a larger description of this chapter}]

\input ward.tex

\stopchapter

\stoptext



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


More information about the ntg-context mailing list