On Thu, Sep 29, 2005 at 08:11:53AM +0200, Werner LEMBERG wrote: > > > Uh, oh, I wasn't aware that you use this indeed very nasty strategy > within pdfroff. As Tadziu suggested in another mail, groff should > behave like LaTeX (and I was incorrectly assuming that the ms macros > already do something similar), this is, writing out the table of > contents piece by piece into a separate file so that the created > auxiliary file can be read in by a second pass at any location. This > not only fixes the nasty collation problem, it also fixes possible > page numbering issues -- it even allows that the table of contents > ends on the same page as the main body starts (this may be useful for > mini TOCs which are located at the beginning of each chapter, listing > the sections and subsections to come). > >
I do exactly what Werner is suggesting for my TOC, and it works out very well. My chapter and section macros write out title and page information to a file. This file is processed by a script to generate exactly the type of TOC needed for the document in question (rather than a one type fits all). This does, of course, take two passes, but so what? The whole thing is controlled by a makefile so I just type ``make book'' and everything is taken care of automagically. I also generate cross references in a similar way, so I need a total of 3 passes, but typesetting a 450 page book takes less than 30 seconds. jcs _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff