Table of Contents
- 2 minutes to read
A table of contents reflects a document’s logical structure. A user can click a table entry while holding the Ctrl key to navigate to the corresponding document section. Every table of contents is a special TOC field.
If an inserted TOC field does not recognize the corresponding source of entries, the Rich Edit control displays the 'sdxRichEditExceptionNoTocEntriesFound'
resource string instead of a table of contents.
The Rich Edit control supports the following document navigation table types:
- Heading-based table of contents
- A table lists all paragraphs marked as headers in the document structure. A TOC field that corresponds to a heading-based table of contents uses special built-in heading styles (such as Heading 1, Heading 2, etc.) applied to the paragraphs used as section headers in a document. Such TOC fields require no additional identifiers.
- Label-based table of contents
- A table lists embedded objects in a document, such as tables, images, and equations. A TOC field that corresponds to a label-based table refers to sequentially numbered table, figure, and equation labels (SEQ fields). You can insert the labels anywhere in a document, except for headers/footers and floating text boxes.
The Rich Edit control’s automatic UI generation functionality links all TOC-related commands to buttons located in the Table of Contents and Captions groups of the Ribbon UI’s References tab: