On Thursday 28 Jul 2011 21:21:33 Peter Schaffter wrote: > On Thu, Jul 28, 2011, Ralph Corderoy wrote: > > Would it be better to leave the re-ordering to external utilities, e.g. > > the pdftk package > > > > http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ > > > > on the basis of do one small thing and do it well? > > This is essentially what I concluded when writing the mom macros. > Better to use psselect (from the psutils suite) to re-order > TOCs in PostScript documents; for pdf documents, pdftk. While > this necessarily requires users to write a pipeline, it's "the > right tool," and affords greater flexibility with respect to TOC > placement. Not all language conventions place the TOC at the > beginning; I've any number of French works with a Table de matières > at the back.
Ok. I think everyone's right (Ralph, Jean-Pierre, Peter) except me :-( The only place it can be done properly is in troff macros, anywhere else and you lose things like page numbering, incremental registers, etc.. Still it was a nice exercise thinking about how it might be done. Cheers Deri