Most people format a document the way you paint a wall: select the text and apply bold, size and colour, one piece at a time. It works as long as the document is two pages long. Then someone asks to change the heading font, and you have to touch up forty lines by hand, hoping not to miss any.
Styles solve the problem at the root. A style is a named set of settings: you apply the name to the text, and the appearance is defined once, in a single place.
Direct formatting versus styles
| Aspect | Direct formatting | Styles |
|---|---|---|
| Changing all headings | One by one | By editing the style, once |
| Consistency across pages | Depends on memory | Guaranteed |
| Automatic table of contents | Does not work | Generated from heading styles |
| Navigating the document | Not available | Navigation pane by headings |
| Conversion to other formats | Often lost | Preserved |
| Accessibility | Headings not recognised | Real headings |
The last row is often underestimated: large bold text looks like a heading, but to the program, to a screen reader or to Pandoc it remains an ordinary paragraph.
Types of style
- Paragraph: applies to a whole paragraph and controls font, spacing, indents, alignment, line spacing and behaviour at page breaks. Headings and body text are paragraph styles.
- Character: applies to part of the text within a paragraph. Useful for technical terms, command names, words in a foreign language.
- List: defines the bullets, numbering and indents of lists.
- Table: borders, shading and formatting of header rows and banded rows.
- Page (in Writer): margins, orientation, headers and footers. In Word these settings belong to sections instead.
Inheritance: the base style
Styles form a hierarchy. In Word almost everything descends from «Normal»; in Writer from «Default Paragraph Style» (or «Default», depending on the version). If a style does not define a setting, it inherits it from its parent.
The practical consequence is powerful: by changing the font in the base style, the whole document updates, except for styles that explicitly chose another font. That is why it pays to:
- set the body font and size in the base style;
- derive the headings from a common style («Heading» in Writer) to give them the same font;
- change in the child styles only what distinguishes them: size, spacing, numbering.
The settings that make the difference
In paragraph styles, a few options matter more than the font you choose:
- Spacing before and after instead of blank lines: the text stays clean and the distance is always the same.
- Keep with next on headings: it prevents a heading from being stranded at the bottom of a page, separated from its text.
- Widow and orphan control: it stops the first or last line of a paragraph from being left alone on a page.
- Next style: after a heading, pressing Enter automatically returns to body text.
- Outline level: tells the program which heading level the style represents, and it is what feeds the table of contents and navigation.
Applying styles quickly
- In Word, Ctrl+Alt+1, 2 and 3 apply the first three heading levels; Ctrl+Shift+N returns to Normal.
- In Writer, Ctrl+1, 2 and 3 apply headings and Ctrl+0 body text.
- In both, the styles pane (in Writer it opens with F11) shows the full list and can filter those used in the document.
Cleaning up a messy document
A document received from others often contains direct formatting layered over the styles. The most effective way to fix it:
- Select everything and remove direct formatting (in Word Ctrl+Space for characters and Ctrl+Q for paragraphs, in Writer Ctrl+M). Bold and italics applied by hand disappear, so on long texts it is worth first converting them into a character style.
- Apply heading styles to the real headings, going through the document.
- Remove blank lines and multiple spaces with Find and Replace.
- Check the navigation pane: if the heading structure is correct, the document is in order.
In my work, when I receive a document to fix, I always start here: ten minutes of cleaning save hours of later touch-ups.
In short
- A style is a named set of settings: defined once and applied everywhere.
- Paragraph, character, list, table and page styles cover every aspect of the document.
- Styles inherit from a base style: changing it updates the whole document.
- Spacing, «keep with next» and outline level matter more than the font.
- To clean up a document, remove direct formatting and reapply the styles.