> > 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," [...]
Not necessarily; see below. > The only place it can be done properly is in troff macros, > anywhere else and you lose things like page numbering, > incremental registers, etc. Yes. A further argument why TOC placement should be done using troff macros instead of an external postprocessor is that the TOC is not always a separate set of pages, as the attached example page shows. This is something which would be very hard to achieve using a separate tool.
minitoc.pdf
Description: Adobe PDF document