Another solution would be to build each piece separately. So, you build your file and keep track of info. Then, you build your TOC as a completely separate PDF. There are dozens of ways of concatenating PDFs together, many of which use ghostscript (gs). YMMV
In reply to Re: Creating a table of contents
by dragonchild
in thread Creating a table of contents
by monaghan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |