Skip to main content
Inspiring
June 21, 2021
Question

Formatting a table of contents

  • June 21, 2021
  • 4 replies
  • 1497 views

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

 

    This topic has been closed for replies.

    4 replies

    Barb Binder
    Community Expert
    Community Expert
    July 11, 2021

    Hi @Daniela Barros:

     

    This is hard to troubleshoot in the forum so I need to clarify what you are saying:

    1. You just showed us your Paragraph Designer > Numbering setting for the heads on the body pages?
    2. Then you updated the TOC and the first level number is missing but the second level number is correct?

     

    If that is what you were trying to tell us, then please show us a screen shot of your TOC reference page, with your cursor in the Heading1TOC (or whatever you called it) entry. 

     

    ~Barb 

    ~Barb at Rocky Mountain Training
    Barb Binder
    Community Expert
    Community Expert
    July 5, 2021

    Hi @Daniela Barros:

     

    FrameMaker does not accomodate typos in building blocks. The ones you need are:

    <$chapnum> or <$paranum> (one of them, depending on how the numbering was defined for your heads, but never both)

    <$paratext>

    <$pagenum>

     

    ~Barb

    ~Barb at Rocky Mountain Training
    Daniela Barros
    Known Participant
    July 11, 2021

    Thank you Guys, It worked partially.

     

    I have 1.0 as the fisrt headind (H:\t<$chapnum>.<n=0>\t) for which I have created the style "1.0 Heading"

    and 1.1, 1.2... to the next ones (H:\t<$chapnum>.<n+>\t) for which I have used the existing style 1.1 Heading.

     

    When I generated the TOC the 1.0 is missing.

    Any particular reason for that?

     

    Thanks once more

    -Daniela

     

    Inspiring
    July 12, 2021

    Remember what Lynne wrote at the beginning, that you have to specify which paragraphs will appear in the TOC.

    Barb Binder
    Community Expert
    Community Expert
    July 1, 2021

    Hi @Daniela Barros:

     

    I have written up the answers to both questions on my student blog:

    https://www.rockymountaintraining.com/adobe-framemaker-adding-tabs-to-a-table-of-contents/

    https://www.rockymountaintraining.com/adobe-framemaker-including-chapter-numbers-in-a-table-of-contents/ but in your case you would need to use <$paranum> and not <$chapnum> on the reference page to pick up the heading auto-numbers, assuming they are not specifically chapter numbers. 

     

    I can see that you tried to add the <$paranum> building block already, and it was already noted there are style-specific. For example, if the style with the numbering is called Head1, then locate Head1TOC on the TOC reference page and add the <$paranum> to that paragraph. Then update your book.

     

    ~Barb 

    ~Barb at Rocky Mountain Training
    Daniela Barros
    Known Participant
    July 5, 2021

    I have read, followed the instructions, tried everything, still can`t get the number of the headings. Below is what I have done and the results. What could be wrong?

    Thank you for the support

     

    Inspiring
    July 5, 2021

    The first thing I see is that you have written <$Sparanum>. It should be <$paranum>.

    And I think <$chapnum> needs to have a lowercase "c".

    Daniela Barros
    Known Participant
    July 1, 2021

    Hi Lynne,

     

    Unfortunately it is not working. The only thing in the Reference page of the TOC file is  the following: I have added the paranum block and updated but nothing..

     

     

     

    Inspiring
    July 1, 2021

    Hi,

     

    Do you have the Paragraph Tag correct?

    For example, if the Paragraph Tag of the paragraph in the body is Heading, then the corresponding Paragraph Tag in the TOC Reference Page should be HeadingTOC.

     

    Regards,

    Shalom