Embed TOCs in a document

See how to embed TOC’s in a document by using cross-reference or as a text inset in Adobe FrameMaker.

In this topic

Introduction

If you want a small table of contents embedded at the beginning of the source document instead of in a file of its own, you can set up the table of contents with cross-references. A special cross-reference element should already be defined for structured documents.

Figure 1. A TOC embedded at the start of a document
EmbeddingaTOC in a document

FrameMaker does not automatically maintain this type of table of contents. If you change the order of references or delete a heading while editing the document, you’ll need to rearrange the entries or delete an entry in the table of contents yourself.

You can also generate a separate table of contents and then import the generated file by reference at the beginning of the source document. In this case, the text inset with the table of contents is automatically updated when the table of contents changes.

Create a TOC in a document with cross-references

To embed a TOC in a document with cross-references:

  1. Create a cross-reference style that formats text the way you want the table of contents entries to look. Typically, this style would contain the <$paratext> and <$pagenum> building blocks.

  2. At the start of the document, set up a cross-reference to each paragraph you want to appear in the table of contents. Use the cross-reference style you created in the previous step.

Create a TOC in a structured document with cross-references

For each item you want to appear in the table of contents, insert a cross-reference element. The document may also have paragraph elements defined for formatting. See your application developer for information.

Note: Make sure that the sequence of entries in the table of contents reflects the sequence of source elements in the document. This isn’t automatic as it is with a generated table of contents.

Embed a TOC in a document as a text inset

To embed a TOC in a document as a text inset:

  1. Generate a table of contents.

  2. Import the table of contents into a document.

Maintain a TOC embedded in a document

To maintain a TOC embedded in a document, do the following: