Dirar BOUGATEF wrote:
Hi Patrick,
This is how my toc appears:
Part 1 first part 1–1 (1) Chapter one 1–2 (2) Chapter two 1–3 (3) Chapter three 1–4 (4) Chapter four 1–5 (5) Chapter five 1–6 Part 2 second part 2–1 (1) Chapter one 2–2 (2) Chapter two 2–3 (3) Chapter three 2–4 (4) Chapter four 2–5 (5) Chapter five 2–6 Part 3 Third part 3–1 (1) Chapter one 3–2 (2) Chapter two 3–3 (3) Chapter three 3–4 (4) Chapter four 3–5 (5) Chapter five 3–6
I want to control the distance for instance in the second and third line to the right margin (This means chapters indeed => Line5,6,8,9 too). This could result in the fact that my chapters will appear on 3 lines instead of 2 here.
To my knowledge there is no parameter such as "distance" to change this. Here "distance" changes only the distance between chapter elements for instance: the element (1) Chapter one 1–2 and the element Chapter two 1–3 (3). This how alternative d works (with elements).
This is how the result i want could be:
Part 1 first part 1–1 (1) Chapter one 1–2 (2) Chapter two 1–3 (3) Chapter three 1–4 (4) Chapter four 1–5 (5) Chapter five 1–6 Part 2 second part 2–1 (1) Chapter one 2–2 (2) Chapter two 2–3 (3) Chapter three 2–4 (4) Chapter four 2–5 (5) Chapter five 2–6 Part 3 Third part 3–1 (1) Chapter one 3–2 (2) Chapter two 3–3 (3) Chapter three 3–4 (4) Chapter four 3–5 (5) Chapter five 3–6
An option is to use the narrower mechanism; unfortunately abc placement does not listen that so we need a patch (not sure if this is not breaking other things). % 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=\wd2 \dimen2=\!!widthc % \getvalue{\??li#1\c!distance}% \advance\hangindent \dimen2 \hangafter=1 \doifvalue{\??li#1\c!hang}\v!no{\hangafter\zerocount}% \ifdim\wd4=\zeropoint % \ifvoid4 % we kunnen gewoon afbreken aan het eind \else \ifdim\lijstskip>\zeropoint\relax \rightskip=\lijstskip\!!plus10em\relax \parfillskip=-\rightskip \fi \fi \else \dimen2\zeropoint \fi \parindent\zeropoint\relax \leavevmode \box2\relax \hskip\dimen2 \bgroup \dolistattributes{#1}\c!textstyle\c!textcolor {\let\\=\newlineinlist \dontconvertfont %\getvalue{\??li#1\c!textcommand}{#4}}% \limitatedlistentry{#1}{#4}}% %\carryoverpar % new otherwise wrong linespacing \egroup \ifdim\wd4=\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] [align=left,page=right,placehead=yes,before={\null\vfill},after={\vfill}] \setuphead [chapter][before=,after=\blank] \setuplist [chapter][alternative=d,left=(,right=),pagestyle=slanted,before=\blank,after=\blank] \setuplist [part] [before={\blank[big]},after=\blank] \starttext \startnarrower[2*right] \placecontent \stopnarrower \blank[4*big] \startsetups chapter \blank \startnarrower[3*middle] \placecontent[criterium=local] \stopnarrower \stopsetups \placelist[part][criterium=text,after=\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 -----------------------------------------------------------------