From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17324 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re: Table of contents, alternative d Date: Tue, 30 Nov 2004 10:56:00 +0100 Message-ID: <41AC43B0.5010508@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1101808583 1926 80.91.229.6 (30 Nov 2004 09:56:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Nov 2004 09:56:23 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 30 10:56:13 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CZ4k1-0005ju-00 for ; Tue, 30 Nov 2004 10:56:13 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A9FFB12796; Tue, 30 Nov 2004 10:56:11 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00450-01; Tue, 30 Nov 2004 10:56:06 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 858B51276F; Tue, 30 Nov 2004 10:56:06 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A82D41276F for ; Tue, 30 Nov 2004 10:56:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00369-02 for ; Tue, 30 Nov 2004 10:56:03 +0100 (CET) Original-Received: from mailrelay01.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 52695126F8 for ; Tue, 30 Nov 2004 10:56:03 +0100 (CET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id iAU9u1qV004537 for ; Tue, 30 Nov 2004 10:56:01 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id F3BBB1B3B8; Tue, 30 Nov 2004 10:56:01 +0100 (CET) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 22F3417B07 for ; Tue, 30 Nov 2004 09:56:00 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: ClamAV 0.80/540/Tue Oct 19 14:59:23 2004 clamav-milter version 0.80j on mailrelay01 X-Virus-Status: Clean X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17324 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17324 Dirar BOUGATEF wrote: > Hi Patrick, >=20 > This is how my toc appears: >=20 > Part 1 first part 1=961 > (1) Chapter one 1=962 (2) Chapter two 1=963 (3) Chapter three 1=964 > (4) Chapter four 1=965 (5) Chapter five 1=966 > Part 2 second part 2=961 > (1) Chapter one 2=962 (2) Chapter two 2=963 (3) Chapter three 2=964 > (4) Chapter four 2=965 (5) Chapter five 2=966 > Part 3 Third part 3=961 > (1) Chapter one 3=962 (2) Chapter two 3=963 (3) Chapter three 3=964 > (4) Chapter four 3=965 (5) Chapter five 3=966 >=20 > I want to control the distance for instance in the second and third lin= e=20 > to the right margin (This means chapters indeed =3D> Line5,6,8,9 too).=20 > This could result in the fact that my chapters will appear on 3 lines=20 > instead of 2 here. >=20 > To my knowledge there is no parameter such as "distance" to change this= .=20 > Here "distance" changes only the distance between chapter elements for=20 > instance: the element (1) Chapter one 1=962 and the element Chapter two= =20 > 1=963 (3). This how alternative d works (with elements). >=20 > This is how the result i want could be: >=20 > Part 1 first part = =20 > 1=961 > (1) Chapter one 1=962 (2) Chapter two 1=963 (3) Chapter > three 1=964 (4) Chapter four 1=965 (5) Chapter five 1=966 > Part 2 second part 2=96= 1 > (1) Chapter one 2=962 (2) Chapter two 2=963 (3) Chapter > three 2=964 (4) Chapter four 2=965 (5) Chapter five 2=966 > Part 3 Third part = 3=961 > (1) Chapter one 3=962 (2) Chapter two 3=963 (3) Chapter > three 3=964 (4) Chapter four 3=965 (5) Chapter five 3=966 An option is to use the narrower mechanism; unfortunately abc placement d= oes not=20 listen that so we need a patch (not sure if this is not breaking other th= ings). % this goes into core-sec or cont-new \unprotect \def\dodofixdlijstelementABC#1#2#3#4#5#6% weeden {\endgraf \leftskip\getvalue{\??li#1\c!margin}% na de \endgraf ! \getvalue{\??li#1\c!before}% \!!widthc\getvalue{\??li#1\c!distance}% \doifelsevalue{\??li#1\c!width}\v!fit {\!!widtha\zeropoint} {\doifelsenothing{#3} {\doifelsevalue{\??li#1\c!aligntitle}\v!yes {\!!widtha\zeropoint \!!widthc\zeropoint} {\!!widtha\getvalue{\??li#1\c!width}}} {\!!widtha\getvalue{\??li#1\c!width}}}% \getvalue{\??li\c!alternative\getvalue{\??li#1\c!alternative}}% \endgraf \def\makelijstelement##1##2% {\doifelsevalue{\??li#1\c!interaction}{##1} {\setbox0\hbox{\showcontrastlocation\??ia{#6}{##2}}% \linklisttoelement{#1}{#2}{#5}{#6}{\box0}}%{\copy0}}% {\hbox{##2}}}% \doifvalue{\??li#1\c!interaction}\v!text % not supported {\setlistparameter{#1}\c!interaction\v!all}% % \makelijstelement\v!all % {\hbox to \hsize \makelijstelement\v!all {\setlocalhsize \hsize\localhsize \hbox to \hsize {\forgetall \dostartattributes{\??li#1}\c!style\c!color\empty \!!widthb\hsize \setbox2\hbox \ifdim\!!widtha>\zeropoint to \!!widtha \fi {\makelijstelement\v!sectionnumber {\dolistattributes{#1}\c!numberstyle\c!numbercolor {\getvalue{\??li#1\c!numbercommand}{\currentlistsymbol}= }% \hfill}}% \setbox4\hbox {\doifvalue{\??li#1\c!pagenumber}\v!yes {\doifsomething{#5} % \lijstwidth is new ; temp hack {\hbox \ifdim\lijstwidth>\zeropoint to \lijstwidth\fi {\hfill \makelijstelement\v!pagenumber {\dolistattributes{#1}\c!pagestyle\c!pagecolor {\getvalue{\??li#1\c!pagecommand}% {\pageprefix\??li#1[#5]% \translatednumber[#5]}}}}}}}% \vbox {\hsize\!!widthb \setupalign[\getvalue{\??li#1\c!align}]% \ifdim\!!widtha<\hsize \hangindent=3D\wd2 \dimen2=3D\!!widthc % \getvalue{\??li#1\c!distance}% \advance\hangindent \dimen2 \hangafter=3D1 \doifvalue{\??li#1\c!hang}\v!no{\hangafter\zerocount}% \ifdim\wd4=3D\zeropoint % \ifvoid4 % we kunnen gewoon afbreken aan het eind \else \ifdim\lijstskip>\zeropoint\relax \rightskip=3D\lijstskip\!!plus10em\relax \parfillskip=3D-\rightskip \fi \fi \else \dimen2\zeropoint \fi \parindent\zeropoint\relax \leavevmode \box2\relax \hskip\dimen2 \bgroup \dolistattributes{#1}\c!textstyle\c!textcolor {\let\\=3D\newlineinlist \dontconvertfont %\getvalue{\??li#1\c!textcommand}{#4}}% \limitatedlistentry{#1}{#4}}% %\carryoverpar % new otherwise wrong linespacing \egroup \ifdim\wd4=3D\zeropoint\relax % \ifvoid4 % \ifdim\!!widtha<\hsize \hfill\strut \fi % spoils align \else \nobreak\lijstfill \box4\relax \relax \fi}% \hss \dostopattributes}}% new \nointerlineskip % anders verkeerde spatiering bij multi-line \endgraf \allowbreak \getvalue{\??li#1\c!after}} \protect \setuphead [part]=20 [align=3Dleft,page=3Dright,placehead=3Dyes,before=3D{\null\vfill},after=3D= {\vfill}] \setuphead [chapter][before=3D,after=3D\blank] \setuplist=20 [chapter][alternative=3Dd,left=3D(,right=3D),pagestyle=3Dslanted,before=3D= \blank,after=3D\blank] \setuplist [part] [before=3D{\blank[big]},after=3D\blank] \starttext \startnarrower[2*right] \placecontent \stopnarrower \blank[4*big] \startsetups chapter \blank \startnarrower[3*middle] \placecontent[criterium=3Dlocal] \stop= narrower \stopsetups \placelist[part][criterium=3Dtext,after=3D\setups{chapter}] \part{First part} \chapter{Chapter one} \chapter{Chapter two} \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} \part{Second part} \chapter{Chapter one} \chapter{Chapter two} \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} \part{Third part} \chapter{Chapter one} \chapter{Chapter two} \chapter{Chapter three} \chapter{Chapter four} \chapter{Chapter five} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------