Working with paragraph styles

From Apache OpenOffice Wiki
Jump to: navigation, search

Although this section describes most of the parameters scattered over the twelve tabbed pages shown in the figure below, you do not need to configure them all. In fact, in the vast majority of cases it is sufficient to modify only a few attributes, particularly if you make use of the linking properties of styles or when basing the new style on one which is already similar.

Pages of the Paragraph Style dialog box.

Settings on the Indents & Spacing page

In the Indents & Spacing page, you can set up the parameters that affect the position of the paragraph on the page and the spacing between lines and between this paragraph and the paragraphs nearby. On the right hand side of the page, you can see a preview of the applied settings.

Settings on the Indents and Spacing page of a paragraph style.

Use the Indent section of the page to set up the indentation, using these parameters:

  • Before text: controls the space in your selected unit of measurement between the left margin of the page and the leftmost part of the paragraph area. Entering a negative value results in the text starting on the left of the margin. This may be useful in situations where your left margin is quite wide, but you want the headings to be centered in the page.
  • After text: controls the space in your selected unit of measurement between the right margin of the page and the rightmost part of the paragraph area. Entering a negative value results in the text extending into the right margin of the page.
  • First line: enter in this box the offset (either positive or negative) of the first line of the paragraph relative to the paragraph area. A positive value increases the indentation of the first line, while a negative value makes the first line start to the left of the paragraph area.
  • Automatic: check this box to allow Writer to automatically control the indentation of the first line. The value is calculated by Writer on the basis of the font size and other parameters.

Use the Spacing section of the page to determine the amount of vertical space above and below the paragraph. It is customary to leave some space above heading styles so that they are separated from the text body of the previous section without the need of insert empty paragraphs. Spacing between paragraphs is also normal in certain types of documents. The body text style of this guide is configured to leave some space between consecutive paragraphs.

The spacing between paragraphs does not affect the spacing between lines, which is instead controlled using the drop-down box in the Line spacing section. You can select one of the following values:

  • Single: the default setting—applies a single line spacing to the paragraph. This is calculated automatically based on the font size.
  • 1.5 lines: sets the line spacing to 1.5 lines.
  • Double: sets the line spacing to two lines.
  • Proportional: this value activates the edit box next to the drop-down list where you can enter a percentage value. 100% means a single line spacing, 200% double line spacing and so on.
  • At least: this choice activates the edit box next to the drop-down list, where you can enter the minimum value (in your selected unit of measurement) to be used for the line spacing.
  • Leading: if this value is selected, you can control the height of the vertical space inserted between two lines (from the bottom of the font of the line above to the top of the font of the line below).
  • Fixed: this choice activates the edit box next to the drop-down list, where you can enter the exact value of the line spacing.


The last parameter that can be set in this page is Register-true. Refer to General settings for the page style for information on how to use this parameter.

Settings on the Alignment page

Use the Alignment page to modify the horizontal alignment of the text, choosing between Left, Right, Center, and Justified. The results of the selection are shown in a preview window on the right-hand side of the page.

When selecting the Justified alignment, you can also decide how Writer should treat the last line of the paragraph. By default, Writer aligns the last line to the left, but you can choose to align it to the center or to justify it also (meaning that the words on the last line will be spaced in order to occupy it fully). If you select the Expand single word option, then whenever the last line of a justified paragraph consists of a single word, this word is stretched by inserting spaces between characters so that it occupies the full length of the line.

The alignment page is also used to control the Text to Text vertical alignment—useful when you have mixed font sizes on the same row. Choose the element of the fonts on the line that will be aligned between Automatic, Baseline, Top, Middle, Bottom. Refer to the figure below for a graphical representation of these reference points.

Typographic measurements (from

Text flow options for paragraph styles

The page of the dialog box controlling the text flow options is shown below. This page is divided into three parts: Hyphenation, Breaks, and Options.

In the Hyphenation section, you can change three parameters:

  • Characters at line end: controls the minimum number of characters to be left on a line before inserting a hyphen.
  • Characters at line begin: controls the minimum number of characters that can be placed at the beginning of a new line following a hyphen.
  • Maximum number of consecutive hyphens: controls the number of consecutive lines that terminate with a hyphen.

If you prefer Writer to automatically control the hyphenation, select the Automatically option.

The options on the Text Flow page of the Paragraph dialog box.

In the Breaks section, you can require a paragraph to start on a new page or column, as well as specify the position of the break, the style of the new page, and also the new page number. A typical use for this option to ensure that the first page of a new chapter (or its title) always starts on a new (usually recto or right) page.

To always start a style on a new page, input the following setting on the Text Flow page:

  1. In the Breaks section, select Insert. Make sure that Type is set to Page and Position is set to Before.
  2. Select With Page Style and choose the page style from the list.
  3. To continue page numbering from the previous chapter, leave Page number set at 0. To restart each chapter’s page numbering at 1, set Page number to 1.
  4. Click OK. The page should now look like the figure below.
Setting a paragraph style to always start on a new page.


The Options section of the Text Flow page provides settings to control what happens when a paragraph does not fit on the bottom of a page:

  • Do not split paragraph means that the paragraph is never split across two pages. If it does not fit on the bottom of one page, the entire paragraph moves to the top of the next page.
  • Keep with next paragraph is appropriate for headings or the lead-in sentence to a list, to ensure that it is not the last paragraph on a page.
  • Orphan control and Widow control. Widows and orphans are typographic terms. An orphan is the first line of a paragraph alone at the bottom of a page or column. A widow is the last line of a paragraph that appears alone at the top of the next page or column. Use these options to allow paragraphs to split across pages or columns but require at least two or more lines to remain together at the bottom or top of a page or column. You can specify how many lines must remain together.

Font options for the paragraph style

Three pages of the Paragraph Style dialog box are dedicated to settings controlling the appearance of the font, namely, the Font, Font Effects, and Position pages. The use of the first two pages should be straightforward. Many of the options used when creating a character style are discussed in Creating a new character style. Options that can be used when creating a paragraph style are described here.

Specifying a relative font size

If you are creating a style based on another style (linked style), you can specify a font size relative to that other style—either as a percentage or as a plus or minus point value (–2pt or +5pt). Relative font sizes are commonly used for Web pages.

For example, the paragraph style Heading 1 is based on the paragraph style Heading. The font size of the paragraph style Heading is 14pt, and the font size of paragraph style Heading 1 is specified as 115%. Thus, the resultant font size of text in a paragraph formatted with the Heading 1 paragraph style is 14pt times 115% = 16.1pt.

To specify a percentage font size: in the Paragraph Style dialog box, select the Font tab. In the Size box, enter the percentage amount followed by the symbol % (see figure below). Similarly, you can enter a plus or minus sign followed by the number of points to be added or subtracted from the base font size.

To change from a relative font size back to an absolute font size, enter the desired font size in points followed by the letters “pt”.

Selecting a type size based on a percentage.

It is also possible to use a Percentage Font size for character styles.

Selecting a language for a paragraph style

The language you select for a document (on Tools > Options > Language Settings > Languages) determines the dictionary used for spell checking, thesaurus, hyphenation, the decimal and thousands delimiter used, and the default currency format.

Within the document, you can apply a separate language to any paragraph style. This setting has priority over the language of the whole document. On the Font page of the Paragraph Style dialog box, languages with installed dictionaries are marked in the Language list by a small ABC icon. When you check spelling, Writer will use the correct dictionary for paragraphs with this style. If you write documents in multiple languages, you can use the linked styles to create two paragraph styles that differ only in the language option. If you then want to change some of the other properties of the paragraph style, all you need do is to change the parent style.

To insert occasional words in a different language and avoid their being picked by mistake with the check-spelling function, it is more convenient to use a character style.

Selecting a language for a paragraph style.

Options for positioning text

The Position page of the Paragraph Style dialog box collects all the options that affect the position of the text on the screen or printed page. This page is divided into three sections, plus a preview area. They are: Position, Rotation, and Scaling.

Use the Position section to control the appearance of superscripts and subscripts. However, you will normally apply superscript and subscripts to groups of characters rather than to entire paragraphs. Therefore, it is strongly recommended to change these parameters only when defining a character style and, instead, leave the default settings for the paragraph styles.

The position page of the Paragraph Style (default options).

The second section of the Position page controls the rotation of the paragraph area. Two common uses for rotated paragraphs are (a) to put portrait headers and footers on a landscape page and (b) to fit headings above narrow table columns.

A table with rotated headings.

The Scale Width box controls the percentage of the font width by which to compress or stretch the rotated text horizontally.

Chapter 4 (Formatting Pages) describes how to create portrait headers and footers on landscape pages by rotating characters. You can achieve the same effect by defining a separate header or footer paragraph style specifically for landscape pages.

Example: Rotating the text in a paragraph style

As an example, we will apply rotated table headings to a pre-existing table.

  1. Create a new paragraph style. Name it Table Heading Rotated.
  2. On the Position page of the Paragraph Style dialog box, in the Rotation / scaling section, select 90 degrees. Click OK to save the new style.
  3. Rotating a paragraph 90 degrees.
  4. Select the heading row of the table and apply the new style. Any text in the cells of the heading row is now rotated.
  5. If the headings are aligned to the top of the cells, you may want to change the alignment to the bottom of the cells. To do this, click the Bottom button on the Table toolbar or select Format> Alignment > Bottom from the main menu.

Spacing options

The spacing section of the Position page allows you to control the spacing between individual characters in the paragraph. When selecting an option other than default in the drop-down menu, use the edit box to enter the value in points by which you want to expand or condense the text. Selecting the Pair Kerning option results in increasing or decreasing the amount of space between certain pairs of letters to improve the overall appearance of the text. Kerning automatically adjusts the character spacing for specific letter combinations (see an example of kerning pair below). Kerning is only available for certain font types and, for printed documents, only works if your printer supports it.

Kerning disabled (left) and enabled (right).

Controlling tab stops

Although borderless tables are generally considered a much better solution to space out material across a page, there are still many situations where tabulations are sufficient to do what you need with the added advantages of being simpler to manage and quicker to apply.


To define tab stops in your paragraph style, use the page shown below. Here you can choose the type of tab: left, right, centered, or decimal; the character to be used as a decimal point; and the fill character—the characters that appear between the end of the text before the tab and the beginning of the text after the tab. You can also create a custom fill character by entering it in the corresponding box. Common use of a fill character is adding dots between a heading and a page number in a table of contents or underscore character when creating a form to fill in.

Creating a new tab stop, therefore, is just a matter of deciding its position relative to the left margin, the type, the fill character and clicking the New button. The tab stop will be entered in the Position list on the left hand side. Unfortunately, the only way to modify the position of a tab stop is to create a new one in the desired position and delete the old one using the buttons on the right-hand side of the page.

Specifying tab stops for a paragraph style.

Note that it is not possible to define tabulations that exceed the page margin. In the rare cases where it may be needed, use a borderless table instead.

Using the Numbering page

Use the numbering page if you want to be number the paragraph. This page should be used in combination with list styles when you need to associate a certain paragraph style with a list style. Refer to Combining list and paragraph styles for additional information on how to use this page, as well as an example.

Setting up a drop cap

If you want your paragraph to use drop caps (usually this is suitable for a first paragraph style), then you can predefine the properties in the page shown below. Checking the box to display drop caps also enables the subsequent options where you can fine tune the appearance, such as the number of lines occupied, the number of characters to enlarge (if you want the whole first word, check the corresponding box), and the space between the drop caps and the text.

Drop caps use the same font and have the same properties of the rest of the paragraph; however, you can easily modify their appearance by creating a specific character style and using it. For example, you may want the drop caps to be of a different color or apply an outline effect. Select the character style you want to use in the corresponding drop-down menu.

Options for adding a drop cap to the paragraph style.

Setting up paragraph background and borders

Adding a background color and a border to a paragraph is a good way to make it stand out without having to insert a frame. You can customize the background and border of the paragraph areas using the corresponding pages of the paragraph style dialog box. In addition to highlighting, borders are also often used to separate header and footer areas from the main text area as well as decorative elements in some heading styles.

The two pages are fairly intuitive. You may want to pay attention to the following points when working with the Background page:

  • In case you do not find the desired color in the list of predefined ones, you can define your own by selecting Tools > Options > Colors.
  • You can use a graphic instead of a solid color as background. Select Graphic in the drop-down menu, then select the graphic object you want to use and adjust the parameters, as required. Detailed instructions on working with graphic backgrounds can be found in the Impress Guide.
  • The background is applied to the paragraph area, so that if you have defined some indentations, the space between the paragraph and the margin remains of the page color.

With regard to the Borders page, the following points are worth considering:

  • Watch out for the effects that the spacing between borders and paragraph area produces on indentations and tabulations.
  • If you want the border to be drawn around multiple paragraphs, leave the corresponding option at the bottom of the page marked.

Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools