On Tue, May 24, 2011 at 01:42:41PM +0200, Wolfgang Schuster wrote: > > Am 24.05.2011 um 00:59 schrieb Mathieu DUPONT: > > > Hi, > > Is there a simple way to obtain the following result in the table of > content : > > Contents > CHAPTER 1 > Title of chapter 2 > 1.1 Title of section 2 > > (the chapter title underneath its number and left aligned, just like > everything else) > > The following code used to do the job with MkII but it doesn't anymore > with > MkIV : > > \setuplabeltext[chapter=CHAPTER~] > \setuplist[chapter][label=yes, style={\blank[0cm]}] > \starttext > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \chapter{Title of chapter} > \section{Title of section} > \stopbodymatter > > \stoptext > > Instead, I get something like this (I hope it turns out readable through > the email) : > > Contents > CHAPTER 1 > Title of chapter 2 > 1.1 Title of section 2 > > where the 2 lines of the chapter, together with their alignment with the > frame, get tossed to the right... > > > I do get with MkIV the first example like you expect but “style={\blank[0cm]}” > is the wrong way. Such a layout can be easily done with your own list-command > for chapter but the labeltext is tricky: > > \setuplabeltext[chapter=CHAPTER~] > > % \define[3]\ChapterList % no label! > % {#1\crlf#2\wordright{#3}} > > % \define[3]\ChapterList % fixed label, wrong for appendices! > % {\labeltext{chapter}#1\crlf#2\wordright{#3}} > > \define[3]\ChapterList > {\currentlistsymbol\crlf#2\wordright{#3}} > > \setuplist[chapter][label=yes,alternative=command,command=\ChapterList] > > \starttext > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \chapter{Title of chapter} > \section{Title of section} > \stopbodymatter > > \stoptext > > Wolfgang >
Wolfgang, This solution: [alternative=command,command=\ChapterList] breaks interaction; How can one get [interaction=all] to work? Alan ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________