Adding a table of contents element
You can create a table of contents to help readers navigate
through lengthy documents.
Procedure
What to do next
Creating table of contents code in Microsoft Word to use in Rational Publishing Engine
You can define the details for the table of contents structure
in Microsoft Word and copy
its code into a Rational® Publishing Engine template.
Then, in Rational Publishing Engine,
you can create the section titles and customize their formatting.
Before you begin
- Enable field codes in Microsoft Word.
- Place your cursor in the editor.
- Insert a table of contents.
- In the Table of contents window, customize the details of your table of contents. You can choose to include page numbers with your headings, align the page numbers, and specify how many levels of section headings your document requires.
- Click OK. The table of contents code is displayed in the editor. Example: { \o "1-5" \h \z \u }
- Copy the code between the brackets. Example: \o "1-5" \h \z \u
Procedure
- Open Document Studio.
- In the Palette view, select the
Table
of Contents element and drag it into the template content
editor. - Select the table of contents element.
- In the Properties view, select the Specific tab.
- In the TOC code property, paste the table of contents code you copied from your Microsoft Word document.
- Save the changes.
Example
You can use Microsoft Word to specify the details for the table of contents, without creating the headings yet. After you retrieve the code for the table of contents details, you can paste it into Rational Publishing Engine and create the headings for the table of contents in Rational Publishing Engine. This example uses Microsoft Word 2007:
- In Microsoft Word 2007,
enable field codes if they are not already displayed:
- Click the Start icon.
- Click .
- In the Show document content section, select the Show field codes instead of their values check box.
- Click OK.
- Create the table of contents code:
- Click References tab.
- Click .
- In the Table of Contents tab, clear the Show page numbers check box. Clearing this selection prevents the page numbers from displaying in the table of contents.
- For Show levels, enter 4. This entry creates the levels of headings. Four levels creates Heading 1, Heading 2, Heading 3, and Heading 4.
- Click OK. The following code is displayed as the table of contents:{ TOC \o "1-4" \h \z \u }
- Copy the code between the brackets. Example: TOC \o "1-4" \h \z \u.
- Paste the code into the Rational Publishing Engine template:
- Open Document Studio.
- In the Palette view, select the
Table of Contents element
and drag it into the template content editor. - Select the table of contents element.
- In the Properties view, select the Specific tab.
- In the TOC code property, paste the table of contents code copied from your Microsoft Word document.
- Click OK.
- In Rational Publishing Engine, create headings for each template section.
- Create heading styles.
- Apply the styles to the headings.
- Test the output.
Customizing a table of contents element by using a Microsoft Word document as a style sheet
Create a style sheet in Microsoft Word
and then specify that style sheet in your document specification.