Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




OpenOffice Writer 3.x Guide
Previous Page Home Next Page

A conditional paragraph style is another way of formatting text differently in different parts of your document. In some cases, you may find it saves time to use conditional styles rather than switching between styles as you type.

Making a paragraph style conditional means it changes its formatting depending on where it is used. For example, you may want the style MyTextBody to be black by default but turn white when inside a frame with a blue background.

Probably the most common use for conditional formatting is with single-style outlining. Single-style outlining is a type of outline numbering designed with a Numbering style, rather than with Tools > Outline Numbering. Instead of using different styles, it changes the number formatting whenever you press the Tab key to create a subordinate heading.

The only trouble with single-style outlining is that all levels look the same. That is where a conditional paragraph style comes in handy. Assign the paragraph style to an outline numbering style in the Numbering page and then open the Condition page. There, you can assign the levels of the outline numbering style to other paragraph styles. Then, when you press the Tab key while using the paragraph style, each level of the outline takes on different formatting, making single-style outlining even more convenient than it is on its own.

Condition page for paragraph styles.
Image:documentation_note.png Predefined styles (other than Text body) such as Default, Heading 1, and Heading 2 cannot be set to be conditional.
Image:documentation_caution.png If you want to make a style conditional, you have to do it while the style window is still open for the first time. After the window closes, the Condition tab no longer appears in the window.

When you create a conditional style, you are saying “in this condition make this style look like that other style”. For example, “When typing into a footer, make this style look like the my_footer paragraph style; when typing into a table, make this style look like the table_text paragraph style”.

In addition to setting the normal (unconditional) properties of the style, you need to define which other style it will look like in different situations. You do this on the Condition tab.

To set up a conditional paragraph style:

  1. Define a new paragraph style.
  2. Select all the paragraph properties for the style. Do not click OK!
  3. Click the Condition tab.
  4. Select the Conditional Style option.
  5. Select the first condition in the Context list (left side of the dialog box) and select the style you want for this condition in the right-hand list.
  6. Click Apply. The name of the paragraph style appears in the middle list.
  7. Repeat steps 5 and 6 for each condition you want to have linked to a different style.
  8. Click OK.

When the style is selected, you will see that the formatting of your text depends on the context.

OpenOffice Writer 3.x Guide
Previous Page Home Next Page

  Published under the terms of the Creative Commons License Design by Interspire