Style Is Everything, Right?

A guide for when and how to use styles instead of manual overrides in OpenOffice.org documents.

by Bruce Byfield

Styles are the chief feature that make office suites more useful than electronic typewriters. In OpenOffice.org, however, styles are even more important than they are in other office suites. Most word processors offer character and paragraph styles, but OpenOffice.org also includes frame, page and numbering styles. Even more importantly, OpenOffice.org extends the concept of styles to other applications. Impress, for example, has a system of styles, whereas PowerPoint, its MS Office equivalent, has none. The same is true of OOo's Calc and MS Excel. Once you understand why and when you should use styles, you'll find OpenOffice.org's tools for managing and applying styles second to none. You'll also start to unleash the full power of OpenOffice.org.

Styles are the preferred way to format documents in an office suite. The alternative is manual overrides. To use manual overrides whenever you want to change the default formatting, you select part of the document--for example, a page or a group of characters--and then apply the formatting using the toolbars or menu. Each time you want to format something, you do it individually. This style of formatting is popular mainly because it requires no special knowledge. In effect, it involves using a word processor as though it were a typewriter.

The trouble is, as Robin Williams points out in the title of her best-known book, The PC Is Not a Typewriter. As Williams' title hints, you can do far more with a word processor such as Writer than you can with a typewriter. If you use manual formatting, you cannot use many of the functions a word processor's offers or you can use them only partially. Therefore, for all their popularity, manual overrides are the least efficient way to work.

The chief feature that typewriters and manual formating lack is styles. Styles are a list of format settings. Their advantage is you set them up in one place and then tag the parts of your document that you want to use them in. That way, if you want to change the format of all the tagged areas, you don't have to visit each area individually the way you do when using overrides. Instead, you change the style settings. Instantly, all the areas tagged with that style are changed--at a speed with which manual formatting simply can't compete. If you are a developer, you can think of designing a style as the equivalent of declaring a sub-routine; tagging part of the document to use it is calling the sub-routine.

Table 1. Basic Styles in OpenOffice.org Documents

Writer Calc Draw Impress
Paragraphs Pages Graphic elements (including text objects) Graphic elements (including text objects)
Characters Pages Autolayouts Autolayouts
Frames Pages    

Why Should I Use Styles?

Several times, die-hards who refuse to use styles have posted to the OpenOffice.org user list. They have a right to work any way they want, they insist. OpenOffice.org should be redesigned so that users of manual overrides have the same access to features as those who use styles. At first, this request sounds reasonable. Yet, on closer look, the request makes no more sense than insisting that all roads should be engineered so that pedestrians can go as fast as drivers. Although OpenOffice.org accommodates manual overriders in some ways, including several shortcuts found in Tools -> AutoCorrect/Autoformat, the advantages of styles require a regularity of input that manual formatting never could provide.

Basically, using styles offers four main advantages:

  • At the cost of extra preliminary work, you save time in the long run. Spend a couple of hours setting up styles, save the results in a template and you don't have to think about design for months at a time.
  • When you want to reformat, you have to change only the styles in order to reformat the entire document. Because styles are hierarchical, you often don't need to change every style, only the ones at the top of the hierarchy.
  • Some tools in OpenOffice.org are crippled or don't work at all without styles. In the Navigator, styles are right at the top of the window, acting as the basic milestones for moving about in the document. Want a field to pick up a chapter number or have different styles of headers and footers? For both of these tasks, you need to use styles. You want to build a table of contents or change page designs? You can do both without using styles, but this two-minute task will take you twenty minutes.
  • You use styles anyway. Indexes, tables and object frames all use paragraph styles automatically. By default, anything resembling a URL is formatted with the Internet Link character style. Add a footer, and you're using the Footer paragraph style. Unless you're deeply into masochism or are content to use an office suite at only the most superficial level, sooner or later you need to use styles. And because you can't escape them, you may as well learn how to use them instead of jumping through hoops to avoid them.

When Should Styles Be Used?

The short answer is almost always. In practice, though, even experts use manual overrides in certain circumstances. Before deciding whether to use overrides or styles, check the following table and decide which circumstances apply to the document you are preparing.

Consider Using Overrides If... Use Styles If...
The document is short. The document is long.
The document is going to be printed once and never reused. The document is going to be revised many times.
The document is going to be edited by only a single person. The document is going to be edited by more than one person.
Any editing will take place within a few days of finishing the document. The document will be edited weeks, months or even years after the first version.
The document's format is unique and unrelated to any other documents. The document belongs to a standard class of documents, such as a letter, fax or memo.
You plan to save the document as plain text, so all formatting will be lost anyway. The document design should match that of other documents prepared by you or your company or organization. In the business world, this concern is part of branding.
The document consists mostly of graphics, and the text used is not regularly placed or spaced--for example, a brochure or a product sheet. You want to use the document in a number of different ways, each of which requires some minor changes, for example, printing it on both white and red paper.

