Formatting a table of contents
In Automatically text Format change - Adobe Support Community - 12125343, @Daniela Barros asked how to include heading numbers and leader dots in a TOC.
Daniela, I am answering your question in a new thread.
There are three steps to creating a TOC:
1. Specify which paragraphs (or, in a structured document, elements) in the original document or book contribute entries. This specification is made in the Set Up Table of Contents dialog box.
2. Specify what information is extracted from the document/book for each entry. This is made on on a reference page named TOC in the TOC file. The TOC page has an entry for each paragraph format that will contribute to the TOC. The tag for a paragraph on the page is the same as that of the original format with TOC appended at the end. For example, if you want to include information for Heading1 paragraphs in the original documents, you need a paragraph tagged Heading1TOC on this page.
3. Specify how the extracted paragraphs are formatted. Formatting is specified in the paragraph formats of the paragraphs in the TOC.
Once you set up a a TOC (step 1 above), FrameMaker will generate a TOC using defaults for the items in 2 and 3. You can change them by editing and saving the initial generated file. To see the results of changes you make in step 2, regenerate the TOC.
In your case, you wanted the paragraph numbers from your headings to show in the TOC. Find the appropriate paragraph on the TOC reference page in the TOC file and add the building block <$paranum> at the beginning. You also wanted the page numbers to appear at the right with leader dots between the heading text and the page numbers. On the reference page, insert a tab character before the <$pagenum> building block. Then, in the paragraph designer, define a tab stop for this paragraph format. Specify Right for alignment, the right edge of the frame for position, and the desired leaders. Click Update Style and save the file. Then regenerate the TOC.
--Lynne
