The Personal Computing Paradigm
Creating With Style(s)
It’s often said that any productivity gains computers and word processors brought have been lost because people now spend precious hours fiddling with fonts and styles until they look just so. If you’re the type who likes to play this way, trust me, you’ll have a lot more fun if you use styles. You can play with the whole document at once. You’ll even save ti me!
What Are Style Sheets?
The Font, Style, and Size menus of word processors let you apply formats one at a time. Style sheets let you give names to groups of formatting attributes and apply them as a unit. Once you have applied a style to text, you can update the formats of all text tagged with that style, simply by changing the style’s definition. This is convenient for short documents and a necessity for longer ones. Not only can you experiment with the formatting of your whole document at once, but you can also use style templates designed by professionals and never have to worry about which fonts and sizes to use. If you apply all the formats in your document using styles, you can be sure that it is formatted consistently, which is necessary for a professional look.
Styles come in two varieties: character and paragraph. Generally, character styles can include attributes such as bold, italic, color, font, and language. (It is a little confusing that Style menus in word processors with commands like Bold and Italic are talking about formats, not styles in the style sheet sense.)
Paragraph styles usually encompass all the ruler and spacing attributes discussed in last month’s article Making Your Word Processor Work —everything from tabs and spacing before a paragraph, to whether the paragraph should be hyphenated and whether to allow widows and orphans. In addition, some programs let you assign boilerplate text or graphics to the beginning or end of paragraph styles. Paragraphs in a Bulleted List style might be prefixed with a • and a tab character to create itemized lists. A paragraph in Pullquote style might have horizontal rules above and below it for separation. In each case, simply applying a paragraph format would add these graphics. Not only do you not have to add them yourself, but you can also change them at any time. Word, FrameMaker, and Nisus Writer let you associate table of contents levels to styles. Thus, all headings could automatically be added to a table of contents.
Support for styles varies among word processors, as do the names for the two types of them. In AppleWorks, character-level styles are called Basic styles. In Nisus Writer, all styles are character-level, unless you associate them with rulers (collections of indent, tab, and spacing settings). This allows for some interesting possibilities. Multiple styles can include the same ruler, and you can change a style back and forth between character and paragraph at any time. Word 98 supports character and paragraph styles, as does WordPerfect.
Some word processors also allow you to apply multiple paragraph or character styles to text, or create hierarchical style definitions. For instance, in AppleWorks, one style can inherit all the attributes of another, overriding its parent’s attributes when they conflict. In Nisus Writer, you can choose whether a style is exclusive or if it can be combined with others. Most word processors let you override styles using the normal commands for applying formats. This is useful when you want to apply a format just a few times, without creating a special style for it. Overrides are usually indicated with an * next to the style’s name, to show that the text is tagged with that style, but that formatting has been added or changed. Nisus Writer lets you forbid overrides for certain styles, and FrameMaker has a handy tool for converting overrides into new styles. This is great if you decide that you are using a format often enough to warrant its own style, or if you need to format a document from someone who did not apply any styles at all.
There are two main ways that word processors let you create and edit styles. Some have you open a styles window, then select normal formatting commands from menus or rulers. Others provide a series of dialog boxes with check boxes, pop-up menus, and text fields for every conceivable option.
In programs that support both types of styles, character styles override paragraph styles. Thus, you can set most of your text in a Body paragraph style, and override sections of it with character styles like Emphasis (bold, say), Publication (italic, maybe), and Corrected (strike-through red, perhaps).
When you apply a paragraph style, you can simply position the insertion point within the paragraph. There is no need to select the whole paragraph because your word processor knows that you are applying a paragraph-level style. Once you have applied a style to text, you can modify the style’s definition and update the formatting of all text in that style with a single click. In some programs you have the option of retaining format overrides; in others, they are always kept.
Microsoft Word and a few other word processors support auto-updating styles. When this option is enabled, changing the format of any styled paragraph changes the definition of its associated style—and therefore the formatting of all paragraphs in that style. This is a handy feature, but you must be careful not to accidentally reformat your whole document.
Styles as Workarounds
Your word processor might not have special support for bulleted or numbered lists, but with the techniques described above, you can use styles to make it seem as if it does. In addition, you can use style sheets to simulate annotations or other text that you want to view for editing purposes, but hide for printing. Just create a character style called Comment. Give it a color or underline to identify it. When you want to hide all of the comments, change the style definition to include the Invisible attribute (not available in every word processor, unfortunately). This is a far cry from real conditional text support like that found in FrameMaker, but it is often adequate.
Similarly, you might want to view text in an easy-to-read screen font like Geneva, Chicago, or New York, then switch to more distinctive printer fonts just before printing. Word 98 has a special draft mode for this purpose, but most other word processors do not. Still, if you format your document using style sheets, you can easily change all the fonts in a document with a few clicks. If your word processor is scriptable or has a macro language (This covers just about all of the style-capable Mac word processors.) you can create macros for quickly switching between draft and printing font sets. You can use a similar technique to increase and decrease font sizes in word processors that lack zoom commands.
Some word processors let you associate languages with styles. This means that text can be tagged so that it will always be spell-checked with the correct dictionary. However, this is also useful for single-language documents. If you have text that you want the spelling checker to ignore, you can assign no language. This is great for URLs and code listings.
Finally, in word processors that do not have special support for outlines, the Find command often supports styles. Thus, although your word processor might not support browsing figures, references, sections, or equations, you can use the Find command to search for text tagged with these styles and accomplish the same thing (more or less).
Style sheets are amazingly useful, but they are not the solution to every problem. Although for most documents it makes sense to apply formatting with styles, for short one-time documents they are overkill. Also, if you need to translate a document from one word processor format to another, style sheets may not be retained. On the other hand, style sheets can work very well for translating to some formats. For instance, AppleWorks, FrameMaker, and Word all use styles to help them export to HTML format.
Most word processors come with a few templates that have style sheets already set up. Don’t settle for those! With a little work you can create documents that look much better. I’ll never forget the time someone asked me which of Word’s templates I had used to write a paper. Needless to say, the template wasn’t in Word’s style gallery, and I had not even used Word to create the document. (Yes, there are other word processors.) Creating good templates is not as time consuming as you might think, when you have style sheets on your side.
An important feature that can help you use templates is the “next paragraph” attribute of paragraph styles. When you press return after typing in a paragraph style, a new paragraph will be created, formatted with the style you selected for the next paragraph. This is supported in most word processors. Some even let you choose when this feature should kick in. For instance, if you had a Blockquote style for indented text, you could define the next style to be Body. Typing return while in a Blockquote section would then create a new Body paragraph. However, if you wanted to type a multi-line quotation, you could override the next paragraph feature by typing option-return—creating another Blockquote paragraph.
Although most people assume that styles are useful only for long documents, I disagree. All but the shortest of one-time documents can benefit from the use of styles, if only because they let you defer formatting decisions until after you have finished writing. They force you to think about why you are applying each format, which leads to well though-out documents. Styles allow you to create and maintain better-looking, more-consistent documents with less drudgery. Most importantly, they put you in control of your documents.
Also in This Series
- How Cool Is Your Mac? · May 2012
- Mac OS X’s Increasing Stability · August 2006
- Coping With Mac OS X’s Font Rendering · January 2006
- E-Mail Archiving with Eudora and Mail.app · January 2003
- Grab Bag · October 2002
- Mac OS X 10.2—First Impressions · September 2002
- Mac OS X 10.1—First Impressions · October 2001
- Mac OS X Tips · June 2001
- Mac OS X—Finally · May 2001
- Complete Archive