Examples of Style Use

From Apache OpenOffice Wiki
Jump to: navigation, search



Examples of Style Use

The following examples of common use of page and paragraph styles are taken from Writer. There are many other ways to use styles; see the guides for the various components for details.

Defining a Different First Page for a Document

Many documents, such as letters and reports, have a first page that is different from the other pages in the document. For example, the first page of a letter typically has a different header, or the first page of a report might have no header or footer, while the other pages do. With Apache OpenOffice, you can define the page style for the first page and specify the style for the following pages to be applied automatically.

As an example, we can use the First Page and Default page styles that come with Apache OpenOffice. The figure below shows what we want to happen: the first page is to be followed by the default page, and all the following pages are to be in the Default page style. Details are in Chapter 4 (Formatting Pages) in the Writer Guide.

AOO41GS2 033.png
Figure 33: Flow of page styles

Dividing a Document into Chapters

Similarly, you can divide a document into chapters. Each chapter might start with the First Page style, with the following pages using the Default page style, as above. At the end of the chapter, insert a manual page break and specify the next page to have the First Page style to start the next chapter, as shown in the figure below.

AOO41GS2 034.png
Figure 34: Dividing a document into chapters using page styles

Changing Page Orientation Within a Document

A Writer document can contain pages in more than one orientation. A common scenario is to have a landscape page in the middle of a document, where the other pages are in a portrait orientation. This can be done with page breaks and page styles. Position the cursor at the point where you want to start the new (landscape) page. Click Insert → Manual Break on the main menu. In the Insert Break dialog, select Page Break under Type, and select a page style with landscape orientation in the Page Style list. Click  OK  to insert the page. To go back to the portrait page style, insert another page break and select the portrait page style you are using (which may be Default Page Style, if you haven't selected or created a different one).

Different Headers on Right and Left Pages

Page styles can be set up to have the facing left and right pages mirrored or only right (first pages of chapters are often defined to be right-page only) or only left. When you insert a header on a page style set up for mirrored pages or right-and-left pages, you can have the contents of the header be the same on all pages or be different on the right and left pages. For example, you can put the page number on the left-hand edge of the left pages and on the right-hand edge of the right pages, put the document title on the right-hand page only, or make other changes.

Controlling Page Breaks Automatically

Writer automatically flows text from one page to the next. If you do not like the default settings, you can change them. For example, 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 to always start on a new right-hand (odd-numbered) page.

Compiling an Automatic Table of Contents

To compile an automatic table of contents, first apply styles to the headings you want to appear in the contents list, then use Tools → Outline Numbering to tell Writer which styles go with which level in the table of contents. See Chapter 3 for more information.

Defining a Sequence of Styles

You can set up one paragraph style so that when you press Enter at the end of that paragraph, the following paragraph automatically has the style you wish applied to it. For example, you could define a Heading 1 paragraph to be followed by a Text Body paragraph. A more complex example would be: Title followed by Author followed by Abstract followed by Heading 1 followed by Text Body. By setting up these sequences, you can often avoid manually applying styles.

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