generate TOC for the big PDF and HTML output files