Before you generate a table of contents, decide which paragraphs should be included (such as chapter titles and section headings), and then define paragraph styles for each. Make sure that these styles are applied to all appropriate paragraphs in the document or booked documents.
When you generate the table of contents, you can also use paragraph and character styles to format the table of contents.