Wed, 29 Dec 1999 11:56:02 +0100
|
(Continues.)
Replace the body code in JB1 (but not in JB2) by:
{\IfNoValueTF{#4}
{\let\thecontentslabel\@empty
\ttl@numsecfalse}
{\gdef\thecontentslabel{#4}
\ttl@numsectrue}
\gdef\thecontentspage{#7}
\DoParameterAssignments
\global\let\COpost@action\COpost@action
\global\let\COobject@decl\COobject@decl
\global\@tempdimd\@tempdimd
\global\@tempdime\@tempdime
\global\@tempdimb\@tempdimb
\global\let\COnumber@format\COnumber@format
\global\@tempdima\@tempdima
\global\let\COtitle@format\COtitle@format
\global\let\COtitle@format@nolbl\COtitle@format@nolbl
\global\let\COpnum@format\COpnum@format
\global\let\COleaders@action\COleaders@action
\global\@tempdimc\@tempdimc
\ttl@tocentry
{\@ne}
{#3}
{\@tempdimd}
{\contentsmargin[\@tempdimb]{\@tempdime}
\COpre@action
\COobject@decl}
{
{\contentslabel[\COnumber@format]{\@tempdima}\COtitle@format}
{\hspace*{-\@tempdima}\COtitle@format@nolbl}
}
{\titlerule*[\@tempdimc]{\COleaders@action}
\contentspage[\COpnum@format{\thecontentspage}]}
{\COpost@action}
{#5}
{}}
As you can see, the code is the same but with a series of global
assignments right after \DoParameterAssignments. Here is an example:
\DeclareInstance{contentsobject}{section}{JB1}{
pre-action = \DelayEvaluation{\addvspace{1pc plus 1pt}},
right-adjust = 3pt,
title-format = \textbf{#1},
label-format = \textbf{\thecontentslabel},
left-margin = \DelayEvaluation{2.5em},
label-width = \DelayEvaluation{2.5em},
page-format = \textbf{\hfil#1},
leaders-text = }
\DeclareInstance{contentsobject}{subsection}{JB2}{
pre-action = \addvspace{3pt plus .2pt},
decls = \itshape,
left-margin = \DelayEvaluation{2.5em},
punct-sep = {;\ },
punct-end = .
}
\bye
Javier
|
|
|