Even if one of the first five conditions for using overrides applies, using styles still might make sense if you have a template that suits your needs. The last two conditions are the only real reasons, besides laziness, for using overrides. Writer even offers the Direct Cursor for graphical design, a setting that adds tabs and lines as needed to allow you to insert text anywhere on the page (see Tools -> Options -> Text Document -> Formatting Aids).

Applying Styles

When you are applying styles, you have two main tools, the Catalog and the Stylist. The Style Catalog, available from Format -> Styles -> Catalog, is similar to the tool of the same name in MS Office. The Stylist, available from Format -> Stylist or by pressing the F11 button, is a floating palette. Both are tools for adding, editing and applying styles.

Figure 1. The Stylist is the easiest way to apply styles. Its content differs between applications. This is the Stylist for Writer.

If you are used to MS Office, you might feel more comfortable with the Catalog. However, the Catalog requires many more mouse-clicks or keystrokes than the Stylist to do the same things. Being stuck in the menu, the Catalog is not as convenient as the floating window Stylist offers. For these reasons, Stylist should be most users' preferred tool. The main exception is users with a monitor of 15" or less, who do not have the extra free space for a floating palette. Yet, even on a small screen, users can open and close the Stylist as necessary.

Figure 2. The Catalog is a part of the OOo interface and closely resembles its MS Office counterpart. Unless you don't want to change your work habits, the Stylist is more efficient.

The Stylist can be left to float or it can be docked and undocked from a side of the editing window by dragging its title bar while pressing the Ctrl key. Across the top is a button for each type of style available in the current application. Click the button, and the types of styles listed in the stylist change. There's also the Fill Format button, which allows you to apply a style by dragging it over an area of your document. The Update Style button allows you to modify a style based on manual overrides.

On the bottom of the Stylist is a drop-down list of different views of styles. Especially useful views are the Applied Styles, which lists only those styles that have been used; HTML Styles, which lists only those used in HTML; and the Hierarchical view, which shows in a tree which styles are based on which.

The Stylist is so convenient that it is one of the main reasons to use OpenOffice.org. However, you can make styles even more convenient by writing macros to automate the application of commonly used styles and then assigning each macro to a key combination.

In addition to the Stylist and the Catalog, OpenOffice.org also includes the Load Styles tool, available from Format -> Styles -> Loads. Load Tools is a dialog for transferring styles between documents. From the dialog, you can choose which styles to transfer and whether existing styles are over-written or not.

Figure 3. The Load Styles window is the main mechanism for copying styles from one document to another.

Adding and Editing Styles

OpenOffice.org includes dozens of pre-existing styles. Many of these styles are waiting for your selection. Others are used automatically by OpenOffice.org. Add a graphic, for example, and a frame using the Graphics style automatically is placed around it. Similarly, typing anything that looks like a URL immediately formats the text with the Internet Link character style, unless you turn off the URL recognition option in Tools -> AutoCorrect/Autoformat. All of the pre-existing styles can be edited but not deleted. You'll also want to add your own styles as the need arises.

Figure 4. The Organizer tab should be your first stop when designing a style.

You can work with styles using the Catalog, but when applying styles, the Stylist is more convenient. To edit a style, highlight it in the Stylist and select Modify from the right-click menu. If you want to add a style based on the highlighted style, select New instead. Alternatively, if you want a style not based on any existing style except the Default, select a blank space in the Stylist for your right-click. In all of these cases, the Style window opens, and you're ready to design.

No matter what the style, your first stop when designing styles should be the Organizer tab. Depending on the type of style, the Organizer has three fields. How you fill in these fields heavily influences the usefulness of styles:

  • Name: For convenience, each style should have a distinct name. The pre-defined styles usually are named for context--Heading 1 or Emphasis. You might prefer, however, to give your styles a descriptive name instead, say, 2-Column Page or Blue Bullets. Some styles can be associated with another style of a different type, so you also can simplify your life by giving them all the same name. For instance, if a numbering style uses Arabic numbers, you might want to call it by the character style used to format the numbers and the paragraph style that uses the numbering style Arabic numbers. Because each type of style displays separately, you'll never confuse them, but their association is obvious at a glance.
  • Linked with: This field lists the existing style on which the current style is based. If you started designing a new style by highlighting an existing one, the existing one is entered in this field automatically. The new style uses all the characteristics of the style with which it is linked except those that are specifically changed. What's more, changes to the parent style change the new style. This inheritance simplifies the design of your document by allowing you to design related styles only once. For example, if you use the Heading style, the size or color is all you may need to set for its child styles, Heading 1 and 2. You can see which styles inherit from which by changing to the Hierarchical view in the Stylist.
  • Next Style: Which style is used automatically after another style. For some styles, making this setting available doesn't make sense. A frame, for example, usually is not followed immediately by another one. For other styles, such as paragraphs and pages, this setting does save time. For instance, by default, the Title paragraph style is followed by Sub-title, which is followed by Text body. Instead of having to set the style every time, all you need to do is press the Enter key, and the next style is used automatically.

A description of other settings must wait for other articles. For now, though, know that designing a full range of styles for a document is an intense process. Even an expert OpenOffice.org user is likely to need several hours to tweak styles in some documents. For that reason, the last step in designing styles always should be to save the results to a template using File -> Templates -> Save. By the third or fourth time you use the template, you'll already be starting to save time and noticing the improvement in your blood-pressure.

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs2.5 License.

This article originally was published on March 31, 2004, on the Linux Journal Web site.

About the Author

Bruce Byfield is a computer journalist and course designer. His articles appear regularly on the Linux Journal and Newsforge Web sites.

Web Editor - Fri, 2006-04-14 21:34.
Categories:

Comment viewing options

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

Almost a useful review but a few things missing (for me)

First let me say that I enjoyed the article. I often struggle with the convenience of typsetting in LaTeX with the hassle of converting my postscript or pdf to some word readable format. That struggle is what always brings me back to openoffice. This article might have brought me back to the word processing world if 1) I could find the styles in OO2, 2) I had a clearer idea about what makes openoffice styles a suitable substitute for other typesetting programs such as LaTeX, and 3) I understood the downsides of styles a bit more. For the first, I found myself searching in vain for the styles menu so I gave up in short order. The second point really hits at the nature of my own question - not something I believe the author needs to answer to make a great contribution to the Linux community. I would like to know how these styles interact with the text. For example, I might be able to type the body of a document. Do I need headings? Will the style pick up sentences that stand out and automagically format them as headings or do I need to highlight each section and set it to the correct attribute? Finally, there must be some things that styles cannot do. For example, can styles deal with references? Here is a real strength of LaTeX and bibtex. I love simply putting in a \cite{Doe89} and presto my citation is put into the document and the bibliography is formatted according to the style I need. Is this a function that style can provide? If so, sign me up.

Thanks for the article. It may not be complete for me but at least it got me thinking about word processors again.

Patrick (not verified) - Tue, 2006-04-25 04:54.

I found this helpful:

I found this helpful:

http://www.tutorialsforopenoffice.org/category_index/wordprocessing.html

An - ymous (not verified) - Thu, 2006-05-04 01:32.

Where is the catalog?

In OOo 2.0, the Format menu does not contain a Styles option. In fact, browsing the Help reveals that the Style Catalog may have been removed... It would seem that changes to OOo since this article was first published in LJ in 2004 have not been reviewed before publishing to Tux in 2006.

Anyway, I was looking for the Catalog because I was wondering: how can I change the Default character style to use something other than the ghastly Times New Roman font? I was hoping maybe the Cataloge allowed it... but I guess it doesn't.

My issue: One can change the Default paragraph style's font, but this is not the same as the default character style. Presumably, if you have other character styles that are linked to Default, but that change things other than the font, you would want a change to Default to propagate down the heirarchy. This should work, except that there is not "Modify" option for the Default character style.
Also, the Default paragraph and Default character styles are not linked: changes to the character fontin the Default paragraph style to don't update the fontfor the Default character style. Bummer ;-)

What am I misunderstanding here?

Sinewalker (not verified) - Sun, 2006-04-23 22:19.

Stylist to the rescue

The catalog was really making the same function as the stylist so thats the reason why it got drop actually it got somekind of merge.

When you activate the Stylist it shows you the different styles of paragraph as default. And DEFAULT style will be the predominant. You will also have another style called Text Body. Right clicking will let you modify and choose the font you need.

This will be the way you could costumize your OOo, however if you want this change permanent then you need to make this a Default template using the File > Template > Save > Make default.

Jza (not verified) - Sun, 2006-05-21 14:00.