Intro Styles by Ashish From Source
Intro Styles by Ashish From Source
Contents
Overview........................................................................................................................................ iii
Copyright and trademark information........................................................................................iii
Feedback.................................................................................................................................... iii
Acknowledgments......................................................................................................................iii
Modifications and updates......................................................................................................... iii
Introduction......................................................................................................................................1
What are styles?.......................................................................................................................... 1
Why use styles?........................................................................................................................... 1
Types of styles.............................................................................................................................2
Using paragraph styles..................................................................................................................... 3
First steps.................................................................................................................................... 3
Using the Apply Style menu........................................................................................................4
Modifying paragraph styles......................................................................................................... 4
Center Heading 1.................................................................................................................... 5
Indent Heading 3.................................................................................................................... 6
Linked styles................................................................................................................................7
Creating custom styles..................................................................................................................... 9
Creating the Poem style...............................................................................................................9
Creating the PoemHeading style............................................................................................... 11
Sample poem............................................................................................................................. 12
Changing the formatting of your styles..................................................................................... 13
Indent Poem and Poem Header............................................................................................ 13
Create Poem Author style.....................................................................................................13
Final result............................................................................................................................ 14
Tips and tricks........................................................................................................................... 15
Using page styles and page numbering.......................................................................................... 16
Page numbering.........................................................................................................................17
Preliminaries – fields............................................................................................................17
Inserting a header..................................................................................................................17
Introduction to Styles i
Real life situation
Introduction to Styles ii
Overview
Overview
Styles are one of OpenOffice.org Writer's most powerful features. They are necessary to use
OOo Writer to its full potential. This chapter introduces styles, assuming no previous
knowledge from the reader. After reading it, you will be confident using paragraph, page,
and character styles.
Feedback
Please direct any comments or suggestions about this document to:
[email protected]
Acknowledgments
Thanks to the people who reviewed this chapter.
Introduction
The time is 9:50 A.M. and Jane is finishing the 30-page paper for school
that is due at 10:00 A.M. She looks over the assignment one more time, and
suddenly she realizes that:
• The text must use Arial font instead of Times New Roman.
• The headings must be dark blue and indented.
• The title must appear at the top-right of every page except the first.
• Even numbered pages must have a wider right margin, and odd
numbered pages must have a wider left margin.
Thankfully, Jane used OpenOffice.org and styles. She makes all the
changes in 2 minutes and hands in the paper on time.
Introduction to Styles 1
Introduction
Types of styles
OpenOffice.org Writer has five types of styles:
• Paragraph styles affect a an entire paragraph.
• Character styles affect a block of text inside a paragraph.
• Page styles affect page formatting (page size, margin and the like).
• Frame styles affect frames and graphics.
• Numbering styles affect numbered lists and bulleted lists.
The first three styles are the most used. Those are the styles covered in this chapter. Frame
styles and numbering styles are left for a later chapter.
These styles are available through a floating palette called the Stylist (press F11 to see it),
shown in Figure 1. The Stylist is discussed in the next section.
Frame Styles
Character Styles Page Styles
Paragraph Styles Numbering Styles
Note: The Stylist is a floating palette. You can drag it around the screen using the mouse.
Introduction to Styles 2
Using paragraph styles
First steps
OpenOffice.org uses a tool called the Stylist to manage styles. The concepts of styles and the
Stylist are best explained through an example.
1) Create a new document (go to File > New > Text Document or press Control+N).
2) Type “Heading 1” in it. Make sure that the cursor remains in that same line.
3) Press the Stylist icon located on the Function Bar or press the F11 key. This
brings up a window called the Stylist (see Figure 2).
4) Make sure you are in the Paragraph Styles section (click on the top-left icon of the
Stylist ).
Stylist icon
Cursor
Paragraph Styles
Stylist
Double-click on the Heading 1 entry of the Stylist. This will do two things:
• Give the line you typed the Heading 1 style.
• Add Heading 1 to the Apply Style menu.
The Apply Style menu is illustrated in Figure 3. It provides direct access to the styles that are
currently in use in the document.
Introduction to Styles 3
Using paragraph styles
Style selected
Figure 3 Applying paragraph styles
Introduction to Styles 4
Using paragraph styles
When the Paragraph Style window pops up, choose the Alignment tab, select Center and
click OK.
Introduction to Styles 5
Using paragraph styles
Alignment tab
Center text
Now everything marked as Heading 1 will be centered. If you make another Heading 1, it
will be centered as well.
Centered
Figure 7 Text is centered.
Indent Heading 3
On the Stylist, right-click on Heading 3 and choose Modify (as before). When the Paragraph
Style window pops up, follow the steps below:
1) Click on the Indents & Spacing tab.
2) Under the Indent section, set the indentation before the text to 1.5cm (0.6 in).
Introduction to Styles 6
Using paragraph styles
Linked styles
Some OpenOffice.org styles are linked together. This means that a change in one style
affects every style linked to to it. For example, every Heading style (such as Heading 1,
Heading 2) is linked with a style called Heading. This relationship is illustrated in Figure
10.
Heading
Heading 1
Heading 2
Heading 3
Heading 4
Figure 10 Linked styles.
As an example, suppose you want to change the font of not only Heading 1, or Heading 2, but
all headings. The easiest way to do that, is to take advantage of this linking. Open the stylist
(press F11) and select Heading.
Introduction to Styles 7
Using paragraph styles
Open the paragraph styles window for the Heading style (right-click > Modify) and select
the Font tab. Select the Corsiva font and click OK (see Figure 12).
Now the fonts of all the heading styles have been changed in a single operation. Your
document should now resemble Figure 13.
Introduction to Styles 8
Using paragraph styles
Figure 13 All Heading styles now have the Corsiva type font.
1) Click on the Stylist icon to bring up the Stylist (or press F11).
2) Right click on Default and choose New (see Figure 14).
Introduction to Styles 9
Creating custom styles
This brings up the Paragraph Styles window, with the Organizer tab selected. To create a
custom style, you have to understand and configure the top three entries.
Name This is the name of the style itself, like Heading 1 or Text body.
Set the name to Poem.
Next Style This is the style that follows the Poem style by default. When you
press Enter, this style is used.
Set this value to Poem. When you press Enter, the text will remain
in the Poem style.
Linked With If the Poem style is linked with another, say Default, then any change
in Default will affect Poem, just as you saw with Heading in the
previous section.
For our example, this is not the behavior we want. Set this entry to
– None – . This means that Poem is not linked with any other style.
After making all these changes, your screen should look like Figure 15.
Figure 15 Initial configuration for the Poem style. Set the first three entries as shown.
Introduction to Styles 10
Creating custom styles
The next step is to configure the alignment and font properties of this style.
• Under the Alignment tab, select centered text.
• Under the Font tab, select 10pt font-size.
Click OK to save the new Poem style.
Congratulations! You just made your very own style.
Introduction to Styles 11
Creating custom styles
Sample poem
It is a good idea to test out your new styles and see if you are happy with them. Your poem
should look similar to the one in Figure 17.
Introduction to Styles 12
Creating custom styles
Introduction to Styles 13
Creating custom styles
Edited entries
This is how the Indents & Spacing tab should look at this point:Click OK to save this style.
Now set the author of the poem (in my case, “Robert Frost”) to the newly created Poem
Author style, as described in the Getting started section.
Final result
After all these changes, the poem should look similar to Figure 19.
Introduction to Styles 14
Creating custom styles
Introduction to Styles 15
Using page styles and page numbering
The page style for the current page is displayed on the status bar (Figure 21).
Page Styles
Right-click on the currently active page style (see Figure 22) and select Modify. This
displays a window, shown in Figure 23.
Introduction to Styles 16
Using page styles and page numbering
Page properties
Page numbering
Many people first encounter page styles when they want to number pages. OpenOffice.org
(OOo) has a very powerful system for numbering pages, but to make full use of it you need to
learn something about page styles.
Preliminaries – fields
OpenOffice.org uses a feature called fields to manage page numbers. To insert a page
number field, select Insert > Fields > Page Number. You will see the page number on a
gray background. The gray background denotes a field.
Note: The gray background is purely for informational purposes. When you print the document,
the background will be the same as the rest of the document. Go to View > Field Shadings to
turn this feature off.
If you have seen lists in OOo, you will have noticed this gray background. OOo lists use
fields. The page number field always displays the page number for the current page. If you
see the words “Page number” instead of a number, press Ctrl+F9. This shortcut key toggles
OOo between displaying field contents (what the field is for) and field results (what the field
creates).
Note: A full introduction to fields is beyond the scope of this chapter.
Inserting a header
In OOo, headers are specified by page styles.
1) Open the Page Style dialog.
2) Select the Header tab.
3) Select Header on and click OK (see Figure 24).
Introduction to Styles 17
Using page styles and page numbering
At this point you should see the header on the current page, as in Figure 25.
Page header
What’s so special about headers? The text on the header appears on all pages with that page
style (try it!). This property of headers (or footers), along with fields, forms the basis of OOo
page numbering.
Tip: You can also add a header through the Insert menu: Insert > Header > [page style].
Likewise for footers: Insert > Footer > [page style].
Page number
Introduction to Styles 18
Using page styles and page numbering
Many more variations are possible. For example, you can use a footer instead of a header to
make the page number appear at the bottom of the page.
Introduction to Styles 19
Using page styles and page numbering
Note: The margins are set this way to make binding easier after the book is printed double sided.
This can be accomplished using what you already know of page styles, plus a clever use of
the Next Style property. OOo provides two page styles called Right Page and Left Page.
First, set the page style Right Page to be followed by Left Page and vice versa.
1) On the Stylist, go to the configuration window for the Right Page style (Figure 28).
2) Click on the Organizer tab, and set Next Style to Left Page (Figure 29). This means
that, after a Right Page, the page style will switch to Left Page.
Introduction to Styles 20
Using page styles and page numbering
Page margin
A title page
Consider a slightly more complex scenario. You want the document to have a title page. A
title page is different from the rest of the document:
• It should not have a header or page number.
• The left and right margins should be the same.
For the title page we can use the Front Page style that comes with OOo. Setting up the
header and margins is left as an exercise for the reader. The difficult part is how to reconcile
this front page with the alternating page styles (Right Page and Left Page). The trick is to set
the Next Page property to Right Page. In other words:
First Page Next Style: Right Page
Right Page Next Style: Left Page
Left Page Next Style: Right Page
Introduction to Styles 21
Using page styles and page numbering
Introduction to Styles 22
Using page styles and page numbering
At some point you will want to start a new chapter. Follow these steps:
1) Put the cursor at the end of the chapter, on a blank line of its own.
2) Go to Insert > Manual Break.
3) Select Page break, and under style, choose New Chapter.
Select style
Figure 34 Choose page break, and select the New Chapter page style.
Figure 35 illustrates the flow of page styles when using page breaks.
Page break
Introduction to Styles 23
Using page styles and page numbering
Page break
Page break
Left Right ia l Right Left
e c
Page Page sp Page Page
Introduction to Styles 24
Using page styles and page numbering
After the preface is written, we are ready to restart page numbering. Follow these steps:
1) Put the cursor at the very end of the preface, on a blank line.
2) Insert > Manual Break. Select Page break and choose the Right Page style.
3) Put a check mark next to Change page number and set the new value to 1.
These settings are shown in Figure 38.
Important Note: OpenOffice.org will not let you assign an odd page number to a Left Page, or
an even page number to a Right Page. OOo strongly adheres to the convention that odd page
numbers go on right-hand pages and even page numbers on left-hand pages.
Introduction to Styles 25
Using character styles
Character styles don’t have as many options as paragraph styles or page styles. Their benefits
are of a different nature:
• Formatting changes.
As Jean’s story illustrates, the ability to make formatting changes throughout a
document can be important. Character styles provide this.
• Consistency.
Character styles help ensure that typesetting guidelines are applied consistently.
• Focus on content.
“Was I supposed to bold keystrokes? How about menus?”
A writer shouldn’t have to remember the answers to these questions. Typesetting
details distract you from the real content of your work. A properly named character
style (such as KeyStroke or MenuPath) will remove this burden from you.
Other ways of using character styles are described elsewhere in the Writer Guide. These uses
include making chapter numbers, page numbers, or list numbers larger than the surrounding
text and formatting hyperlinks.
Introduction to Styles 26
Using character styles
Note: One difference between character styles and paragraph styles is the need for highlighting.
Character styles require you to highlight the applicable text; paragraph styles do not.
Unset/undo character styles
Some times you will want to remove the formatting from a block of text. You must resist the
temptation to do this manually. This will only cause trouble down the road. There are two
easy ways to remove character formatting:
• Select the block of text, right-click and choose Default.
• If you have the Stylist open, click on the Default character style.
Note: Incidentally, the first method also works for removing manual formatting.
Migrating to character styles
For people used to formatting text manually, character styles can take some getting used to.
Here are some suggestions for making the transition easier:
• Never mix character styles and manual formatting. Manual formatting supersedes
character styles. If you combine them, you may end up wasting hours in frustration
trying to figure out why your character styles don’t work.
• Right-click > Default removes any text formatting (both manual and character styles).
• Realize that clicking on the bold button is not easier than clicking on a character style.
• Leave the Stylist open to make character styles easy to access.
Introduction to Styles 27