[NTG-context] vertical alignment in TOC

Andreas Harder aharder at uni-koblenz.de
Wed Jul 20 00:43:45 CEST 2011


Am 19.07.2011 um 20:36 schrieb Thomas A. Schmitz:

> Hi all,
> 
> for an edited volume, entries in the TOC have two lines, title, then author. Is is possible to have the page number aligned to the title, i.e. the first of these lines?
> 
> Example:
> 
> \setuphead[chapter]
> 	  [number=no]
> 
> \setuplist[chapter]
>          [width=0cm]
> 
> \starttext
> 
> \startchapter[title=One,list={A Title \crlf An Author}]
> 
> \input knuth
> 
> \stopchapter
> 
> \page
> 
> \placelist[chapter][criterium=text]


\define[3]\ChapterList%
  {\bTABLE[offset=none,rulethickness=0pt,width=broad]
     \bTR
     % \bTD                                      #1 \eTD
       \bTD                                      #2 \eTD
       \bTD[width=1.5em,align={left,high}]\strut #3 \eTD
     \eTR
   \eTABLE}

\setuplist[chapter][alternative=command,command=\ChapterList]

\placelist[chapter][criterium=text]

\stoptext

If I got your right, this should work.

Greeting
	Andreas


More information about the ntg-context mailing list