Inserting a table of contents
TreePad can automatically create a list of hyperlinks to child nodes of the current node and insert it into the current article at the current cursor position.
To insert a table of contents (top level of subtree)
- Click Main menu ⁄ Insert ⁄ Table of contents ⁄ One level; or
- Click Article context menu ⁄ Insert ⁄ Table of contents ⁄ One level; or
- Press Shift+Ctrl+Alt+O.
To insert a table of contents (all levels of subtree)
(TreePad Business Edition only)
- Click Main menu ⁄ Insert ⁄ Table of contents ⁄ All levels; or
- Click Article context menu ⁄ Insert ⁄ Table of contents ⁄ All levels.
To insert a table of contents to all anchors inside the article
(TreePad Business Edition only)
- Click Main menu ⁄ Insert ⁄ Table of contents ⁄ Article or DraftPad; or
- Click Article context menu ⁄ Insert ⁄ Table of contents ⁄ Article or DraftPad.
For these commands to work, the current node must have at least one child node, or the current article needs to have at least one anchor.
If the subtree chosen is normally sorted, it is a good idea to sort it before inserting a table of contents, since the order of hyperlinks in the contents list is determined by the current order of the nodes.
For examples of this feature in action, see The Tree pane and The Article pane. Note: some very minor subtrees in these examples were deleted after the tables of contents were created, for the best appearance.
To customize the appearance of the table of contents
Click Main menu ⁄ View ⁄ Options ⁄ Table of contents.
By checking or unchecking the Include table of contents title: checkbox you can determine whether or not to display a title such as "Contents", and the title field allows you to choose your own title, which may help if you are working in a language other than English.
- If the indentation differs from that expected (set by the default tab size), try this procedure. Delete the inserted table of contents. Make a copy of the rest of the article if necessary, saving any formatted text, images, etc. Convert the original article to plain text, then delete its contents. Replace the formatted text and images, then reinsert the table of contents and the indentation should now be correct.
- If for any reason you wish the indentation for the table of contents to be different from the default tab size, simply highlight the table of contents and click the Article ruler tabs to set them to the particular depth you require. Apply this principle to all blocks of text needing special indentation or tabulation.
- If your table of contents becomes so long that it extends offscreen, this is inefficient since you will need to scroll up and down a lot just to see it. It may be better to use smaller tables of contents each of which fit comfortably onto one screen and the "all-levels" tables very occasionally, for example at the beginning or end of your file.
- The more items your table of contents contains, the more often changes are likely to affect it, so the more often you will need to overwrite it just to keep it accurate. This is another good reason for using this feature sparingly.