Applying Non-Standard Formatting to a Table of Contents
This section contains tips on using Arbortext Styler to format your table of contents in ways that may not be achievable through the properties area of the Table of Contents list alone.
Example: Displaying TOC Numbering to the Left of the Table of Contents Entries
By default, Arbortext Styler does not support the display of TOC numbering to the left of the TOC entries, but this can be achieved by editing the .style file directly once a standard TOC is in place in the document. The steps in the following procedure will produce a TOC with the page numbers right aligned to the left of the TOC entry text.
1. Add a table of contents element to the relevant place in your document and add the basic formatting you require. This step can be skipped if a suitably formatted TOC already exists in your document.
2. In
Arbortext Styler, navigate to the
Table of Contents list
and select the TOC object whose numbering you wish to change.
3. Click the Format... button to open the Table of Contents Format dialog box.
4. Make the following changes:
◦ Select the Show page numbers option
◦ Select the Right align page numbers option
◦ Set the value of Text right indent: to 0pt.
◦ Set the value of Minimum space or leaders before page number: to 0pt
◦ Deselect the Leader dots option.
◦ Deselect the Indent levels option.
5. Click the Details... button to open the Table of Contents Format Details dialog box.
6. Enter the following settings for each level of the TOC - change the level in the Level to edit: drop down menu:
◦ Select the Not numbered option.
◦ Set the value of the Indent following lines field so that second and subsequent lines of a long TOC entry will start at the required horizontal position in the TOC.
Click OK to exit the Table of Contents Format Details dialog box.
7. Click OK to exit the Table of Contents Format dialog box.
8. In the Elements list, set your Arbortext Styler interface to include Styler Formatting Elements (SFE) in the Elements list, by selecting the > menu option.
9. Select the element _sfe:TocPage_xxx, where xxx is the name of the TOC whose numbering you are editing. In this case, the example TOC is named Document.
10. Elect to edit the FOSI source of the SFE element by selecting > > .
11. Insert a usetext element after the suppress sup=”0” element in the source. Set the attributes of the new element as follows:
◦ source=”@xpt,ypt”, where:
▪ xpt is the distance from the left edge of the document at which you want the page numbers to align
▪ ypt is the space that should be drawn between the page number and the TOC entry text
Note that (x+y) should equal the value set for Indent following lines in step 6 above.
◦ placemnt=”after”
12. Click > to save the change and exit the Edited Source Editor. The SFE, and its
Description entry for FOSI, are now marked in orange to advise that the element contains source edits. Note the presence of the
Edited Source column
in the
Elements list - use the > option to activate the display of the column in your window if required.
13. Close the stylesheet in Arbortext Styler and open the .style file directly in Arbortext Editor
14. Find the TableofContents tag whose tocName attribute matches the name of the table of contents whose numbering you are editing. Note that Arbortext Editor will have replaced any spaces in the name of the table of contents with underscores.
15. Locate the TocTitleContexts element in TableofContents.
16. For each TocTitleContext element in TocTitleContexts, carry out the following actions:
◦ Move the _sfe:TocPage_xxx element and its contents to be the first element inside the _sfe:TocEntryN_xxx element, where N is a number between 1 and 5. There should be one _sfe:TocEntryN_xxx element for each level you have elected to display in your TOC. Note that, again, xxx is the name of the TOC whose numbering you are editing: in the case “Document”.
◦ Ensure the attributes of the Space element are set to:
▪ leaderType=”space”
▪ lenType=”fit”
▪ minLen=0pt
Note that if you did not uncheck the Indent levels box in step 4, these elements may be named LeaderDots - once you have set the leaderType=”space” attribute, however, the name will change.
17. Save the changes to your stylesheet and close it.
18. Once you have saved the changes to your stylesheet, choose > in Arbortext Editor.
In the Print Preview window, note that the each entry of the TOC has its page number displayed to the left of the TOC entry text, and that there are no leader dots separating the two.