### Embed TOCs in a document

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-refer­ence element should already be defined for structured documents.

A TOC embedded at the start of 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.

#### Embed a TOC in a document by using cross-references

1)Create a cross-reference format that formats text the way you want the table of contents entries to look. Typically, this format 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 format you created in the previous step.

#### Embed a TOC in a structured document by using cross-references

1)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.