7 Steps to Better Tables of Contents in OpenOffice.org Writer

Like other word processes, OpenOffice.org Writer makes creating tables of contents (ToCs) quick and easy. Unfortunately, it also works with unaesthetic defaults and allows you to make choices that complicate your work flow rather than improving it.

Fortunately, Writer is also flexible enough to allow you to produce useful, aesthetic ToCs if you follow a few basic steps.

However, before you read about these steps, you might want to refer to "OpenOffice.org Off-the-Wall: ToCs, Indexes and Bibliographies in OOo Writer," which covers the basics of how to create a ToC. The general procedure is not difficult: first. you create the markers to use in the ToC via Insert -> Indexes and Tables -> Entry -> Index -> Table of Contents, then you generate the ToC through Insert -> Indexes and Tables -> Indexes and Tables. If you want, all you need to do is click the OK button to generate the ToC, but you can customize it in just about every way imaginable, so you might want to refresh your mind about the details before looking at these steps.

Create from outline

Instead of adding your own markers for the ToC, write the document from its very beginning using Heading styles to mark off sections of your work, then select Create from -> Outline as you generate the ToC. You'll not only save time, but help readers to find exactly what you are referring to when they follow a reference in the ToC.

Change the outline numbering if you want to use other styles

Usually, Writer ToCs use Headings 1 through 10 paragraph styles. If you want to include a Title, SubTitle, or Chapter Style in the ToC automatically, go to Tools -> Outline Numbering and change the paragraph style for the first and maybe the second level headings.

Limit yourself to 3 levels of headings

Old engineering documents often had half a dozen heading levels or more. Many heading levels are a document designer's nightmare, because there are only so many ways to differentiate headings - - chiefly typeface, size, indentation -- and using all the possible connections quickly looks cluttered.

Even more importantly, keeping track of where you are in the document is nearly impossible.

Three is a rather arbitrary number of headings, but it is usually enough to organize your document without being confusing aesthetically or practically. And that's three in total, including any title, sub-title, or chapter title that will be listed in the ToC. If you think that a subject needs more headings, ask yourself whether a re-organization can keep the number down -- almost always, it will.

Protect against manual changes

On the Index/Table tab for generating ToCs, you will find a check box labeled "Protect against manual changes." Always check this box. It will force you to work through styles and Writer's other automated features. At first, if you aren't in the habit of using styles regularly, you may think that this work flow is a nuisance, but you will soon find that it helps you regularize your work habits. Besides, if you make manual changes, you will lose them every time you update the fields in your documents and have to redo them. Edit the Contents styles instead (see below).

Avoid dot leaders

Dot leaders are the characters (usually periods) that separate the ToC entry from the page number on the right side of the margin. For some reason, dot leaders have become standard in word processor ToCs, despite the fact that professional typographers generally avoid them. As Robert Bringhurst writes in The Elements of Typographic Style, "Dot leaders (lines of dots leading the eye from one word or number to another) are rarely beneficial in tables." They are both ugly and inefficient.

The reason that dot leaders are seen as necessary is that the page number is always on a tab aligned to the right, which places the page number against the right margin. Most of the time, this position is so far from the ToC entry it refers to that you can hardly see the relation between the page number and the entry, especially in a crowded ToC.

