Documentation/OOoAuthors User Manual/Writer Guide/Working with paragraph styles

From Apache OpenOffice Wiki
< Documentation‎ | OOoAuthors User Manual‎ | Writer Guide
Revision as of 23:09, 23 August 2007 by Kirk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



Working with paragraph styles

Chapter 6 (Introduction to Styles) covers the basics of using paragraph styles. This chapter looks at some advanced properties of paragraph styles and ways that you can use other features in OOo in conjunction with paragraph styles to do specific tasks like:

Controlling page breaks

Writer automatically flows text from one page to the next. If you do not like the default settings, you can change them on the Text Flow page of the Paragraph Style dialog box.

Automatic page or column breaks

The Options section of the Text Flow page of the Paragraph Style dialog box provides settings to control what happens when a paragraph does not fit on the bottom of a page.

Controlling page breaks
Options for controlling automatic page or column breaks.

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.

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 printed alone at the bottom of a page or column. A widow is the last line of a paragraph which 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 2 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.

Required page or column breaks

You can require a paragraph to start on a new page or column and specify the style of the new page. A typical use is for chapter titles that you always want to start on a new page. This topic is covered in more detail in Chapter 4 (Formatting Pages).

On the Text Flow page of the Paragraph Style dialog box:

  1. In the Breaks section, select Insert. Make sure that Type is set to Page and Position 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 start each chapter's page numbering at 1, set Page number to 1.
  4. Click OK.
Paragraph start on new page
Setting a paragraph style to always start on a new page.

Controlling tab stops

Using tabs to space out material on a page is not recommended (depending on what you are trying to accomplish, a borderless table is usually a better choice), but if you do use tabs, do not use the default tabs set in Tools > Options > OpenOffice.org Writer > General (shown below); instead, define your own tab settings, as described in this section.

Selecting a default tab stop interval
Selecting a default tab stop interval.

If you use the default tab interval and then send the document to someone else who has chosen a different default tab interval, tabbed material will change to use the other person's tab settings. This may cause a major formatting problem, as shown below.

Different default tabs
Default tab settings might be different.

To avoid this problem, specify all the tab settings for the paragraph, using the Tabs page of the Paragraph Style dialog box.

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. A common use of a fill character is the dots between a heading and a page number in a table of contents.

Specifying tab stops
Specifying tab stops for a paragraph style.

Specifying a relative font size

If you are creating a style based on another 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 paragraph style Heading 1 is 14pt x 115% = 16.1pt.

To specify a percentage font size, in the Paragraph Style dialog box, go to the Font tab. In the Size box, enter the percentage amount followed by the symbol % (see 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".

Relative font size
Selecting a type size based on a percentage.

It is also possible to use a Percentage Font size for character styles. See the note in Selecting a language for a paragraph style.

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 and 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 tab 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, OOo will use the correct dictionary for paragraphs with this style.

Language selection
Selecting a language for a paragraph style.

Note: You can assign a language to selected pieces of text in a paragraph using character styles, also on the Font page. This assignment has priority over the paragraph style and document language.

Rotating the text in a paragraph style

Two common uses for rotated paragraphs are to put portrait headers and footers on a landscape page and to fit headings above narrow table columns.

Rotated text
A table with rotated headings.

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.

As an example, we will apply rotated table headings to a preexisting 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 90 degrees
    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.
  6. Aligning text
    Aligning text to the bottom of cells.

Kerning text

Kerning means increasing or decreasing the amount of space between pairs of letters to improve the overall appearance of the text. Kerning automatically adjusts the character spacing for specific letter combinations. It is only available for certain font types and, for printed documents, only works if your printer supports it.

Kerning example
Kerning disabled (left) and enabled (right).

To turn kerning on, go to the Position page of the Paragraph Style dialog box. In the Spacing section, select the Pair kerning checkbox.

Turning on kerning
Turning on kerning of letters in a font.

Using styles in outlining

Outline numbering is the feature that automatically numbers sections of a document, for example 1, 1.1, 1.2, 2 and 2.1. When sections are added or deleted, the numbering is automatically corrected.

Paragraph styles are the key to OOo's outline numbering feature. The default paragraph styles assigned to outline levels are the heading styles supplied with OOo: Heading 1, Heading 2, and so on. However, you can substitute any styles you wish, including custom (user-defined) styles.

OOo's outline numbering feature is used for more than numbering headings. The paragraph styles specified on the Outline Numbering dialog box determine which headings appear in the table of contents—see Chapter 12 (Tables of Contents, Indexes, and Bibliographies)—and some fields commonly used in headers and footers, as described in Including chapter or section names in page headers.

Choosing paragraph styles for outline levels

If you are using the default heading styles for the headings in your outline, and you are not using heading numbering, you do not need to do anything on the Outline Numbering dialog box. Setting up heading numbering is not covered in this chapter.

To use custom styles in place of the default heading styles:

  1. Click Tools > Outline Numbering to open the Outline Numbering dialog box.
  2. Click the number in the Level box corresponding to the heading for which you want to change the paragraph style.
  3. In the Numbering section, choose from the drop-down list of paragraph styles the style you want to assign to that heading level. For example, when setting up a chapter in the Writer Guide, I would click Level 1 and choose OOoHeading1 (a custom style defined for the OOoAuthors project) to replace Heading 1.
  4. Repeat for each outline level that you want to change. Click OK when done.

Outline levels
Choosing paragraph styles for outline levels.

Including chapter or section names in page headers

In addition to page numbers, headers and footers often include the name of the chapter or section. Because these names change from one chapter or section to the next, you need to use a field that displays information relevant to each page.

  1. Click Insert > Fields > Other to open the Fields dialog box.
  2. On the Document page, select Chapter in the Type list. The Format list now shows four choices.

Include chapter name in header
Including the chapter name in page header.

The Layer box determines which outline level is displayed in the field. For example, Layer 1 always displays the most recently found heading that has the paragraph style selected for Level 1 in the Outline Numbering dialog box, Layer 2 displays the most recent heading with the paragraph style selected for Level 2 in outline numbering, and so on.

Note: A Chapter field in a page header always picks up the highest heading level on a page, even if you have specified a lower level in the Layer box. For example, if a page has a Heading 1 and a Heading 2 on it, then a Layer 2 Chapter name field in the header of that page will display the Heading 1 paragraph, not the first Heading 2 paragraph, as intended. In a footer, the layers work as intended.

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