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
Specify the details for the table of contents structure in Microsoft Word:
- 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.
- From the Palette view, drag the
Table
of Contents element into the template content editor.
- Select the table of contents element.
- In the Properties view, expand .
- 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 checkbox.
- Click OK.
- Create the table of contents code:
- Click References tab.
- Click .
- In the Table of Contents tab, clear the Show page numbers checkbox.
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, expand .
- 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.