The simplest way to eliminate any need for dot leaders is to change the tab setting. Go to the Entries tab, and select the first level of heading. Find the Tab stop building block for the entry, and set the fill character to a blank (it's hard to see, but at the top of the combo box). Then uncheck the Align Right box, and add a small tab -- no more than two or three centimeters -- and click the All button to apply your changes to all levels of headings. Now, when you generate the ToC, the page numbers will be close to the entry, and you will have no need for dot leaders.

Alternatively, if you find the result unaesthetic (as I do), consider placing the page number first in the entry. Follow the page number building block with a tab and the Entry, and click the All button. The result is not only easy on the eye, but has the advantage of placing the information that you really want when looking at the ToC -- the page number -- first.

Avoid unnecessary decoration

Eliminating unnecessary formatting is a major element in professional design. Just as dot leaders should be avoided because you can do without them, so should any other formatting that doesn't serve the purpose of helping readers use the ToC. For this reason, I suggest avoiding altogether the Column and Background tabs for ToCs.

Multiple columns rarely make reading ToCs easier -- particularly when the page number is to the right of the entry -- because they can force a long entry to spill over into two lines and slow down reading. Sometimes, you may be tempted to use multiple columns so that the ToC takes up less room, but, even then, more than two is going to look sloppy unless you greatly reduce the font size.

In the same way, an unusual background color is only going to call undue attention to itself and do nothing to make the ToC more readable. You don't need it, so leave it out.

Edit contents styles

ToC entries use the Contents paragraph styles. If you look at the Hierarchical view of styles in the Styles and Formatting floating window, you will see that these styles are the children of the Index style, which in turn is the child of the Default style. In other words, the default ToC is going to look much the same as the rest of your document.

This resemblance is not a bad thing. After all, common formatting shows that two pieces of text are related. However, some changes in formatting, such as a change in text size, may be practical. Others, such as the use of a different font weight or another typeface, can make the ToC easier to identify at a glance.

For such reasons, you might want to edit the Contents styles used in your ToC. These styles will appear in the Styles and Formats listing after you generate the ToC for the first time. Editing these styles is quicker than manual editing, and any changes won't be lost when you update the ToC.

Conclusion

Use Writer's defaults for ToCs, and you risk looking design-illiterate. Modifying them will take time, but the result will be a document that is better-looking and more useful to your readers.

Still, nobody likes to do the same work over and over again. Instead, make your changes to ToC structure in your most basic template -- the one that you base other templates on. Then, you can make the changes once and, with luck, never have to edit them again.

______________________

-- Bruce Byfield (nanday)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Four Heading Levels, Excepting Title and Sub-Title, Are Good

Vermont Technical Writer's picture

"Three is a rather arbitrary number of headings, but it is usually enough to organize your document without being confusing aesthetically or practically. And that's three in total, including any title, sub-title, or chapter title that will be listed in the ToC. If you think that a subject needs more headings, ask yourself whether a re-organization can keep the number down -- almost always, it will."

This opinion is incorrect in fact and may be misleading in practice.

- Title and sub-title, while technically "heading" derived styles, are not included in the Table of Contents (TOCs), at least in Standard English. Further, OpenOffice.org does not include these styles in TOCs, by default.

- My experience, starting with FrameMaker twenty years ago, leads me to believe that four sub-levels in a technical document is reasonable, commonly necessary, and effectively differentiable. Separate chapters require a fifth hierarchical level and additional page styles to start chapters at the top of the right page.

Your opinion, expressed as expert advice above, would result in a document with a title and subtitle and only one level of heading. With the delineation of chapters, that would leave no levels of sub-heading available, resulting in an continuous block of text, broken only by paragraphs. This is not an effective design for any document longer than a page or so.

TOC vs Styles

Anonymous's picture

I chose OO Writer over other options (MS Word and others) since I could more accurately format a document as required for a piece of academic writing. I have come across several issues which I have had to work around.

I have not been able to keep TOC item styles completely separate from document body styles. Adding numbering in the TOC also adds numbering in the document body, so if you don't want numbering on chapter titles but want numbering on the TOC then you need to find a workaround. My only option was to create a hidden header which was used as an outline style. Each chapter had 2 chapter titles, one with the normal visible header as I wanted it to be shown and not part of the outline, the other using the new hidden heading. When I need to update the TOC I "unhide" the hidden heading, update the TOC, "hide" the heading again, and export to pdf. The TOC has numbering, the content headings do not.

Also, I have not found a way to handle line spacing such that when a level changes the spacing is double, but if it remains the same the spacing is single. An example of this:

Chapter 1

    Section 1.1
    Section 1.2
    Section 1.3

        Section 1.3.1
        Section 1.3.2
        Section 1.3.3

    Section 1.4

        Section 1.4.1
        Section 1.4.2

    Section 1.5
    Section 1.6

If there is a way to do that, it would be good to know for the future. I wish I could protect against manual changes, but given the arbitrary nature of the document format I've been limited to write in and OO Writer's own limitations, I can't.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix