Appendix C - Auto TOC Generation
1. In your InDesign template, create a Table of Contents style (to know how to create the TOC style, refer https://helpx.adobe.com/in/indesign/using/creating-table-contents.html) and give it a name. Note down this name as we are going to use the same everywhere to generate the TOC automatically. In the example below, the TOC style is “MyBookTOC”.
2. Name both the master page of TOC and the text-frame in the master page that is going to contain the TOC the same as the TOC stylename. In the example below, both the text-frame that is going to have the TOC and the master page are called “MyBookTOC” (same as TOC stylename).
3. Create one more text-frame on the pasteboard and name it “AutoTOC”. The contents of the text-frame should be <TOC Stylename>=<Page Number >. You can create as many TOC styles (for example, for a list of figures, you can add <ListOfFigures=3>, and similarly for a list of tables, you can add <ListOfTables=4>, etc.) as needed within this text-frame along with its page number.
4. Once you have setup everything, the names of TOC style, master page of TOC, and text-frame on the master page of TOC will be identical.
5. After generating the InDesign output, the TOC will be included in the output InDesign document.