Frank Mittelbach wrote: > - share your thoughts and sample trials with us Below is my attempt to define the TOC of the ``Handbook of Mathematical Logic'' which is a collection of articles from different authors where each chapter has its own TOC. There were three (minor) problems: o In the main TOC the extra field is used for the name of the author, so I had to change the template to pass this field as second argument to `title-format'. o The separation betwenn number and title is annoying for the `part' entries where I had to choose (by trial and error) a fixed width of the number field to get the spacing right. o There seems to be no way to add spacing under an entry (`post-v-action') to enlarge the space between a part and the first chapter. Achim ________________________________________________________________________ _ | \_____/ | // Achim Blumensath | \ _ \O/ \___/\ | // [log in to unmask] |-< /_\ =o= \ /\ \| \X/ (p^2 - m^2)\psi = 0 |_/ \_ /"\ o----| ____________________________________________________________________\___| \documentclass{article} \usepackage{xcontentsJK} \IgnoreWhiteSpace \newdimen\COpnum@width \DeclareTemplate{contentsobject}{AB}{6}{ pre-v-action =f0 [\endgraf] \COpre@action, object-decls =f0 [\relax] \COobject@decl, object-indent =l [0pt] \leftskip, number-width =l [0pt] \@tempdima, right-margin-sep =l [25pt] \rightskip, pnum-width =l [15pt] \COpnum@width, number-indent =l [0pt] \parindent, number-format =f1 [#1\hfil] \COnumber@format, title-format =f2 [#1] \COtitle@format, pnum-format =f1 [\hfil#1] \COpnum@format, leaders-action =f0 [.] \COleaders@action, leaders-sep =l [4pt] \@tempdimc } { \ifnum #2>\c@tocdepth \else { \DoParameterAssignments \COpre@action \COobject@decl \parfillskip=-\rightskip \parindent=0pt \@afterindenttrue \interlinepenalty\@M \leavevmode \IfNoValueT{#3}{\def\COnumber@format##1{\hfil}} \hbox to \@tempdima {\COnumber@format{#3}} \nobreak \COtitle@format{#4}{#5} \nobreak \leaders\hbox{ \kern\@tempdimc \hbox{\COleaders@action} \kern\@tempdimc }\hfill \nobreak \hbox to \COpnum@width {\COpnum@format{#6}} \endgraf } \fi } \DeclareCollectionInstance{HML}{contentsobject}{part}{AB} {pre-v-action = \DelayEvaluation{\endgraf\addvspace{4ex plus 4pt}}, title-format = \textsc{#1}, number-format = \textsc{Part~#1:\hfil}, pnum-format = {}, leaders-action = ~, number-width = \DelayEvaluation{4.5em}} \DeclareCollectionInstance{HML}{contentsobject}{chapter}{AB} {pre-v-action = \DelayEvaluation{\endgraf\addvspace{1.5ex plus 1pt}}, title-format = #1\IfNoValueF{#2}{\comma\space\textit{#2}}, number-format = #1.\hfil, pnum-format = \hfil#1, leaders-action = ., leaders-sep = \DelayEvaluation{0.5em}, number-width = \DelayEvaluation{2.5em}} \DeclareCollectionInstance{HML}{contentsobject}{section}{AB} {object-decls = \small, title-format = #1, number-format = #1.\hfil, pnum-format = \hfil#1, leaders-action = ., leaders-sep = \DelayEvaluation{0.5em}, number-width = \DelayEvaluation{1em}} \begin{document} \subsection*{The main TOC} \UseCollection{contentsobject}{HML} \setcounter{tocdepth}{2} \contentsobject {1}{1}{part}{A}{Model Theory}{\NoValue}{1} \contentsobject {2}{2}{chapter}{\NoValue}{Guide to Part A}{\NoValue}{3} \contentsobject {3}{2}{chapter}{A.1}{An introduction to first-order logic}{Jon Barwise}{5} \contentsobject {4}{3}{section}{1}{Foreword}{\NoValue}{6} \contentsobject {5}{3}{section}{2}{How to tell if you are in the realm of first-order logic}{\NoValue}{6} \contentsobject {6}{3}{section}{3}{The formalisation of first-order logic}{\NoValue}{17} \contentsobject {7}{3}{section}{4}{The Completeness Theorem}{\NoValue}{22} \contentsobject {8}{3}{section}{5}{Beyond first-order logic}{\NoValue}{41} \contentsobject {9}{3}{section}{\NoValue}{References}{\NoValue}{45} \contentsobject {10}{2}{chapter}{A.2}{Fundamentals of model theory}{H.\ Jerome Keisler}{47} \contentsobject {11}{3}{section}{1}{Introduction}{\NoValue}{48} \contentsobject {12}{3}{section}{2}{Theories}{\NoValue}{49} \contentsobject {13}{3}{section}{3}{Digrams and compactness}{\NoValue}{57} \contentsobject {14}{3}{section}{4}{L\"owenheim-Skolem theorems}{\NoValue}{63} \contentsobject {15}{3}{section}{5}{Recursively saturated models}{\NoValue}{69} \contentsobject {16}{3}{section}{6}{Large and small models}{\NoValue}{73} \contentsobject {17}{3}{section}{7}{Stable theories}{\NoValue}{82} \contentsobject {18}{3}{section}{8}{Model-theoretic forcing}{\NoValue}{89} \contentsobject {19}{3}{section}{9}{Infinite formulas and extra quantifiers}{\NoValue}{95} \contentsobject {20}{3}{section}{\NoValue}{References}{\NoValue}{101} \contentsobject {21}{2}{chapter}{A.3}{Ultraproducts for algebraists}{Paul C.\ Eklof}{105} \contentsobject {22}{1}{part}{B}{Set Theory}{\NoValue}{315} \contentsobject {23}{2}{chapter}{\NoValue}{Guide to Part B}{\NoValue}{317} \contentsobject {24}{2}{chapter}{B.1}{Axioms of set theory}{J.\ R.\ Schoenfield}{321} \subsection*{The TOC of the first chapter} \setcounter{tocdepth}{3} \contentsobject {4}{3}{section}{1}{Foreword}{\NoValue}{6} \contentsobject {5}{3}{section}{2}{How to tell if you are in the realm of first-order logic}{\NoValue}{6} \contentsobject {6}{3}{section}{3}{The formalisation of first-order logic}{\NoValue}{17} \contentsobject {7}{3}{section}{4}{The Completeness Theorem}{\NoValue}{22} \contentsobject {8}{3}{section}{5}{Beyond first-order logic}{\NoValue}{41} \contentsobject {9}{3}{section}{\NoValue}{References}{\NoValue}{45} \stop