Writer Guide
Word Processing with OpenOffice.org

This PDF is designed to be read onscreen, two pages at atime. If you want to print a copy, your PDF viewer shouldhave an option for printing two pages on one sheet ofpaper, but you may need to start with page 2 to get it toprint facing pages correctly. (Print this cover page
separately.)

Second edition
March 2010
Updated for V3.2

Free eBook Edition

CopyrightThis document is Copyright © 2005–2010 by its contributors as listed
in the section titled Authors. You may distribute it and/or modify it
under the terms of either the GNU General Public License, version 3 orlater, or the Creative Commons Attribution License, version 3.0 or
later. All trademarks within this guide belong to their legitimate
owners.

Authors
Jean Hollis Weber
Magnus Adielsson
Ken Byars
Daniel Carrera
Laurent Duperval
Katharina GreifPeter Hillier-Brook
John Kane
Michael KotsarinisPeter Kupfer
Alan Madden
Vincenzo Ponzi
Carol Roberts
Gary Schnabl
Janet M. Swisher
Catherine Waterman
Claire Wood

Michele Zarri
Agnes Belzunce
Bruce Byfield
Dick Detwiler
Martin Fox
Tara Hess
Lou Iorio
Stefan A. Keel
Sigrid Kronenberger
Ian Laurenson
Paul Miller
Scott Rhoades
Iain Roberts
Robert Scott
Barbara M. Tobias
Bob Wickham
Linda Worthington

Feedback
Please direct any comments or suggestions about this document to:authors@documentation.openoffice.org

Publication date and software version
Second edition. Published 25 March 2010. Based on OpenOffice.org
3.2.

Free eBook Edition

You can download
an editable version of this document fromhttp://oooauthors.org/english/userguide3/published/

Contents
Chapter 1
Introducing Writer...................................................................10
What is Writer?................................................................................. 11
Starting Writer.................................................................................. 11
The Writer interface.......................................................................... 15
Changing document views................................................................23
Using the Navigator.......................................................................... 23
Starting a new document..................................................................28
Opening an existing document..........................................................30
Saving a document............................................................................ 31
Getting help......................................................................................33
Undoing and redoing changes..........................................................34
Closing a document..........................................................................34
Closing Writer................................................................................... 35
Chapter 2
Setting up Writer......................................................................36
Choosing options that affect all of OOo............................................37
Choosing options for loading and saving documents........................50
Choosing options for Writer..............................................................56
Choosing options for HTML documents............................................66
Choosing language settings..............................................................66
Controlling Writer’s AutoCorrect functions......................................69
Chapter 3
Working with Text.....................................................................70
Introduction...................................................................................... 71
Selecting text.................................................................................... 71
Cutting, copying, and pasting text....................................................73
Finding and replacing text................................................................74
Inserting special characters..............................................................78
Formatting paragraphs.....................................................................80
Formatting characters......................................................................84

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3

Autoformatting.................................................................................. 84
Creating numbered or bulleted lists.................................................86
Using footnotes and endnotes...........................................................89
Checking spelling and grammar.......................................................91
Using built-in language tools............................................................93
Using the thesaurus.......................................................................... 95
Hyphenating words........................................................................... 95
Using AutoCorrect............................................................................98
Using word completion.....................................................................99
Using AutoText................................................................................ 100
Line numbering............................................................................... 100
Tracking changes to a document....................................................101
Adding other comments..................................................................105
Linking to another part of a document...........................................107
Switching between insert and overwrite mode...............................112
Counting the words in a selection...................................................112
Chapter 4
Formatting Pages.....................................................................113
Introduction.................................................................................... 114
Choosing a layout method...............................................................114
Setting up basic page layout using styles.......................................116
Changing page margins..................................................................121
Using columns to define the page layout........................................122
Using frames for page layout..........................................................126
Using tables for page layout...........................................................133
Using sections for page layout........................................................136
Updating links................................................................................. 144
Creating headers and footers..........................................................146
Numbering pages............................................................................ 150
Defining borders and backgrounds.................................................161

4

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Chapter 5
Printing, Exporting, Faxing, and E-Mailing...........................165
Introduction.................................................................................... 166
Quick printing................................................................................. 166
Controlling printing........................................................................166
Printing a brochure......................................................................... 170
Printing envelopes..........................................................................171
Printing labels................................................................................. 174
Sending a fax..................................................................................176
Exporting to PDF............................................................................176
Exporting to XHTML.......................................................................183
E-mailing Writer documents...........................................................183
Digital signing of documents..........................................................187
Chapter 6
Introduction to Styles.............................................................188
What are styles?.............................................................................. 189
The Styles and Formatting window.................................................190
Applying styles................................................................................ 195
Modifying styles.............................................................................. 203
Creating custom paragraph styles: examples.................................208
Copying and moving styles.............................................................212
Deleting styles................................................................................214
Assigning styles to shortcut keys....................................................215
Defining a hierarchy of headings....................................................215
Chapter 7
Working with Styles..................................................................224
Introduction.................................................................................... 225
Creating custom (new) styles..........................................................225
Working with paragraph styles.......................................................229
Working with conditional paragraph styles.....................................241
Working with character styles........................................................243
Working with frame styles..............................................................246

Free eBook Edition

Working with page styles................................................................249
OpenOffice.org 3.x Writer Guide

5

Working with list styles...................................................................259
Chapter 8
Working with Graphics...........................................................268
Graphics (images) in Writer............................................................269
Creating and editing images...........................................................269
Adding images to a document.........................................................271
Modifying an image........................................................................276
Using Writer’s drawing tools..........................................................283
Positioning graphics within the text................................................286
Adding captions to graphics............................................................296
Creating an image map...................................................................300
Adding an image to the Gallery.......................................................302
Chapter 9
Working with Tables...............................................................304
Introduction.................................................................................... 305
Creating a table..............................................................................305
Formatting the table layout............................................................309
Formatting the table text................................................................319
Data entry and manipulation in tables............................................322
Additional table operations.............................................................325
The Table menu and toolbar...........................................................332
Chapter 10
Working with Templates.........................................................335
Introduction.................................................................................... 336
Using a template to create a document..........................................336
Creating a template........................................................................337
Editing a template........................................................................... 339
Adding templates with Extension Manager....................................341
Setting a default template..............................................................342
Associating a document with a different template..........................343
Organizing templates......................................................................345

6

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Chapter 11
Using Mail Merge...................................................................348
What is mail merge?.......................................................................349
Creating the data source................................................................349
Registering a data source...............................................................350
Creating a form letter.....................................................................353
Printing mailing labels....................................................................358
Printing envelopes..........................................................................363
Using the Mail Merge Wizard to create a form letter.....................368
Chapter 12
Tables of Contents, Indexes, and Bibliographies...................380
Introduction.................................................................................... 381
Tables of contents...........................................................................381
Alphabetic indexes.......................................................................... 393
Other types of indexes....................................................................403
Bibliographies................................................................................. 405
Tools for working with bibliographies.............................................417
Chapter 13
Working with Master Documents...........................................418
Why use a master document?.........................................................419
Styles and master documents.........................................................419
Using the Navigator........................................................................ 420
Creating a master document...........................................................421
Recommended method for creating master documents..................423
Editing a master document.............................................................432
Cross-referencing between subdocuments.....................................433
Creating one file from a master document and its subdocuments. .437
Problem solving..............................................................................439
Chapter 14
Working with Fields...............................................................444
Introduction to fields......................................................................445
Quick and easy field entry..............................................................445

Free eBook Edition

Using document properties to hold information that changes........446
OpenOffice.org 3.x Writer Guide

7

Using other fields to hold information that changes.......................447
Using AutoText to insert often-used fields......................................449
Defining your own numbering sequences.......................................450
Using automatic cross-references...................................................452
Using fields in headers and footers.................................................456
Using fields instead of outline numbering for appendix numbering........................................................................................................ 458
Tricks for working with fields.........................................................459
Developing conditional content.......................................................460
Using placeholder fields.................................................................468
Using input fields and input lists....................................................469
Chapter 15
Using Forms in Writer............................................................473
Introduction to forms......................................................................474
When to use forms..........................................................................474
Creating a simple form...................................................................475
Form controls reference.................................................................478
Example: a simple form..................................................................484
Accessing data sources...................................................................490
Advanced form customization.........................................................497
XForms............................................................................................ 500
Chapter 16
Math Objects..........................................................................501
What is Math?.................................................................................502
Chapter 17
Customizing Writer................................................................503
Introduction.................................................................................... 504
Customizing menu content.............................................................504
Customizing toolbars......................................................................508
Assigning shortcut keys..................................................................512
Assigning macros to events.............................................................517
Adding functionality with extensions..............................................518

8Free eBook Edition

OpenOffice.org 3.x Writer Guide

Appendix A
Keyboard Shortcuts................................................................521
Introduction.................................................................................... 522
Function keys for Writer.................................................................523
Shortcut keys for Writer.................................................................524
Shortcut keys for tables in Writer...................................................526
Shortcut keys for paragraphs and heading levels...........................527
Shortcut keys for moving and resizing frames, graphics and objects........................................................................................................ 528
Index.........................................................................................529

Free eBook Edition

OpenOffice.org 3.x Writer Guide

91

ChapterIntroducing WriterFree eBook Edition

What is Writer?
Writer is the word processor component of OpenOffice.org (OOo). In
addition to the usual features of a word processor (spelling check,thesaurus, hyphenation, autocorrect, find and replace, automatic
generation of tables of contents and indexes, mail merge, and others),
Writer provides these important features:• Templates and styles• Page-layout methods, including frames, columns, and tables• Embedding or linking of graphics, spreadsheets, and other
•
•
•
•
•
•

objects
Built-in drawing tools
Master documents—to group a collection of documents into asingle document
Change tracking during revisions
Database integration, including a bibliography database
Export to PDF, including bookmarks
And many more

Styles are central to using Writer. Using styles, you can easily format
your document consistently and change the format with minimal effort.
A style is a named set of formatting options. Writer defines several
types of styles, for different types of elements: characters, paragraphs,
pages, frames, and lists. Often, you are using styles whether you
realize it or not. The use of styles is described in more detail in
Chapter 6 (Introduction to Styles) and Chapter 7 (Working with Styles).
The other features of Writer listed above are also covered in detail inother chapters of this guide.

Starting Writer
If you are reading this document in OpenOffice.org, you already know
how to start Writer. However, if this is a printed version or a PDF
version, you may not know how to start Writer. So let’s look at three
ways to do that:• From the system menu
• From an existing document• From the command line

Free eBook Edition

Chapter 1 Introducing Writer11

Starting from the system menu
The most common way to start Writer is by using the system menu,
the standard menu from which most applications are started. On
Windows, it is called the Start menu. On GNOME, it is called theApplications menu. On KDE, it is identified by the KDE logo. On Mac
OS X, it is the Applications menu.
When OpenOffice.org was installed on your computer, in most cases amenu entry for each component was added to your system menu. (Ifyou are using a Mac, see note below.) The exact name and location ofthese menu entries depends on the operating system and graphicalenvironment.

Note for Mac users
You should see the OpenOffice.org icon in the Applications folder.
When you double-click this icon, a text document opens in Writer. To
open the other components (Draw, Calc, Impress, Base), go to the Filemenu of the Writer window and select the component you want.
OOo does not automatically put a shortcut icon on the desktop, but you
can add one if you wish. If you don’t know how to add shortcut icons
for launching programs, please consult the help for your operating
system.

Starting from an existing document
All Writer documents are associated with the Writer application. Thismeans that you can start OpenOffice.org automatically, simply by
double-clicking a Writer document in a file manager such as Windows
Explorer.
You can spot an OpenOffice.org Writer document by its icon:.

Note for Windows users
If you have associated Microsoft Office file types with OOo, then when
you double-click on a *.doc (Word) file, it opens in OOo Writer.
If you did not associate the file types, then when you double-click on a
Microsoft Word document, it opens in Microsoft Word (if Word isinstalled on your computer).
You can use another method to open *.doc files in OOo and save in the*.doc format from OOo. See “Opening an existing document” on page
30 for more information.
12

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Using the Quickstarter under Windows
The Quickstarter is an icon that is placed in the Windows system tray
during system startup. It indicates that OpenOffice.org has been
loaded and is ready to use. (The Quickstarter loads library *.DLL files
required by OOo, thus shortening the startup time for OOo components
by about half.) If the Quickstarter is disabled, see “Reactivating the
Quickstarter” on page 14 if you want to enable it.

Using the Quickstarter icon
Right-click the Quickstarter icon in the system tray to open a pop-up
menu from which you can open a new document, open the Templates
and Documents dialog box, or choose an existing document to open.
You can also double-click the Quickstarter icon to display theTemplates and Documents dialog box.

Figure 1: Quickstarter pop-up menu

Disabling the Quickstarter
To close the Quickstarter, right-click on the icon in the system tray andthen click Exit Quickstarter on the pop-up menu. The next time thecomputer is restarted, the Quickstarter will be loaded again.
To prevent OpenOffice.org from loading during system startup,
deselect the Load OpenOffice.org During System Start-Up item on
the pop-up menu. You might want to do this if your computer has
insufficient memory, for example.

Free eBook Edition

Chapter 1 Introducing Writer

13

Reactivating the Quickstarter
If the Quickstarter has been disabled, you can reactivate it by selecting
the Load OpenOffice.org during system start-up option in Tools >Options > OpenOffice.org > Memory.

Using the Quickstarter under Linux
Some installations of OpenOffice.org under Linux have a Quickstarter
that looks and acts like the one described above for Windows (theoption on the Memory page is labeled Enable systray quickstarter).

Preloading OOo under Linux/KDE
In Linux/KDE, you can use KDocker to have OOo loaded and ready for
use at startup. KDocker is not part of OOo; it is a generic “systray app
docker” that is helpful if you open OOo often.

Starting from the command line
You may want to start Writer from the command line (using the
keyboard instead of the mouse). Why? Well, by using the command
line, you have more control over what happens when Writer is started.
For example, using the command line, you can tell Writer to load adocument and print it immediately, or to start without showing thesplash screen.
Note

Most users will never need to do this.

There is more than one way to start Writer from the command line,
depending on whether you have installed a customized version or the
standard download from the OOo web site.
If you installed using the download on the OOo web site, you can start
Writer by typing at the command line:
soffice -writerorswriter
Writer will start and create a new document.
To see a list of options you can use when starting Writer at thecommand line, type:soffice -?
Below is a list of some of the more popular options.
14Free eBook Edition

OpenOffice.org 3.x Writer Guide

OptionDescription-help

Get a complete list of options.

-nologo

Do not show the startup screen.

-show <odp-file>Start presentation immediately.

-view <documents ...>

Open documents in viewer (read-only) mode.

-minimized

Start OOo minimized.

-norestore

Suppress restart/restore after fatal errors.

-invisible

No startup screen, no default document andno UI. This is useful for third-party
applications that use functionality provided
by OOo.

If you have a customized version of OOo (such as the one provided by
Linux Mandrake or Gentoo), you can start Writer by typing at thecommand line:
oowriter
Note

Although the command syntax differs, the effect is identical: it
starts OOo with an empty Writer document.

The Writer interface
The main Writer workspace is shown in Figure 2.

Figure 2: The main Writer workspace in Print Layout view

Free eBook Edition

Chapter 1 Introducing Writer

15

MenusThe Menu bar is located across the top of the Writer window, justbelow the Title bar. When you choose one of the menus listed below, asubmenu drops down to show commands.
• File contains commands that apply to the entire document suchas Open..., Save, and Export as PDF....
• Edit contains commands for editing the document such as Undo:xxx (where xxx is the command to undo) and Find &Replace.... It also contains commands to cut, copy, and paste
selected parts of your document.
• View contains commands for controlling the display of the
document such as Zoom... and Web Layout.
• Insert contains commands for inserting elements into yourdocument such as headers, footers, and pictures.
• Format contains commands for formatting the layout of yourdocument, such as Styles and Formatting, Paragraph, andBullets and Numbering.
• Table shows all commands to insert and edit a table in a text
document.
• Tools contains functions such as Spelling and Grammar,
Customize..., and Options....
• Window contains commands for the display window.
• Help contains links to the OpenOffice.org Help file, What’s This?,and information about the program. See “Getting help” on page33.

Toolbars
Writer has several types of toolbars: docked, floating, and tear-off.
Docked toolbars can be moved to different locations or made to float,
and floating toolbars can be docked.
The top docked toolbar (default position) is called the Standard
toolbar. The Standard toolbar is consistent across the OpenOffice.org
applications (Writer, Calc, Draw, Impress, Base).
The second toolbar across the top (default location) is the Formatting
toolbar. It is a context-sensitive bar that shows the relevant tools in
response to the cursor’s current position or selection. For example,
when the cursor is on a graphic, the Formatting bar provides tools forformatting graphics; when the cursor is in text, the tools are forformatting text.
16

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Displaying or hiding toolbars
To display or hide toolbars, choose View > Toolbars, then click on thename of a toolbar in the list. An active toolbar shows a check markbeside its name. Tear-off toolbars are not listed in the View menu.

Submenus and tear-off toolbars
Toolbar icons with a small triangle to the right will display submenus,
tear-off toolbars, and other ways of selecting things, depending on theicon. Figure 3 shows a tear-off toolbar from the Drawing toolbar.
Tear-off toolbars can be floating or docked along an edge of the screen
or in one of the existing toolbar areas. To move a floating tear-off
toolbar, drag it by the title bar. See “Moving toolbars” below.
Click here and dragToolbar tears off and floats

Figure 3: Example of a tear-off toolbar

Moving toolbars
To move a docked toolbar, place the mouse pointer over the toolbar
handle, hold down the left mouse button, drag the toolbar to the newlocation, and then release the mouse button (Figure 4).
To move a floating toolbar, click on its title bar and drag it to a newlocation (Figure 5).

Free eBook Edition

Chapter 1 Introducing Writer

17

Figure 4: Moving a docked toolbar

Figure 5: Moving a floating toolbar

Floating toolbars
Writer includes several additional context-sensitive toolbars, whose
defaults appear as floating toolbars in response to the cursor’s current
position or selection. For example, when the cursor is in a table, afloating Table toolbar appears, and when the cursor is in a numberedor bullet list, the Bullets and Numbering toolbar appears. You can dockthese toolbars to the top, bottom, or side of the window, if you wish
(see “Moving toolbars” on page 17).

Docking/floating windows and toolbars
Toolbars and some windows, such as the Navigator and the Styles andFormatting window, are dockable. You can move, resize, or dock themto an edge.

18

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo dock a window, do one of thefollowing:• Click on the title bar of thefloating window and drag it to
the side until you see the outlineof a box appear in the main
window (see Figure 6) and thenrelease the window. This method
depends on your system’s
window manager settings, so it
may not work for you.
• Hold down the Control key anddouble-click on a vacant part of
the floating window to dock it in
its last position. If that does notwork, try double-clicking
without using the Control key.
To undock a window, hold down theControl key and double-click on avacant part of the docked window.
Note

Figure 6: Docking a window

The Styles and Formatting window can also be docked or
undocked by using Control+double-click on the gray area next to
the icons at the top of the window.

Customizing toolbars
You can customize toolbars in several ways, including choosing whichicons are visible and locking the position of a docked toolbar. You canalso add icons and create new toolbars, as described in Appendix B.
To access a toolbar’s customization options, use the down-arrow at theend of the toolbar or on its title bar (see Figure 7).

Figure 7: Customizing toolbars
To show or hide icons defined for the selected toolbar, choose Visible
Buttons from the drop-down menu. Visible icons have a checkmark
next to them. Click on icons to select or deselect them.

Free eBook Edition

Chapter 1 Introducing Writer

19

Right-click (context) menus
You can quickly access many menu functions by right-clicking on aparagraph, graphic, or other object. A context menu will pop up. Often
the context menu is the fastest and easiest way to reach a function. If
you’re not sure where in the menus or toolbars a function is located,
you can often find it by right-clicking.

RulersTo show or hide rulers, choose View > Ruler. To enable the verticalruler, choose Tools > Options > OpenOffice.org Writer > View andselect Vertical ruler.

Figure 8. Turning on the vertical ruler

Status bar
The Writer status bar provides information about the document andconvenient ways to quickly change some document features. From left
to right, the fields are as follows.

Figure 9: Left end of status bar
Page number
Shows the current page number, the sequence number of thecurrent page (if different), and the total number of pages in the
document. For example, if you restarted page numbering at 1 on thethird page, its page number is 1 and its sequence number is 3.
20

Free eBook Edition

OpenOffice.org 3.x Writer GuideIf any bookmarks have been defined in the document, a right-clickon this field pops up a list of bookmarks; click on the required one.
To jump to a specific page in the document, double-click on thisfield. The Navigator opens (see page 23). Click in the Page Number
field and type the sequence number of the required page. After abrief delay, the display jumps to the selected page.
Page styleShows the style of the current page. To change the page style, rightclick on this field. A list of page styles pops up; choose a different
style by clicking on it.
To edit the current page style, double-click on this field. The Page
Style dialog box opens.
LanguageShows the language for the selected text.
Click to open a menu where you can choose another language forthe selected text or for the paragraph where the cursor is located.
You can also choose None (Do not check spelling) to exclude thetext from a spelling check or choose More... to open the Character
dialog box.
Insert mode
Click to toggle between Insert and Overwrite modes when typing.
Selection mode
Click to toggle between STD (Standard), EXT (Extend), ADD (Add)and BLK (Block) selection. EXT is an alternative to Shift+click whenselecting text. See Chapter 3 (Working with Text) for more
information about ADD and BLK.
Unsaved changes
An asterisk (*) appears here if changes to the document have notbeen saved.

Figure 10: Right end of status bar

Free eBook Edition

Chapter 1 Introducing Writer21

Digital signature
If the document has been digitally signed, an icon
You can double-click the icon to view the certificate.

shows here.

Section or object information
When the cursor is on a section, heading, or list item, or when an
object (such as a picture or table) is selected, information about that
item appears in this field. Double-clicking in this area opens a
relevant dialog box.
ObjectPictureList item
Heading
Table
Section
Other

Information shown
Size and position
Level and list style
Outline numbering level
Name or number and cellreference of cursor
Name of section(Blank)Dialog box opened
Format Picture
Bullets and Numbering1
Bullets and Numbering1
Table Format
Edit Sections
Fields (Cross References page)

View layout
Click an icon to change between single page, side-by-side, and booklayout views (Figure 11). You can edit the document in any view.

Figure 11. View layouts: single, side-by-side, book
Zoom
To change the view magnification, drag the Zoom slider, or click on
the + and – signs, or right-click on the zoom level percent to pop up
a list of magnification values from which to choose. Zoom interacts

Free eBook Edition

1 If a list style was used with a list item or heading, no dialog box appears.

22

OpenOffice.org 3.x Writer Guide

with the selected view layout to determine how many pages arevisible in the document window.

Changing document views
Writer has several ways to view a document: Print Layout, Web Layout,
and Full Screen. To access these and other choices, go to the View
menu and click on the required view. (When in Full Screen view, press
the Esc key to return to either Print or Web Layout view.)
When in Print Layout, you can use both the Zoom slider and the View
Layout icons on the Status bar. In Web Layout, you can use the Zoom
slider.
You can also choose View > Zoom from the menu bar to display theZoom & View Layout dialog box (see Figure 12), where you can set thesame options as on the Status bar. In Web Layout view, most of the
choices are not available.

Figure 12. Choosing Zoom and View Layout options

Using the Navigator
In addition to the Page Number field on the Status bar (described on
page 20), Writer provides other ways to move quickly through adocument and find specific items by using the many features of theNavigator, the Navigation toolbar, and related icons.
The Navigator lists all of the headings, tables, text frames, graphics,
bookmarks, and other objects contained in a document.

Free eBook Edition

Chapter 1 Introducing Writer23

To open the Navigator, click its iconon the Standard toolbar, orpress F5, or choose View > Navigator on the menu bar, or doubleclick on the Page number field on the status bar. You can dock the
Navigator to either side of the main Writer window or leave it floating(see “Docking/floating windows and toolbars” on page 18).
To hide the list of categories and show only the icons at the top, click
the List Box On/Off icon
. Click this icon again to show the list.
Click the + sign by any of the lists to display the contents of the list.
Table 1 summarizes the functions of the icons at the top of theNavigator.
Note

The Navigator has different functions in a master document. See
Chapter 13 (Working with Master Documents).

Figure 13. The Navigator

24

Free eBook Edition

OpenOffice.org 3.x Writer GuideTable 1: Function of icons in the Navigator
Not active in ordinary documents. In a master document, switches
between the master document file and its subdocuments.
Opens the Navigation toolbar (see page 26).
Jumps to the previous or next item in the document. To select thecategory of items, see “Using the Navigation toolbar“ on page 26.
Jumps to the page number in the box. Type the page number or
select it using the up and down arrows.
Drag Mode. Select hyperlink, link, or copy. See “Choosing dragmode” on page 28 for details.
List Box On/Off. Shows or hides the list of categories.
Content View. Switches between showing all categories andshowing only the selected category.
Inserts a reminder (see page 27).
Jumps between the text area and the header or footer area (if thepage has them).
Jumps between a footnote anchor and the corresponding footnote
text.
Choose the number of heading levels to be shown.

Moving quickly through a document
The Navigator provides several convenient ways to move around a
document and find items in it:• To jump to a specific page in the document, type its sequencenumber in the box at the top of the Navigator.
• When a category is showing the list of objects in it, double-clickon an object to jump directly to that object’s location in the
document.
To see the content in only one category, highlight that category
and click the Content View icon. Click the icon again to display
all the categories. You can also change the number of headinglevels shown when viewing Headings.
• Use the Previous and Next icons to jump to other objects of thetype selected in the Navigation toolbar. (See below for details.)

Free eBook Edition

Chapter 1 Introducing Writer

25

Tip

Objects are much easier to find if you have given them names
when creating them, instead of keeping OOo’s default names ofgraphics1, graphics2, Table1, Table2, and so on—which may notcorrespond to the position of the object in the document.

Note

A hidden section (or other hidden object) in a document appears
gray in the Navigator, and displays the word “hidden” as atooltip.

Using the Navigation toolbar
To display the Navigation toolbar, click the Navigation icon
(second icon from the left at the top of the Navigator. Figure 13) or thesmall Navigation icon near the lower right-hand corner of the window
below the vertical scroll bar (Figure 14).

Figure 14: Previous, Navigation, and Next icons

Figure 15: Navigation toolbar
The Navigation toolbar (Figure 15) shows icons for all the object types
shown in the Navigator, plus some extras (for example, the results of a
Find command).
Click an icon to select that object type. Now all the Previous and Next
icons (in the Navigator itself, in the Navigation Toolbar, and on thescroll bar) will jump to the next object of the selected type. This isparticularly helpful for finding items like index entries, which can bedifficult to see in the text. The names of the icons (shown in thetooltips) change to match the selected category; for example, Next
Graphic or Next Bookmark.
26

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Rearranging chapters using the Navigator
You can arrange chapters and move headings in the document by using
the Navigator.
1) Click the Content View icon to expand the headings, if necessary.
2) (Optional) If you have several subheading levels, you can moreeasily find the headings you want, by changing the Heading
Levels Shown selection to show only 1 or 2 levels of headings.
3) Click on the heading of the block of text that you want to moveand drag the heading to a new location on the Navigator, or click
the heading in the Navigator list, and then click either the
Promote Chapter or Demote Chapter icon. All of the text andsubsections under the selected heading move with it.
To move only the selected heading and not the text associatedwith the heading, hold down Control, and then click the icon.
Tip

The tooltips (Promote Chapter and Demote Chapter) aremisleading; all headings defined in Tools > Outline
Numbering can be rearranged using this function.

4) To quickly change the outline level of a heading and its associatedsubheadings, select the heading in the Navigator, and then click
either the Promote Level or Demote Level icon. This action
does not change the location of the heading, only its level.
To increase the outline level of only the selected heading, but not
its associated subheadings, hold down Control, and then click the
icon.

Figure 16. Reorganizing with the Navigator
Note

Users of MS Office Word will note the similarity between thisfunctionality and Word's Outline View.

Setting reminders
One of the little known features of Writer which you may find quite
useful is the possibility of jumping between reminders. Reminders let
you mark places in your document that you want to return to later on,

Free eBook Edition

Chapter 1 Introducing Writer27

to add or correct information, make some other change, or simply
mark where you finished editing. The possible uses of reminders arelimited only by your imagination.
To set a reminder at the cursor's current location, click on theicon in the Navigator. You can set up to 5 reminders in a document(setting another causes the first to be deleted).
Reminders are not highlighted in any way in the document, so you
cannot see where they are, except when you jump from one to the next
—the location of the cursor then shows the location of the reminder.
To jump between reminders, first select the Reminder icon on the
Navigation toolbar. Then click the Previous and Next icons.

Choosing drag mode
Sets the drag and drop options for inserting items into a document
using the Navigator.
Insert As Hyperlink
Creates a hyperlink when you drag and drop an item into thecurrent document.
Insert As Link
Inserts the selected item as a link where you drag and drop in thecurrent document. Text is inserted as protected sections. However,you cannot create links for graphics, OLE objects, references, or
indexes using this method.
Insert As Copy
Inserts a copy of the selected item where you drag and drop in thecurrent document. You cannot drag and drop copies of graphics,
OLE objects, or indexes.

Starting a new document
Creating a blank document
You can create a new, blank document in Writer in several ways.
When OOo is open but no document is open (for example, if you close
all the open documents but leave the program running), a Welcome
screen is shown. Click one of the icons to open a new document of that28

Free eBook Edition

OpenOffice.org 3.x Writer Guide

type, or click the Templates icon to start a new document using atemplate.
You can also start a new document in one of the following ways. If a
document is already open in OOo, the new document opens in a new
window.
• Press the Control+N keys. A new empty document opens. If you
already have a document open, the new document appears in a
new window.
• Use File > New > Text Document. The result is the same aspressing the Control+N keys.
• Click the New button on the main toolbar.

Creating a document from a template
You can use templates to create new documents in Writer. Templates
serve as the foundation of a set of documents, to make sure they all
have a similar layout. For example, all the documents of the Writer
Guide are based on the same template. As a result, all the documents
look alike; they have the same headers and footers, use the same fonts,
and so on.
A new OpenOffice.org installation does not contain many templates. It
is possible for you to add new templates to your installation and use
them for new documents. This is explained in Chapter 10 (Working
with Templates). Many more templates can be downloaded fromhttp://extensions.services.openoffice.org/ and other websites.
Once you do have templates on your system, you can create new
documents based on them by using File > New > Templates andDocuments. This opens a window where you can choose the template
you want to use for your document.
The example shown in Figure 17 uses a template called “Book” in the
My Templates folder. Select it, then click the Open button. A new
document is created based on the formats defined in the template.

Free eBook Edition

Chapter 1 Introducing Writer29

Figure 17. Creating a document from a template

Opening an existing document
When no document is open, the Welcome screen provides an icon for
opening an existing document.
You can also open an existing document in one of the following ways. If
a document is already open in OOo, the second document opens in a
new window.
• Click File > Open....
• Click the Open button on the main toolbar.
• Press Control+O on the keyboard.
In each case, the Open dialog box appears. Select the file you want,
and then click Open.
In the Open dialog box, you can reduce the list of files by selecting thetype of file you are looking for. For example, if you choose Text
documents as the file type, you will only see documents Writer can
open (including *.odt, *.doc, *.txt). This method opens Word (*.doc)
files, as well as OOo files and other formats.

30

Free eBook Edition

OpenOffice.org 3.x Writer Guide

You can also open an existing OOo Writer document using the same
methods you would use to open any document in your operating
system.
If you have associated Microsoft Office file formats with
OpenOffice.org, you can also open these files by double-clicking on
them.

Saving a document
To save a new document in Writer, do one of the following:• Press Control+S.
• Select File > Save.
• Click the Save button on the main toolbar.
When the Save As dialog box appears, enter the file name and verify
the file type (if applicable).
To save an open document with the current file name, choose File >Save. This will overwrite the last saved state of the file.

Password protection
To protect an entire document from being viewable without apassword, use the option on the Save As dialog box to enter apassword. This option is only available for files saved in
OpenDocument formats or the older OpenOffice.org 1.x formats.
1) On the Save As dialog box, select the Save with password
option, and then click Save. You will receive a prompt:

Free eBook Edition

Chapter 1 Introducing Writer31

2) Type the same password in the two fields, and then click OK. If
the passwords match, the document is saved password protected.
If the passwords do not match, you receive the prompt to enter
the password again.
Note

Passwords must contain a minimum of 5 characters. Until you
have entered 5 characters, the OK button remains inactive.

OOo uses a very strong encryption mechanism that makes it almost
impossible to recover the contents of a document in case you lose thepassword.

Saving a document automatically
You can choose to have Writer save your document automatically at
regular intervals. Automatic saving, like manual saving, overwrites thelast saved state of the file. To set up automatic file saving:1) Select Tools > Options > Load/Save > General.
2) Click on Save AutoRecovery information every and set thetime interval. The default value is 15 minutes. Enter the value youwant by typing it or by pressing the up or down arrow keys.

Saving as a Microsoft Word document
If you need to exchange files with users of Microsoft Word, they may
not know how to open and save .odt files. Microsoft Word 2007 with
Service Pack 2 (SP2) can do this. Users of Word 2007, 2003, XP, and2000 can also download and install a free OpenDocument Format(ODF) plugin from Sun Microsystems.
Some users of Microsoft Word may be unwilling or unable to receive*.odt files. (Perhaps their employer won’t allow them to install theplug-in.) In this case, you can save a document as a Microsoft Word
file.
1) Important—First save your document in the file format used by
OOo Writer, *.odt. If you do not, any changes you made since thelast time you saved will only appear in the Microsoft Word versionof the document.
2) Then click File > Save As.
3) On the Save As dialog box (Figure 18), in the File type (or Saveas type) drop-down menu, select the type of Word format youneed.
4) Click Save.
32

Free eBook Edition

OpenOffice.org 3.x Writer Guide

From this point on, all changes you make to the document will occur
only in the Microsoft Word document. You have changed the name andfile type of your document. If you want to go back to working with the*.odt version of your document, you must open it again.

Tip

To have Writer save documents by default in the Microsoft Word
file format, go to Tools > Options > Load/Save > General. In
the section named Default file format, under Document type,select Text document, then under Always save as, select yourpreferred file format.

Figure 18. Saving a file in Microsoft Word format

Getting help
Writer provides several forms of help. In addition to a full Help file
(reached by pressing F1 or choosing Help > OpenOffice.org Helpfrom the menu bar), you can choose whether to activate tooltips,
extended tips, and the Help Agent from Tools > Options >OpenOffice.org > General.
Placing the mouse pointer over any of the icons displays a small box,
called a tooltip. It gives a brief explanation of the icon’s function. For a
more detailed explanation, select Help > What’s This? and hold themouse pointer over the icon you need more help with.

Free eBook Edition

Chapter 1 Introducing Writer33

Undoing and redoing changes
When a document is open, you can undo the most recent change bypressing Control+Z, or clicking the Undo iconon the Standard
toolbar, or choosing Edit > Undo from the menu bar.
The Edit menu shows the latest change that can be undone, as shownin Figure 19.

Figure 19: Edit > Undo last action
Click the small triangle to the right of the Undo icon to get a list of all
the changes that can be undone (Figure 20). You can select multiplechanges and undo them at the same time.

Figure 20: List of actions that can be undone
After changes have been undone, Redo becomes active. To redo achange, select Edit > Redo, or press Control+Y or click on the Redo
. As with Undo, click on the triangle to the right of the arrow to
icon
get a list of the changes that can be reapplied.

Closing a document
To close a document, click File > Close.
You can also close a document by clicking on the Close icon on the
document window. In Windows XP, this button looks like the X in the
red box shown in Figure 21.

34

Free eBook Edition

OpenOffice.org 3.x Writer GuideIf more than one OOo window is open, each window looks like thesample shown on the left in Figure 21. Closing this window leaves theother OOo windows open.
If only one OOo window is open, it looks like the sample shown on theright in Figure 21. Notice the small black X below the larger X in the
red box. Clicking the small black X closes the document but leaves
OOo open. Clicking the larger X closes OOo completely.

Figure 21. Close icons
If the document has not been saved since the last change, a message
box is displayed. Choose whether to save or discard your changes.
• Save: The document is saved and then closed.
• Discard: The document is closed, and all modifications since thelast save are lost.
• Cancel: Nothing happens, and you return to the document.
CautionNot saving your document could result in the loss of recently
made changes, or worse still, your entire file.

Closing Writer
To close Writer completely, click File > Exit, or close the last open
document as described in “Closing a document” on page 34.
If all the documents have been saved, Writer closes immediately. If any
documents have been modified but not saved, a warning message
appears. Follow the procedure in “Closing a document” to save or
discard your changes.

Free eBook Edition

Chapter 1 Introducing Writer

35

2

Chapter
Setting up Writer
Choosing options to suit the way you work

Free eBook Edition

Choosing options that affect all of OOo
This section covers some of the settings that apply to all thecomponents of OOo and are particularly important when using Writer.
Other general options are discussed in Chapter 2 (Setting Up
OpenOffice.org) in the Getting Started guide.
Click Tools > Options. The list on the left-hand side of the Options –OpenOffice.org dialog box varies depending on which component of
OOo is open. The illustrations in this chapter show the list as it appears
when a Writer document is open.
Click the + sign by OpenOffice.org on the left-hand side. A list of pages
drops down. Selecting an item in the list causes the right-hand side ofthe dialog box to display the relevant page.

Figure 22: OpenOffice.org options

Note

The Back button has the same effect on all pages of the
Options dialog box. It resets options to the values that were inplace when you opened OOo.

User Data options
Because Writer uses the name or initials stored in the OpenOffice.org –User Data page for several things, including document properties(created by and last edited by information) and the name of the authorof notes and changes, you will want to ensure that the correct
information appears here.
Fill in the form (shown in Figure 23) or amend or delete any existing
incorrect information.

Free eBook Edition

Chapter 2 Setting up Writer37

Figure 23: Filling in user data

General options
The options on the OpenOffice.org – General page are described below.

Figure 24: Setting general options for OpenOffice.org
Help - Tips
When Tips is active, one or two words will appear when you hold themouse pointer over an icon or field, without clicking.
Help - Extended tips
When Extended tips is active, a brief description of the function of aparticular icon or menu command or a field on a dialog box appears
when you hold the mouse pointer over that item.

38

Free eBook Edition

OpenOffice.org 3.x Writer GuideHelp Agent
To turn off the Help Agent (similar to Microsoft’s Office Assistant),deselect this option. To restore the default behavior, click Reset
Help Agent.
Help formattingHigh contrast is an operating system setting that changes thesystem color scheme to improve readability. To display Help in highcontrast (if your computer’s operating system supports this), choose
one of the high-contrast style sheets from the pull-down list.
High-contrast style

Visual effectDefault

Black text on white background

High Contrast #1

Yellow text on black background

High Contrast #2

Green text on black background

High Contrast BlackWhite text on black background

High Contrast WhiteBlack text on white background

Open/Save dialogs
To use the standard Open and Save dialog boxes for your operating
system, deselect the Use OpenOffice.org dialogs option. When
this option is selected, the Open and Save dialog boxes supplied with
OpenOffice.org will be used. This book uses the OOo Open and Savedialog boxes in illustrations.
Document status
If this option is selected, then the next time you close the document
after printing, the print date is recorded in the document properties
as a change and you will be prompted to save the document again,even if you did not make any other changes.
Year (two digits)
Specifies how two-digit years are interpreted. For example, if thetwo-digit year is set to 1930, and you enter a date of 1/1/30 or later
into your document, the date is interpreted as 1/1/1930 or later. An“earlier” date is interpreted as being in the following century; thatis, 1/1/20 is interpreted as 1/1/2020.

Free eBook Edition

Chapter 2 Setting up Writer

39

Memory options
In the Options dialog, click OpenOffice.org > Memory. Someconsiderations:• More memory can make OpenOffice.org faster and moreconvenient (for example, more undo steps require more memory);
but the trade-off is less memory available for other applications
and you could run out of memory altogether.
• If your documents contain a lot of objects such as images, or theobjects are large, OOo’s performance may improve if you increase
the memory for OOo or the memory per object. If you find that
objects seem to disappear from a document that contains a lot ofthem, increase the number of objects in the cache. (The objects
are still in the file even if you cannot see them on screen.)• To load the Quickstarter (an icon on the desktop or in the systemtray) when you start your computer, select the option near thebottom of the dialog. This makes OpenOffice.org start faster; thetrade-off is OOo uses some memory even when not being used.
This option (sometimes called Enable systray quickstarter) is
not available on all operating systems.

Figure 25: Choosing Memory options for the OpenOffice.org
applications

View options
The options on the OpenOffice.org – View page (Figure 26) affect theway the document window looks and behaves. Some of these options
are described below. Set them to suit your personal preferences.

40

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 26: Choosing View options for OpenOffice.org applications
User Interface – Scaling
If the text in the help files or on the menus of the OOo user interface
is too small or too large, you can change it by specifying a scaling
factor. Sometimes a change here can have unexpected results,
depending on the screen fonts available on your system. However, it
does not affect the font size of the text in your documents.
User Interface – Icon size and style
The first box specifies the display size of toolbar icons (Automatic,
Small, or Large); the Automatic icon size option uses the setting
for your operating system. The second box specifies the icon style(theme); here the Automatic option uses an icon set compatible
with your operating system and choice of desktop: for example, KDE
or Gnome on Linux.
User Interface – Use system font for user interface
If you prefer to use the system font (the default font for yourcomputer and operating system) instead of the font provided by OOo
for the user interface, select this option.
User interface – Screen font antialiasing(Not available in Windows; not shown in Figure 26.) Smooths thescreen appearance of text. Enter the smallest font size to apply
antialiasing.
Menu – Show icons in menus
Causes icons as well as words to be visible in menus.

Free eBook Edition

Chapter 2 Setting up Writer

41

Font Lists - Show preview of fonts
Causes the font list to look like Figure 27, Left, with the font names
shown as an example of the font; with the option deselected, the fontlist shows only the font names, not their formatting (Figure 27,
Right). The fonts you will see listed are those that are installed onyour system.

Figure 27: Font list (Left) showing preview; (Right) without preview
Font Lists - Show font history
Causes the last five fonts you have assigned to the current document
are displayed at the top of the font list.
Graphics output – Use hardware acceleration
Directly accesses hardware features of the graphical display adapter
to improve the screen display. Not supported on all operating
systems and OOo distributions.
Graphics output – Use anti-aliasing
Enables and disables anti-aliasing, which makes the display of mostgraphical objects look smoother and with fewer artifacts. Not
supported on all operating systems and OOo distributions.
Tip

Press Shift+Control+R to restore or refresh the view of thecurrent document.

Mouse positioning
Specifies if and how the mouse pointer will be positioned in newly
opened dialog boxes.
Middle mouse button
Defines the function of the middle mouse button.
• Automatic scrolling – dragging while pressing the middle
mouse button shifts the view.
• Paste clipboard – pressing the middle mouse button inserts thecontents of the “Selection clipboard” at the cursor position.
The “Selection clipboard” is independent of the normal clipboardthat you use by Edit > Copy/Cut/Paste or their respective
42

Free eBook Edition

OpenOffice.org 3.x Writer Guidekeyboard shortcuts. Clipboard and “Selection clipboard” can containdifferent contents at the same time.
Function

Clipboard

Selection clipboard

Copy content

Edit > Copy
Control+C

Select text, table, or object.

Paste content

Edit > Paste
Control+V pastes atthe cursor position.

Clicking the middle mousebutton pastes at the mousepointer position.

Pasting intoanother document

No effect on the
clipboard contents.

The last marked selection isthe content of the selection
clipboard.

Print options
On the OpenOffice.org – Print page, set the print options to suit yourdefault printer and your most common printing method.

Figure 28. Choosing general printing options to apply to
all OOo components
In the Printer warnings section near the bottom of the page, you canchoose whether to be warned if the paper size or orientation specified
in your document does not match the paper size or orientation
available for your printer. Having these warnings turned on can bequite helpful, particularly if you work with documents produced bypeople in other countries where the standard paper size is different
from yours.

Free eBook Edition

Chapter 2 Setting up Writer

43

Tip

If your printouts are incorrectly placed on the page or chopped
off at the top, bottom, or sides or the printer is refusing toprint, the most likely cause is page-size incompatibility.

Path options
On the OpenOffice.org – Paths page, you can change the location offiles associated with, or used by, OOo to suit your working situation. In
a Windows system, for example, you might want to store documents bydefault somewhere other than My Documents.
To make changes, select an item in the list shown in Figure 29 andclick Edit. On the Select Paths dialog (not shown), add or delete
folders as required, and then click OK to return to the Options dialog.
Note that many items can have at least two paths listed: one to ashared folder (which might be on a network) and one to a user-specificfolder (normally on the user’s personal computer).
Tip

You can use the entries in the OpenOffice.org – Paths dialog tocompile a list of files, such as those containing AutoText, thatyou need to back up or copy to another computer.

Figure 29: Viewing the paths of files used by OOo

44

Free eBook Edition

OpenOffice.org 3.x Writer Guide

0Color options
On the OpenOffice.org – Colors page, you can specify colors to use in
OOo documents. You can select a color from a color table, edit anexisting color, or define new colors. These colors will then be available
in color selection palettes in OOo.

Figure 30: Defining colors to use in color palettes in OOo
To modify a color:
1) Select the color to modify from the list or the color table.
2) Enter the new values that define the color. If necessary, change
the settings from RGB (Red, Green, Blue) to CMYK (Cyan,
Magenta, Yellow, Black) or vice versa. The changed color appears
in the lower of the two color preview boxes at the top.
3) Modify the Name as required.
4) Click the Modify button. The newly defined color is now listed in
the Color table.
Alternatively, click the Edit button to open the Color dialog, shown in
Figure 31. Here you can select a color from one of the color windows
in the upper area, or you can enter values in the lower area using yourchoice of RGB, CMYK, or HSB (Hue, Saturation and Brightness) values.
The upper right color window is linked directly with the color input
fields in the lower area; as you choose a color in the upper window, thenumbers change accordingly. The two color fields at the lower rightshow the value of the selected color on the left and the currently set
value from the color value fields on the right.

Free eBook Edition

Chapter 2 Setting up Writer

45

Modify the color components as required and click OK to exit the
dialog. The newly defined color now appears in the lower of the color
preview boxes shown in Figure 30. Type a name for this color in theName box, then click the Add button. A small box showing the newcolor is added to the Color table.

Figure 31: Editing colors
Another way to define or alter colors is through the Colors page of the
Area dialog, where you can also save and load palettes, a feature thatis not possible here. In Writer, draw a temporary draw object and use
the context menu of this object to open the Area dialog.

Font options
You can define replacements for any fonts that might appear in yourdocuments. If you receive from someone else a document containing
fonts that you do not have on your system, OOo will substitute fonts for
those it does not find. You might prefer to specify a different font fromthe one the program chooses.
On the OpenOffice.org – Fonts page (Figure 32):
1) Select Apply Replacement Table option.
2) Select or type the name of the font to be replaced in the Font box.
(If you do not have this font on your system, it will not appear in
the drop-down list in this box, so you need to type it in.)46

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) In the Replace With box, select a suitable font from the dropdown list of fonts installed on your computer.
4) The check mark to the right of the Replace with box turns green.
Click on this check mark. A row of information now appears in thelarger box below the input boxes. Select the boxes under Always
and Screen.
5) In the bottom section of the page, you can change the typeface
and size of the font used to display source code such as HTMLand Basic (in macros).

Figure 32: Defining a font to be substituted for another fontSecurity options
Use the OpenOffice.org – Security page (Figure 33) to choose security
options for saving documents and for opening documents that containmacros.
Security Options and warnings
If you record changes, save multiple versions, or include hidden
information or notes in your documents, and you do not want someof the recipients to see that information, you can set warnings toremind you to remove it, or you can have OOo remove some of it
automatically. Note that (unless removed) much of this informationis retained in a file whether the file is in OpenOffice.org’s default
OpenDocument format, or has been saved to other formats,including PDF.

Free eBook Edition

Chapter 2 Setting up Writer

47

Figure 33: Choosing security options for opening andsaving documents
Click the Options button to open a separate dialog with specificchoices (Figure 34).
Remove personal information on saving. Select this option toalways remove user data from the file properties when saving thefile. To manually remove personal information from specificdocuments, deselect this option and then use the Delete button
under File > Properties > General.

Figure 34: Security options and warnings dialog box

48

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Ctrl-click required to follow hyperlinks. In older versions of
OOo, clicking on a hyperlink in a document opened the linked
document. Now you can choose whether to keep this behavior (byunchecking this box). Many people find creation and editing of
documents easier when accidental clicks on links do not activate thelinks.
The other options on this dialog should be self-explanatory.
Macro security
Click the Macro Security button to open the Macro Security dialog,
where you can adjust the security level for executing macros andspecify trusted sources.
File sharing options for this document
Select the Open this document in read-only mode option to
restrict this document to be opened in read-only mode only. This
option protects the document against accidental changes. It is still
possible to edit a copy of the document and save that copy with thesame name as the original.
Select the Record changes option to enable recording changes.
This is the same as Edit > Changes > Record. To allow other usersof this document to apply changes, but prevent them from disablingchange recording, click the Protect button and enter a password.

Appearance options
Writing, editing, and (especially) page layout are often easier when you
can see the page margins (text boundaries), the boundaries of tables
and sections, grid lines, and other features. In addition, you might
prefer to use colors that are different from OOo’s defaults for suchitems as note indicators or field shadings.
On the OpenOffice.org – Appearance page (Figure 35), you can specify
which items are visible and the colors used to display various items.
• To show or hide items such as text boundaries, select or deselectthem.
• To change the default colors for items, click the down-arrow in
the Color setting column by the name of the item and select acolor from the pop-up box.
• To save your color changes as a color scheme, type a name in the
Scheme box and click Save.

Free eBook Edition

Chapter 2 Setting up Writer

49

Figure 35: Showing or hiding text, object, and tableboundaries

Choosing options for loading and saving
documents
You can set the Load/Save options to suit the way you work.
If the Options dialog is not already open, click Tools > Options. Clickthe + sign to the left of Load/Save.

Figure 36: Load/Save options

General Load/Save options
Most of the choices on the Load/Save – General page (Figure 37) are
familiar to users of other office suites. Some items of interest aredescribed below.

50

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 37: Choosing Load and Save options
Load user-specific settings with the document
When you save a document, certain settings are saved with it. Somesettings (printer name, data source linked to the document) arealways loaded with a document, whether or not this option is
selected. If you select this option, these document settings areoverruled by the user-specific settings of the person who opens it. If
you deselect this option, the user’s personal settings do not overrule
the settings in the document. For example, your choice (in theoptions for OOo Writer) of how to update links is affected by the
Load user-specific settings option.
Load printer settings with the document
If this option is not selected, the printer settings that are storedwith the document are ignored when you print it using the Print
File Directly icon. The default printer in your system is usedinstead.
Edit document properties before saving
If this option is selected, the Document Properties dialog pops up to
prompt you to enter relevant information the first time you save a
new document (or whenever you use Save As).
Save AutoRecovery information every __ Minutes
Choose whether to enable AutoRecovery and how often to save theinformation used by the AutoRecovery process.
AutoRecovery in OpenOffice.org overwrites the original file. If you
also choose Always create backup copy, the original file thenoverwrites the backup copy. If you have this option set, recovering

Free eBook Edition

Chapter 2 Setting up Writer51

your document after a system crash will be easier; but recovering an
earlier version of the document may be harder.
Save URLs relative to file system / internet
Relative addressing to a file system is only possible if the source
document and the referenced document are both on the same drive.
A relative address always starts from the directory in which thecurrent document is located. It is recommended to save relatively if
you want to create a directory structure on an Internet server.
Default file format and ODF settings
ODF format version. OpenOffice.org by default saves documents inOpen Document Format (ODF) version 1.2. While this allows for
improved functionality, there may be backwards compatibility
issues. When a file saved in ODF 1.2 is opened in an earlier version
of OpenOffice.org (using ODF 1.0/1.1), some of the advanced
features may be lost. Two notable examples are cross-references toheadings and the formatting of numbered lists. If you plan to share
documents with people who are still using older versions of
OpenOffice.org, save the document using ODF version 1.0/1.1.
Size optimization for ODF format. OpenOffice.org documents are
XML files. When you select this option, OOo writes the XML data
without indents and line breaks. If you want to be able to read the
XML files in a text editor in a structured form, deselect this option.
Document type. If you routinely share documents with users ofMicrosoft Word, you might want to change the Always save as
attribute for text documents to one of the Word formats.
Note

Although Writer can open files in the .docx format produced by
Word 2007, it cannot save in .docx format. This capability isplanned for a future release.

VBA Properties Load/Save options
On the Load/Save – VBA Properties page (Figure 38), you can choose
whether to keep any macros in Microsoft Office documents that are
opened in OpenOffice.org. These macros are disabled in OOo.
If you choose Load Basic code, you can edit the macros in OOo. Thechanged code is saved in an OOo document but is not retained if you
save into a Microsoft Office format.
If you choose Save original Basic code, the macros are retained
unchanged if you save the file into Microsoft Office format.

52

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Save original Basic code takes precedence over Load Basic code. Ifboth options are seleted and you edit the disabled code in OOo, theoriginal Microsoft Basic code will be saved when saving in a Microsoft
Office format.
To remove any possible macro viruses from the Microsoft Office
document, deselect Save original Basic code. The document will besaved without the Microsoft Basic code.

Figure 38: Choosing
Load/Save VBA Properties

Microsoft Office Load/Save options
On the Load/Save – Microsoft Office page (Figure 39), you can choose
what to do when importing and exporting Microsoft Office OLE objects(linked or embedded objects or documents such as spreadsheets orequations).
Select the [L] check boxes to convert Microsoft OLE objects into thecorresponding OpenOffice.org OLE objects when a Microsoft document
is loaded into OOo (mnemonic: “L” for “load”).
Select the [S] check boxes to convert OpenOffice.org OLE objects into
the corresponding Microsoft OLE objects when a document is saved ina Microsoft format (mnemonic: “S” for “save”).

Figure 39: Choosing Load/Save Microsoft Office options

Free eBook Edition

Chapter 2 Setting up Writer

53

HTML compatibility Load/Save options
Choices made on the Load/Save – HTML Compatibility page affectHTML pages imported into OpenOffice.org and those exported from
OOo. See HTML documents; importing/exporting in the Help for more
information.

Figure 40: Choosing HTML compatibility options
Font sizes
Use these fields to define the respective font sizes for the HTML
<font size=1> to <font size=7> tags, if they are used in the HTMLpages. (Many pages no longer use these tags.)
Import - Use 'English (USA)' locale for numbers
When importing numbers from an HTML page, the decimal andthousands separator characters differ according to the locale of theHTML page. The clipboard, however, contains no information about
the locale. If this option is not selected, numbers will be interpreted
according to the Language - Locale setting in Tools > Options >Language Settings > Languages (see page 66). If this option is
selected, numbers will be interpreted as for the English (USA)locale.
Import - Import unknown HTML tags as fields
Select this option if you want tags that are not recognized by OOo to
be imported as fields. For an opening tag, an HTML_ON field will becreated with the value of the tag name. For a closing tag, an
HTML_OFF will be created. These fields will be converted to tags inthe HTML export.

54

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Import - Ignore font settings
Select this option to have OOo ignore all font settings whenimporting. The fonts that were defined in the HTML Page Style will
be used.
ExportTo optimize the HTML export, select a browser or HTML standard
from the Export box. If OpenOffice.org Writer is selected, specific
OpenOffice.org Writer instructions are exported.
Export - OpenOffice.org Basic
Select this option to include OOo Basic macros (scripts) whenexporting to HTML format. You must activate this option before you
create the OpenOffice.org Basic macro; otherwise the script will not
be inserted. OpenOffice.org Basic macros must be located in theheader of the HTML document. Once you have created the macro in
the OpenOffice.org Basic IDE, it appears in the source text of theHTML document in the header.
If you want the macro to run automatically when the HTML
document is opened, choose Tools > Customize > Events. See
Chapter 13 (Getting Started with Macros) in the Getting Started
guide for more information.
Export - Display warning
When the OpenOffice.org Basic option (see above) is not selected,
the Display warning option becomes available. If the Display
warning option is selected, then when exporting to HTML awarning is shown that OpenOffice.org Basic macros will be lost.
Export - Print layout
Select this option to export the print layout of the current document
as well.
The HTML filter supports CSS2 (Cascading Style Sheets Level 2) for
printing documents. These capabilities are only effective if printlayout export is activated.
Export - Copy local graphics to Internet
Select this option to automatically upload the embedded pictures tothe Internet server when uploading using FTP.
Export - Character set
Select the appropriate character set for the export.

Free eBook Edition

Chapter 2 Setting up Writer55

Choosing options for Writer
Settings chosen on the pages in the OpenOffice.org Writer section of
the Options dialog box determine how your Writer documents look andbehave while you are working on them.
If the Options dialog box is not already open, click Tools > Options.
Click the + sign by OpenOffice.org Writer on the left-hand side of the
Options – OpenOffice.org dialog box. A list of pages drops down.

Figure 41: OpenOffice.org Writer options

General options
The choices on the OpenOffice.org Writer – General page affect the
updating of links and fields, the units used for rulers and othermeasurements, and the default tab stop positions.

Figure 42: Choosing general options for WriterUpdate links when loading
Depending on your work patterns, you may not want links to be
updated when you load a document. For example, if your file links toother files on a network, you won’t want those links to update when
you are not connected to the network.
56

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Update fields and charts automatically
You may not want fields or charts to update automatically when you
are working, because that slows down performance.
Settings – Tab stops
The Tab stops setting specifies the distance the cursor travels foreach press of the Tab key. This setting is also used for the indent
distance applied by the Increase Indent and Decrease Indent
buttons on the Formatting Bar, which affect the indentation ofentire paragraphs.
Using the default tab stops to space out or indent material on a pageis not recommended. If you use the default tab interval and thensend the document to someone who uses a different default tab
interval, then your tabbed material will be displayed using the otherperson’s default tab settings. In addition, any changes to the default
tab stops will change the existing default tab stops in any document
you open afterward, as well as tab stops you insert after making thechange.
To avoid these unwanted changes, define your own tabs inparagraph styles or individual paragraphs (see “Defining your own
tab stops and indents” in Chapter 3).

View options
Two pages of options set the defaults for viewing Writer documents:
View (described here) and Formatting Aids (described below).
If the items on the OpenOffice.org Writer - View page are not selfexplanatory, you can easily test their effects in a blank document.
This is a good page to check if, for example, you cannot see graphics
on the screen or you see field codes instead of the text or numbers you
are expecting.

Free eBook Edition

Figure 43: Choosing View options for Writer
Chapter 2 Setting up Writer57

Formatting Aids options
The display of symbols such as paragraph ends and tabs help you whenwriting, editing, and doing page layout. For example, you might wantto know if any blank paragraphs or tabs are included or if any tables orgraphics are too wide and intrude into the margins of the page.
On the OpenOffice.org Writer – Formatting Aids page, select therequired options.

Figure 44: Choosing Formatting Aids options

Note

Direct cursor lets you enter text, images, tables, frames, andother objects in any blank area in your document. Writer inserts
blank paragraphs and tabs to position the text or objects.
This feature is incompatible with rigorous use of styles and canlead to many formatting oddities, so it should be avoided byprofessional writers.

Grid options
Specifying “snap to grid” can be very helpful when you are trying toalign several objects such as graphics or tables.
On the OpenOffice.org Writer – Grid page, you can choose whether toenable this feature and what grid intervals to use. If the grid intervals(subdivisions) are too large, you may find that you do not have enoughcontrol in placing the objects.

58Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 45: Choosing Grid options

Default fonts
The default fonts specified on the OpenOffice.org Writer – Basic Fonts(Western) page apply to both Writer documents and HTML (Web)documents.

Figure 46: Choosing default fonts• If you want to change the defaults, do so on this page. You can, ofcourse, choose other fonts for use in specific documents, either byapplying direct formatting or by defining and applying styles inthose documents.
• When choosing fonts on this page you are not limited to single
fonts or to the ones shown in the drop-down list. You can specify a“font family”as a comma-separated set of fonts that includes those
suitable for Windows, Macintosh, Linux, and other operating
systems. These choices are particularly important in HTML
documents.
• If the document is viewed on a system that does not have the first
font specified, it will use one of the other fonts if that one isFree eBook Edition

Chapter 2 Setting up Writer59

available. Otherwise, it will substitute a font that is available on
the system.
• Type the list of fonts, separated by commas, in the boxes. If you
want these defaults to apply to the current document only, selectthat option. The Default button resets the values on this page tothe defaults installed with OpenOffice.org.

Print options
On the OpenOffice.org Writer – Print page (Figure 47), you can choose
which items are printed with the document by default. These options
are in addition to those on the OpenOffice.org – Print page (Figure 28).

Figure 47: Choosing Print options for Writer
Some considerations:• When you are working on drafts and you want to save printer ink
or toner, you might want to deselect some of the items in theContents section.
• The Print black selection causes color text (but not graphics) toprint as black on a color printer; on a black-and-white printer, thisoption causes color text to print as solid black instead of shadesof grey (dithered).
• The Print black option has a different effect to the Convert
colors to greyscale on the Options – OpenOffice.org – Print page
(Figure 23), which prints all graphics as greyscale on color
printers. (On black-and-white printers, color in graphics normallyprints as greyscale.)
60

Free eBook Edition

OpenOffice.org 3.x Writer Guide• If you are printing double-sided on a non-duplexing printer, you

might choose to print only left or right pages, then turn the stackover and print the other pages.
• Depending on how your printer ejects pages (face up or facedown), you might need to print the pages in reverse order so they
stack in the correct order as they are printed.

Tip

You can override any of these defaults when printing a
document. Click File > Print, then click the Options buttonon the Print dialog box. The Printer Options dialog box thatappears is similar to the one shown in Figure 47.

Default table options
On the OpenOffice.org Writer – Table page, you can specify the default
behavior of tables.

Figure 48: Choosing default Table options
Some considerations:• If most of your tables will require borders or headings, selectthose options. If most of your tables are used for page layout,deselect borders and headings.
• Number recognition can be very useful if most of your tables
contain numerical data; Writer will recognize dates or currency,
for example, and format the numbers appropriately. However, if
you want the numbers to remain as ordinary text, this feature canbe quite irritating, so you will want to deselect it.

Free eBook Edition

Chapter 2 Setting up Writer61• The Keyboard handling section specifies the distances that cells

move when you use keyboard shortcuts to move them and the sizeof rows and columns inserted using keyboard shortcuts.
• The choices in the Behavior of rows/columns section determine
the effects that changes to rows or columns have on adjacentrows or columns and the entire table. You might need to test
these selections to fully understand the effects.

Change tracking options
If you plan to use the change-tracking feature of Writer, use the
OpenOffice.org Writer – Changes page to choose the way inserted anddeleted material is marked, whether and how attribute changes aremarked, and whether and how change bars are marked in the margins.

Figure 49: Choosing options for tracking changes

Compatibility options
Do you need to import Microsoft Word documents into OOo Writer? If
so, you might want to select some or all of the settings on the
OpenOffice.org Writer – Compatibility page. If you are not sure about
the effects of these settings, leave them as the defaults provided by
OOo. For information about the settings not described below, see the
Help.

62

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 50: Choosing compatibility options
Use printer metrics for document formatting
If this option is selected, the printer specified for the document
determines how the document is formatted for viewing on screen.
The line breaks and paragraph breaks you see on screen match
those that apply when the document is printed on that printer.
This setting can be useful when several people are reviewing a
document that will eventually be printed on a specific printer orwhen the document is exported to PDF (a process that uses “Adobe
PDF” as the printer).
If this option is not selected, a printer-independent layout will be
used for screen display and printing.
Add spacing between paragraphs and tables (in current
document)
In OpenOffice.org Writer, paragraph spacing is defined differently
than it is in MS Word documents. If you have defined spacing
between two paragraphs or tables, spacing is also added in thecorresponding MS Word documents.
If this option is selected, MS Word-compatible spacing is added
between paragraphs and tables in OpenOffice.org Writer documents.
Add paragraph and table spacing at tops of pages (in current
document)
You can define paragraphs to have space appear before (above)
them. If this option is selected, any space above a paragraph will
also appear if the paragraph is at the beginning of a page or column,

Free eBook Edition

Chapter 2 Setting up Writer63

if the paragraph is positioned on the first page of the document, or
after a manual page break.
If you import an MS Word document, the spaces are automatically
added during the conversion.
Add paragraph and table spacing at bottom of table cells
Specifies that the bottom spacing is added to a paragraph, evenwhen it is the last paragraph in a table cell.
Use as Default
Click this button to use the current settings on this page as thedefault in OpenOffice.org.

AutoCaption options
Do you want OOo to automatically insert captions for tables, pictures,
frames, and OLE objects that have been inserted in a Writer
document?

Note

You may not always want captions for every table, for example,
if you use tables for layout as well as for tables of data. You
can always add captions to individual tables, graphics, or otherobjects (right-click > Caption).

If you do want automatic captions on one or more object types:
1) Choose OpenOffice.org Writer > AutoCaption on the Options
dialog box.
2) On the OpenOffice.org Writer – AutoCaption page (Figure 51),
select the check box next to an object you want to be
automatically captioned (Picture in the example shown).
3) With the item highlighted, specify the characteristics of thecaption. The supplied categories for captions are Drawing,
Illustration, Table, and Text. However, you are not limited to the
supplied categories. If you want to use another name (forexample, Figure) for the caption label, type the required term in
the box. In the example shown, I have added the category“Figure” to the list.
Additional information about numbering captions by chapter, characterstyles, frame styles, and other items on the AutoCaption page, is given
in later chapters in the Writer Guide.

64

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 51: Setting up a new category for automatic
captions on graphics

Mail Merge E-mail options
You can produce form letters using Writer and then use the mail merge
function to personalize those letters and send them to a number ofaddresses taken from a data source, such as an address book. Mailmerged documents can be printed and mailed, or sent by e-mail.
Use the OpenOffice.org Writer – Mail Merge E-mail page to set up theuser and server information for sending form letters by e-mail. If you
are not sure what information to put in any of the fields, consult youre-mail program or your Internet service provider.

Figure 52: Specifying settings for use when e-mailingmail-merged form letters

Free eBook Edition

Chapter 2 Setting up Writer

65

Choosing options for HTML documents
You can configure OpenOffice.org to treat HTML documents in Writerdifferently than regular documents.
1) If the Options dialog box is not already open, click Tools >Options.
2) Click the + sign by OpenOffice.org Writer/Web on the left-handside of the Options – OpenOffice.org dialog box. A list of pages
drops down.
Here you can customize settings related to printing, formatting aids,
view options, table defaults, the grid, and a default background forHTML documents you're working with in Writer.

Note

Many of the options available under Options – OpenOffice.org
Writer/Web are identical to the settings under Options –OpenOffice.org Writer but will only affect HTML documents
opened in Writer. The previous sections contain detailed
discussion on these options.

Choosing language settings
You may need to do several things to set the language settings to what
you want:• Install the required dictionaries• Change some locale and language settings• Choose spelling options

Install the required dictionaries
OOo3 automatically installs several dictionaries with the program. To
add other dictionaries, be sure you are connected to the Internet, andthen use Tools > Language > More Dictionaries Online. OOo will
open your default web browser to a page containing links to additional
dictionaries that you can install. Follow the prompts to select andinstall the ones you want.

Change some locale and language settings
You can change some details of the locale and language settings thatOOo uses for all documents or for specific documents.

66

Free eBook Edition

OpenOffice.org 3.x Writer GuideIn the Options dialog box, click Language Settings > Languages.

Figure 53: OpenOffice.org language options
On the right-hand side of the Language Settings – Languages page
(Figure 54), change the User interface, Locale setting, Default
currency, and Default languages for documents as required. In theexample, English (UK) has been chosen for all the appropriate settings.
If you want the language (dictionary) setting to apply to the current
document only, instead of being the default for all new documents,
select For the current document only.
If necessary, select the options to enable support for Asian languages(Chinese, Japanese, Korean) and support for CTL (complex text layout)
languages such as Hindi, Thai, Hebrew, and Arabic. If you choose
either of these options, the next time you open this page, you will seesome extra pages under Language Settings, as shown in Figure 55.
These pages (Searching in Japanese, Asian Layout, and Complex Text
Layout) are not discussed here.

Figure 54: Choosing language options

Free eBook Edition

Chapter 2 Setting up Writer

67

Figure 55: Extra pages available when enhanced language
support options are selected

Choose spelling options
To choose the options for checking spelling, click Language Settings> Writing Aids. In the Options section of the page, choose thesettings that are useful for you.

Figure 56: Choosing languages, dictionaries, andoptions for checking spellingSome considerations:• If you do not want spelling checked while you type, deselectCheck spelling as you type.
• If you use a custom dictionary that includes words in all
uppercase and words with numbers (for example, AS/400), selectCheck uppercase words and Check words with numbers.
• Check special regions includes headers, footers, frames, andtables when checking spelling.
68

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Here you can also check which of the user-defined (custom)
dictionaries are active, or you can add or remove dictionaries byclicking the New or Delete buttons.

Note

OpenOffice.org does not have a grammar checker, but you can
install a grammar checker extension such as Language Tooland access that tool from Tools > Spelling and Grammar.
See Chapter 14 for more about installing extensions.

Controlling Writer’s AutoCorrect functions
Some people find some or all of the items in Writer’s AutoCorrectfeature annoying because Writer changes what you type when you do
not want it changed. Many people find some of the AutoCorrectfunctions quite helpful; if you do, then select the relevant options. But
if you find unexplained changes appearing in your document, this is agood place to look to find the cause.
To open the AutoCorrect dialog box, click Tools > AutoCorrect
Options. (You need to have a document open for this menu item toappear.) In Writer, this dialog box has five tabs. Many of the options inthis dialog box are described in Chapter 3 (Working with Text).

Free eBook Edition

Chapter 2 Setting up Writer69

3

Chapter
Working with Text

Free eBook Edition

Introduction
This chapter covers the basics of working with text in Writer, the wordprocessing component of OpenOffice.org (OOo). It assumes that you
are familiar with the use of a mouse and keyboard and that you haveread about Writer’s menus and toolbars and other topics covered in
Chapter 1 (Introducing Writer).
We recommend that you also follow the suggestions in Chapter 2(Setting up Writer) about displaying formatting aids, such as end-ofparagraph marks, and selecting other setup options.
When you have read this chapter, you should know how to:• Select, cut, copy, paste, and move text
• Find and replace text
• Insert special characters• Format paragraphs and characters• Create numbered or bulleted lists• Check spelling, use the thesaurus, and choose hyphenation
options• Use the autocorrection, word completion, autotext, and line
numbering features• Track changes, undo and redo changes, and insert notes• Link to other parts of a document

Selecting text
Before you can do anything with text, you need to select it. Selecting
text in Writer is similar to selecting anything in other applications.
In addition to selecting blocks of text, you can select items that are notconsecutive, and columns (vertical blocks) of text.

Selecting items that are not consecutive
To select nonconsecutive items (as shown in Figure 57) using themouse:
1) Select the first piece of text.
2) Hold down the Control (Ctrl) key and use the mouse to select thenext piece of text.
3) Repeat as often as needed.

Free eBook Edition

Chapter 3 Working with Text

71

Now you can work with the selected text (copy it, delete it, change thestyle, and so on).
Note

Macintosh users: substitute the Command key when
instructions in this chapter say to use the Control key.

To select nonconsecutive items using the keyboard:
1) Select the first piece of text. (For more information about
keyboard selection of text, see the topic “Navigating and
Selecting with the Keyboard” in the OpenOffice.org Help (F1).)
2) Press Shift+F8. This puts Writer in “ADD” mode. The word ADD
appears on the Status Bar.
3) Use the arrow keys to move to the start of the next piece of text
to be selected. Hold down the Shift key and select the next pieceof text.
4) Repeat as often as needed.
Now you can work with the selected text.
Press Esc to exit from this mode.

Figure 57: Selecting items that are not next to each other

Selecting a vertical block of text
You can select a vertical block or “column” of text that is separated by
spaces or tabs (as you might see in text pasted from e-mails, program
listings, or other sources), using OOo’s block selection mode. Tochange to block selection mode, use Edit > Selection Mode > BlockArea, or click several times in the status bar on STD until it changes to
BLK.
Now you can highlight the selection, using mouse or keyboard, as
shown in Figure 58.
72

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 58: Selecting a vertical block of text

Cutting, copying, and pasting text
Cutting and copying text in Writer is similar to cutting and copying text
in other applications. You can copy or move text within a document, or
between documents, by dragging or by using menu selections, icons, or
keyboard shortcuts. You can also copy text from other sources such as
Web pages and paste it into a Writer document.
To move (cut and paste) selected text using the mouse, drag it to the
new location and release it. To copy selected text, hold down theControl key while dragging. The text retains the formatting it had
before dragging.
When you paste text, the result depends on the source of the text andhow you paste it. If you click on the Paste icon, then the pasted text
keeps its original formatting (such as bold or italics). Text pasted fromWeb sites and other sources may also be placed into frames or tables.
If you do not like the results, click the Undo icon or press Control+Z.
To make the pasted text take on the formatting of the text surrounding
where it is pasted, choose either:• Edit > Paste Special, or• Click the triangle to the right of the Paste icon, or• Click the Paste icon without releasing the left mouse button.
Then select Unformatted text from the resulting menu.
The range of choices on the Paste Special menu varies depending on
the origin and formatting of the text (or other object) to be pasted. See
Figure 59 for an example with text on the clipboard.

Figure 59: Paste Special menu

Free eBook Edition

Chapter 3 Working with Text

73

This example includes the formatting option DDE link. DDE is anacronym for Dynamic Data Exchange, a mechanism whereby selected
data in document A can be pasted into document B as a linked, ‘live’
copy of the original. It would be used, for example, in a report written
in Writer containing time-varying data, such as sales results sourced
from a Calc spreadsheet. The DDE link ensures that, as the source
spreadsheet is updated so is the report, thus reducing the scope forerror and reducing the work involved in keeping the Writer document
up to date.

Finding and replacing text
Writer has a Find and Replace feature that automates the process ofsearching for text inside a document. In addition to finding andreplacing words and phrases, you can:Use wildcards and regular expressions to fine-tune a search.
• Find and replace specific formatting.
• Find and replace paragraph styles.
To display the Find & Replace dialog box (Figure 60), use the keyboard
shortcut Control+F or choose Edit > Find & Replace from the menubar.
Type the text you want to find in the Search for box.
1) To replace the text with different text, type the new text in the
Replace with box.
2) You can select various options, such as matching the case,matching whole words only, or doing a search for similar words.
(See below for some other choices.)
3) When you have set up your search, click Find. To replace text,
click Replace instead.
Tip

Caution74

If you click Find All, Writer selects all instances of the searchtext in the document. Similarly, if you click Replace All
button, Writer replaces all matches.
Use Replace All with caution; otherwise, you may end up withsome hilarious (and highly embarrassing) mistakes. A mistakewith Replace All might require a manual, word-by-wordsearch to fix, if not discovered in time to undo.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 60: Expanded Find & Replace dialog box

Find and replace specific formatting
A very powerful use of Find & Replace takes advantage of the format
option. For example, you might want to replace underlined words withitalics.
On the Find & Replace dialog box (with More Options displayed, as in
Figure 60):
1) To search for text with specific formatting, enter the text in the
Search for box. To search for specific formatting only, delete any
text in the Search for box.
2) Click Format to display the Text Format (Search) dialog box. The
tabs on this dialog box are similar to those on the Paragraphformat and Paragraph Style dialog boxes.
3) Choose the formats you want to search for and then click OK. The
names of selected formats appear under the Search for box. For
example, you might search for all text in 14-point bold Helvetica.
4) To replace text as well as formatting, type the replacement text in
the Replace with box.

Free eBook Edition

Chapter 3 Working with Text75

To search for specific text with specific formatting (for example,
the word hello in bold), specify the formatting, type the text in
the Search for box and leave the Replace with box blank.
To remove specific character formatting, click Format, select the
Font tab, then select the opposite format (for example, No Bold).
The No Format button on the Find & Replace dialog box clears
all previously selected formats.
5) Click Find, Find All, Replace, or Replace All

Tip

Unless you plan to search for other text using those same
attributes, click No Format to remove the attributes after
completing your search. If you forget to do this, you may
wonder why your next search fails to find words you know arein the document.

Find and replace paragraph styles
If you combine material from several sources, you may discover thatlots of unwanted paragraph styles have suddenly shown up in yourdocument. To quickly change all the paragraphs of one (unwanted)
style to another (preferred) style:1) On the expanded Find & Replace dialog box (Figure 60), selectSearch for Styles. (If you have attributes specified, this option islabeled Including Styles.) The Search for and Replace with boxes
now contain a list of styles.
2) Select the styles you want to search for and replace.
3) Click Find, Find All, Replace, or Replace All.
Repeat steps 2 and 3 for each style that you want to replace.

Use wildcards (regular expressions)Wildcards (also known as regular expressions) are combinations ofcharacters that instruct OOo how to search for something. Regularexpressions are very powerful but not very intuitive. They can savetime and effort by combining multiple finds into one.
Table 2 shows a few of the regular expressions used by OOo.
Tip

76

The online help describes many more regular expressions andtheir uses.

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo search for a character that is defined as a wildcard, type abackslash (\) before the character. For example, to find the text
$5.00, you would conduct a search using \$5\.00.

Note

To use wildcards and regular expressions when searching andreplacing:1) On the Find & Replace dialog box, click More Options to see
more choices. On this expanded dialog box (Figure 60), select theRegular expressions option.
2) Type the search text, including the wildcards, in the Search forbox and the replacement text (if any) in the Replace with box. Not
all regular expressions work as replacement characters; the line
break (\n) is one that does work.
3) Click Find, Find All, Replace, or Replace All (notrecommended).
Table 2. Examples of search wildcards (regular expressions)
Use this
expression

Examples and comments

Any single
character.

b.d finds bad, bud, bid, and bed.

One of thespecifiedcharacters[xyz]b[iu]n finds bin and bun.

Any single
character in this
range

[x-y]

[r-t]eed finds reed, seed, and teed;ranges must be in alphabeticallyascending order.

Any single
character except
the characters
inside the brackets[^x]p[^a]st finds post and pest, but notpast.

The beginning of aword\<start\<log finds logbook and logistics, but
not catalog.

The end of a wordend\>

log\> finds catalog, but not logistics.

A paragraphmarker$

Does not work as a replacement
character. Use \n instead.

A line break\nFinds a line break that was insertedwith Shift+Enter. When used as areplacement character, it inserts aparagraph marker.

To findFree eBook Edition

Chapter 3 Working with Text

77

Inserting special characters
A “special” character is one not found on a standard English keyboard.
For example, © ¾ æ ç ñ ö ø ¢ are all special characters. To insert a
special character:
1) Place the cursor in your document where you want the characterto appear.
2) Click Insert > Special Character to open the Special
Characters dialog box (Figure 61).

Figure 61: The Special Characters dialog box, where you caninsert special characters3) Select the characters (from any font or mixture of fonts) you wish
to insert, in order; then click OK. The selected characters areshown in the lower left of the dialog box. As you select eachcharacter, it is shown on the lower right, along with the numericalcode for that character.

78

Tip

Notice that the characters selected appear in the bottom-leftcorner of the dialog box.

Note

Different fonts include different special characters. If you do
not find a particular special character you want, try changing
the Font selection.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Inserting non-breaking spaces and hyphens
Non-breaking spaces
To prevent two words from being separated at the end of a line,press Control+spacebar after the first word.
Non-breaking hyphen
You can use a non-breaking hyphen in cases where you do not want
the hyphen to appear at the end of a line, for example in a number
such as 123-4567. To insert a non-breaking hyphen, press
Shift+Control+minus sign.

Inserting en and em dashes
To enter en and em dashes, you can use the Replace dashes option
under Tools > AutoCorrect > Options (Figure 70). This option
replaces two hyphens, under certain conditions, with thecorresponding dash.
In the following table, the A and B represent text consisting of letters A
to z or digits 0 to 9.
Text that you type:A - B (A, space, minus, space, B)

ResultA – B (A, space, en-dash, space, B)

A -- B (A, space, minus, minus, space, B) A – B (A, space, en-dash, space, B)
A--B (A, minus, minus, B)

A—B (A, em-dash, B)

A-B (A, minus, B)

A-B (unchanged)

A -B (A, space, minus, B)

A -B (unchanged)

A --B (A, space, minus, minus, B)

A –B (A, space, en-dash, B)

Another means of inserting en or em dashes is through the Insert >Special Characters menu. Select the U+2013 or U+2014 character,
respectively.
A third method uses keyboard shortcuts. These shortcuts varydepending on your operating system.

Tip

You can also record macros to insert en and em dashes andassign those macros to unused key combinations, for example
Ctrl+Shift+N and Ctrl+Shift+M. For more information, see
Chapter 17 (Customizing Writer).

Free eBook Edition

Chapter 3 Working with Text

79

Windows
Hold down one of the Alt keys and type on the numeric keypad: 0150
for an en dash or 0151 for an em dash. The dash appears when you
release the Alt key.

Tip

On a keyboard with no numeric keypad, use a Fn (Function)
key combination to type the numbers. (The Fn key is usually tothe right of the left-hand Ctrl key on the keyboard.)
For example, on a US keyboard layout, the combination for an
en dash should be Alt+Fn+mjim and for an em dash it shouldbe Alt+Fn+mjij.

Linux
Hold down the Compose key and type two hyphens and a period foran en dash, or three hyphens for an em dash. The dash appears
when you release the Compose key.
Tip

The key that operates as a Compose key varies with the Linux
distribution. It is usually one of the Alt or Win keys, but may be
another key, and should be user-selectable.

Mac OS X
Hold down the Option (Alt) key and type a hyphen for an en dash.
For an em dash, the combination is Shift+Option+Hyphen.

Formatting paragraphs
You can apply many formats to paragraphs using the buttons on theFormatting toolbar. Figure 62 shows the Formatting toolbar as afloating toolbar, customized to show only the buttons for paragraphformatting.

Tip

80

It is highly recommended that you use paragraph styles rather
than manually formatting paragraphs, especially for long or
standardized documents. For information on the advantages ofstyles and how to use them, see Chapters 6 and 7.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

1 Open Styles andFormatting Window
2 Apply Style
3 Align Left
4 Centered

5 Align Right
6 Justified
7 Line Spacing: 1
8 Line Spacing: 1.5
9 Line Spacing: 2

10 Numbering On/Off
11 Bullets On/Off
12 Decrease Indent
13 Increase Indent
14 Paragraph format dialog box

Figure 62: Formatting toolbar, showing icons for paragraph formatting
Figure 63 shows examples of the text alignment options.

Figure 63: Text alignment options
When using justified text, the last line is by default aligned to the left;
however, if so desired, you can also align the last line to the center ofthe paragraph area or justify it so that spaces are inserted between thewords in order to fill the whole line. In the case where the last line
consists of a single word, you can also have this word stretched tocover the whole line. Figure 64 shows an example of the effectobtained when setting each of these options.

Figure 64: Four choices for the last line of a justified paragraph
These options are controlled in the Alignment page of the Format >Paragraph dialog box (see Figure 65).

Free eBook Edition

Chapter 3 Working with Text

81

Figure 65: Options for the last line of a justified paragraphSetting tab stops and indents
The horizontal ruler shows both the default tab stops and any tab stops
that you have defined. Tab settings affect indentation of fullparagraphs (using the Increase Indent and Decrease Indent icons on
the Formatting toolbar) as well as indentation of parts of a paragraph(by pressing the Tab key on the keyboard).
Using the default tab spacing can cause formatting problems if you
share documents with other people. If you use the default tab spacing
and then send the document to someone else who has chosen adifferent default tab spacing, tabbed material will change to use theother person’s settings. This may cause major formatting problems.
Instead of using the defaults, define your own tab settings, as
described in this section.
To define indents and tab settings for one or more selectedparagraphs, double-click on a part of the ruler that is not between theleft and right indent icons to open the Indents & Spacing page of theParagraph dialog box. Double-click anywhere between the left andright indent icons on the ruler to open the Tabs page of the Paragraphdialog box (Figure 66).
A better strategy is to define tabs for the paragraph style. See
Chapters 6 and 7 for more about paragraph styles.

82

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 66: Specifying tab stops and fill characters

Tip

Using tabs to space out material on a page is not recommended.
Depending on what you are trying to accomplish, a table isusually a better choice.

Changing the default tab stop interval
Note

Any changes to the default tab setting will affect the existing
default tab stops in any document you open afterward, as well
as tab stops you insert after making the change.

To set the measurement unit and the spacing of default tab stop
intervals, go to Tools > Options > OpenOffice.org Writer >General.

Figure 67: Selecting a default tab stop interval
You can also set or change the measurement unit for rulers in thecurrent document by right-clicking on the ruler to open a list of units,
as shown in Figure 68. Click on one of them to change the ruler to that
unit. The selected setting applies only to that ruler.

Free eBook Edition

Chapter 3 Working with Text

83

Figure 68: Ruler showing default tab stops

Formatting characters
You can apply many formats to characters using the buttons on theFormatting toolbar. Figure 69 shows the Formatting toolbar as afloating toolbar, customized to show only the buttons for character
formatting.

1 Open Styles andFormatting Window
2 Apply Style
3 Font Name
4 Font Size
5 Bold6 Italic
7 Underline
8 Superscript
9 Subscript
10 Increase Font
11 Reduce Font

12 Font Color
13 Highlighting
14 Background Color
15 Open Character Format
dialog box

Figure 69: Formatting toolbar, showing icons for character formatting
It is highly recommended that you use character styles rather thanmanually formatting characters. For information on styles and how to
use them, see Chapters 6 and 7.

Tip

To remove manual formatting, select the text and click Format> Default Formatting or right-click and select Default
Formatting from the pop-up menu.

Autoformatting
Writer can be set to automatically format parts of a document
according to the choices made on the Options page of the AutoCorrect
dialog box (Tools > AutoCorrect Options). See Figure 70.

84

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 70: Autoformat choices on the Options page of
the AutoCorrect dialog box
The Help describes each of these choices and how to activate theautoformats. Some common unwanted or unexpected formattingchanges include:• Horizontal lines. If you type three or more hyphens (---),
underscores (___) or equal signs (===) on a line and then press
Enter the paragraph is replaced by a horizontal line as wide as
the page. The line is actually the lower border of the preceding
paragraph.
• Bulleted and numbered lists. A bulleted list is created when you
type a hyphen (-), asterisk (*), or plus sign (+), followed by aspace or tab at the beginning of a paragraph. A numbered list is
created when you type a number followed by a period (.), followed
by a space or tab at the beginning of a paragraph. Automatic
numbering is only applied to paragraphs formatted with theDefault, Text body or Text body indent paragraph styles.
Tip

If you notice unexpected formatting changes occurring in yourdocument, this is the first place to look for the cause.

Free eBook Edition

Chapter 3 Working with Text85

To automatically format the file according to the options you have set,choose Format > AutoCorrect Options and select or deselect theitems on the submenu.
While Typing
Automatically formats the document while you type.
Apply
Automatically formats the document.
Apply and Edit Changes
Automatically formats the file and then opens a dialog box where
you can accept or reject the changes.
AutoCorrect Options
Opens the AutoCorrect dialog (Figure 70).

Creating numbered or bulleted lists
There are several ways to create numbered or bulleted lists:• Use autoformatting, as described above.
• Use list styles, as described in Chapter 7 (Working with Styles).
• Use the Numbering and Bullets icons on the paragraphformatting toolbar (see Figure 62). This method is described here.
To produce a numbered or bulleted list, select the paragraphs in thelist and then click on the appropriate icon on the toolbar.
Note

It is a matter of personal preference whether you type yourinformation first, then apply Numbering/Bullets or apply theseas you type.

Using the Bullets and Numbering toolbar
You can create a nested list (where one or more list items has a sublist
under it, as in an outline) by using the buttons on the Bullets andNumbering toolbar (Figure 71). You can move items up or down thelist, create subpoints, and even change the style of bullets.
Tip

86

It is possible to move a list entry up, together with all of its
sub-entries. Do this by clicking the Promote One Level With
Subpoints button.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

1 Bullets On/Off
2 Numbering On/Off
3 Numbering Off
4 Up One Level
5 Down One Level

6 Move Up (One Level) with
Sub-points
7 Move Down (One Level) with
Sub-points
8 Insert Unnumbered Entry
9 Move Up

10 Move Down
11 Move Up in Sub-points
12 Move Down in Sub-points
13 Restart Numbering
14 Bullets and Numbering

Figure 71: Bullets and Numbering toolbar
If you create a nested list using the predefined styles, all the levels of
the list (up to 10) apply the same numbering (or bullet), however inmany circumstances you will want to use a combination of numberingformats and bullets when creating a nested lists. Such lists with amixture of numbering formats and bullets can be easily configured as
described in the following example. Additional information on lists andin particular the technique to create your own list style is described in
Chapter 7 (Working with Styles).

Tip

When creating nested lists, one option is to enter all the list
paragraphs first and apply the levels afterwards.
You can use keyboard shortcuts to move paragraphs up or
down the outline levels. Place the cursor at the beginning of
the numbered paragraph and press:
Tab Down a level
Shift+Tab Up a level
To insert a tab stop at the beginning of a numbered paragraph(that is, after the number but before the text), press
Control+Tab.

Example: configuring a nested list
We will use a numbering style to produce the following effect:
I. Level-1 list item
A. Level-2 list item
i. Level-3 list itema) Level-4 list item

Free eBook Edition

Chapter 3 Working with Text

87This example uses one of the supplied styles, Numbering 1, however if
you intend to reuse this type of nested list you can also create a newstyle as illustrated in Chapter 7 (Working with Styles).
1) Open the Styles and Formatting
window and click the List
Styles icon at the top. Rightclick on the Numbering 1 styleand choose Modify from the
pop-up menu.
2) On the Numbering Style dialog
box, go to the Outline page,
where you will find that one
style matches ourrequirements. Click once on
Figure 72: Modifying a list stylethat style.

Figure 73: Choosing a predefined outline-numbering style3) To modify the layout of the list, use the Options tab (Figures 74
and 75). Notice that the preview on the right shows the outline
selected. In the Level box on the left, select 1, then 2, 3, and 4
and see how the information in the Numbering and After boxes
changes.
Use the Options page to set different punctuation; for example, aperiod (full stop) after “a” on level 4 instead of a parenthesis.

88Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 74: Checking the outline numbering for level-1 list items

Figure 75: Numbering style for level-2 list items
To make the indentation at each level greater or less than thedefault, change it on the Position page. Select the level, thenmake any changes in the indentation, spacing, or numberingalignment.
4) Repeat for each level as required, then click OK.

Tip

With outline numbering you can define different bullet styles
for the different levels of a bullet list. Use the Bullets tab of theBullets and Numbering dialog box (not shown) to select thebasic style. Return to the Options tab to customize the bullet
for each indent level. Here you can set bullets to any
character. See the Graphics tab for more bullets.

Using footnotes and endnotes
Footnotes appear at the bottom of the page on which they arereferenced. Endnotes are collected at the end of a document.
To work effectively with footnotes and endnotes, you need to:• Insert footnotes.

Free eBook Edition

Chapter 3 Working with Text89

• Define the format of footnotes.
• Define the location of footnotes on the page; see Chapter 4(Formatting Pages).

Inserting footnotes/endnotes
To insert a footnote or an endnote, put the cursor where you want thefootnote/endnote marker to appear. Then select Insert > Footnote
from the menu bar or click the Insert Footnote Directly or Insert
Endnote Directly icon on the Insert toolbar.

Figure 76: Using the Insert Footnote Directly icon on the toolbar
A footnote (or endnote) marker is inserted in the text, and the cursor isrelocated to the footnote area at the bottom of the page (or to theendnote area at the end of the document). Type the footnote or
endnote content in this area.
If you use Insert > Footnote, the Insert Footnote dialog box isdisplayed. Here you can choose whether to use the automatic
numbering sequence specified in the footnote settings and whether toinsert the item as a footnote or an endnote.

Figure 77: Inserting a footnote directly
If you use the Insert Footnote Directly or Insert Endnote Directly
icon, the footnote or endnote automatically takes on the attributes
previously defined in the Footnote Settings dialog box.
You can edit an existing footnote or endnote the same way you edit anyother text.

90

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo delete a footnote or endnote, delete the footnote marker. The
contents of the footnote or endnote are deleted automatically, and thenumbering of other footnotes or endnotes is adjusted automatically.

Defining the format of footnotes/endnotes
To format the footnotes themselves, click Tools > Footnotes. On theFootnote Settings dialog box, choose settings as required. The
Endnotes page has similar choices.

Figure 78: Defining footnote formatting

Checking spelling and grammar
Writer provides a spelling checker, which can be used in two ways.
AutoSpellcheck checks each word as it is typed and displays awavy red line under any misspelled words. When the word iscorrected, the red wavy line disappears.
To perform a separate spelling check on the document (or a text
selection) click the Spelling and Grammar button. This checks
the document or selection and opens the Spelling and Grammar
dialog box (Figure 86) if any misspelled words are found.
Here are some more features of the spelling checker:• You can right-click on a word with a wavy underline, to open a

Free eBook Edition

powerful context menu. If you select from the suggested words on
Chapter 3 Working with Text

91the menu, the selection will replace the misspelled word in yourtext. Other menu options are discussed below.
• You can change the dictionary language (for example, Spanish,French, or German) on the Spelling and Grammar dialog box.
• You can add a word to a dictionary. Click Add in the Spelling andGrammar dialog box and pick the dictionary to add it to.
• Click the Options button on the Spelling and Grammar dialog box
to open a dialog box similar to the one in Tools > Options >Language Settings > Writing Aids described in Chapter 2.
There you can choose whether to check uppercase words andwords with numbers, and you can manage custom dictionaries,that is, add or delete dictionaries and add or delete words in adictionary.

Figure 79: Selecting a word from dictionary using theSpelling and Grammar dialog box
Writer does not include a grammar checker, but you can install an
extension such as Language Tool and access it from Tools > Spellingand Grammar. (See Chapter 17 for more about installing extensions.)
Language Tool adds a new menu item and submenu to the Tools menu,
from which you can configure the tool and check or recheck the
document. Figure 80 shows an example of the Language Tool extension
in use.
92

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 80: The Language Tool extension

Using built-in language tools
Writer provides some tools that make your work easier if you mix
multiple languages within the same document or if you write
documents in various languages.
The main advantage of changing the language is that you can then use
the correct dictionaries to check spelling and apply the localizedversions of Autocorrect replacement tables, thesaurus, andhyphenation rules.
You can also set the language for a paragraph or a group of characters
as None. This option is especially useful when you insert text such as
web addresses or programming language snippets that you do notwant to check for spelling.
Specifying the language in character and paragraph styles is thepreferred method, because styles allow a greater level of control andmake changing the language much faster. On the Font tab of theParagraph Styles dialog box, you can specify that certain paragraphs
be checked in a language that is different from the language of the restof the document. See Chapter 7 (Working with Styles) for information
on how to manage the language settings of a style.

Free eBook Edition

Chapter 3 Working with Text

93

You can also set the language for the whole document, for individual
paragraphs, or even for individual words and characters, all from
Tools > Language on the menu bar.
For selection
Applies a specified language to the selected text (the selection canbe as short as a few characters or as long as several paragraphs).
For paragraph
Select this option to apply the specified language to the paragraphwhere the cursor is located.
For all text
Select this option to apply the specified language to all the
document.
Another way to change the language of a whole document is to use
Tools > Options > Language Settings > Languages. In the Default
languages for documents section, you can choose a different language
for all the text.

Figure 81: Options available in the Languages settings

Caution

Unlike the menu tool that applies to the individual document,a change in the default language from the Options dialog
box is a general change of settings of OOo and will therefore
apply to all the documents created in the future. If you want
to change the language for the current document only, besure to select the For the current document only option.

The spelling checker works only for those languages in the list whichhave the symbol
next to them. If you do not see this symbol next toyour preferred language, you can install the dictionary using Tools >Languages > More dictionaries online.
The language used for checking spelling is also shown in the statusbar, next to the page style in use.

94

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Using the thesaurus
The thesaurus gives alternative words and phrases. Select the word orphrase you want to find more choices for and select Tools >Language > Thesaurus or press Control+F7. Click on a meaning toshow alternative words and phrases for that meaning of the word. For
example, when given the word “house”, the thesaurus offers several
meanings, including “dwelling”, “legislature”, and “sign of the zodiac”.
If you click on “dwelling”, you will see “dwelling”, “home”, “domicile”,“abode”, and other alternatives, as shown in Figure 82.
Note

If the current language does not have a thesaurus installed,
this feature is disabled.

Figure 82: The thesaurus offers alternatives to words

Hyphenating words
You have several choices regarding hyphenation: let Writer do it
automatically (using its hyphenation dictionaries), insert conditional
hyphens manually where necessary, or don’t hyphenate at all. Eachchoice has its pros and cons.

Automatic hyphenation
To turn automatic hyphenation of words on or off:
1) Press F11 to open the Styles and Formatting window (Figure 83).
On the Paragraph Styles page, right-click on Default and selectModify.

Free eBook Edition

Chapter 3 Working with Text

95

Figure 83: Modifying a paragraph style2) On the Paragraph Style dialog box, select the Text Flow tab.

Figure 84: Turning on automatic hyphenation
3) Under Hyphenation, select or deselect the Automatically option.
4) Click OK to save.

Note

Turning on hyphenation for the Default paragraph style affects
all other paragraph styles that are based on Default. You can
individually change other styles so that hyphenation is not
active; for example, you might not want headings to behyphenated. Any styles that are not based on Default are notaffected. For more on paragraph styles, see Chapter 6(Introduction to Styles) and Chapter 7 (Working with Styles).

You can also set hyphenation choices through Tools > Options >Language Settings > Writing Aids. In Options, near the bottom of
the dialog box, scroll down to find the hyphenation settings (seeFigure 85).

96

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 85: Setting hyphenation options
To change the minimal number of characters for hyphenation, theminimum number of characters before a line break, or the minimum
number of characters after a line break, select the item, and then click
the Edit button in the Options section.
Hyphenate without inquiry
Specifies that you will never be asked to manually hyphenate words
that the hyphenation dictionary does not recognize. If this box is notselected, when a word is not recognized, a dialog box will open
where you can manually enter hyphens.
Hyphenate special regions
Specifies that hyphenation will also be carried out in footnotes,
headers, and footers.
Hyphenation options set on the Writing Aids dialog box are effective
only if hyphenation is turned on through paragraph styles.
Choices on the Writing Aids dialog box for Characters before line
break and Ccharacters after line break override settings in paragraphstyles for Characters at line end and Characters at line begin.

Manual hyphenation
To manually hyphenate words, do not use a normal hyphen, which willremain visible even if the word is no longer at the end of a line when
you add or delete text or change margins or font size. Instead, use aconditional hyphen, which is visible only when required.
To insert a conditional hyphen inside a word, click where you want thehyphen to appear and press Control+hyphen. The word will behyphenated at this position when it is at the end of the line, even if
automatic hyphenation for this paragraph is switched off.

Free eBook Edition

Chapter 3 Working with Text

97

Using AutoCorrect
Writer’s AutoCorrect function automatically corrects a long list ofcommon misspellings and typing errors. For example, “hte” will bechanged to “the”.
Select Tools > AutoCorrect Options to open the AutoCorrect dialog
box. There you can define what strings of text are corrected and how.
In most cases, the defaults are fine.

Figure 86: Replace tab of AutoCorrect dialog box
AutoCorrect is turned on when Writer is installed. To turn it off,
uncheck Format > AutoCorrect > While Typing.
To stop Writer replacing a specific spelling, go to the Replace tab,highlight the word pair, and click Delete.
To add a new spelling to the list, type it into the Replace and Withboxes on the Replace tab, and click New.
See the different pages of the dialog box for the wide variety of otheroptions available to fine-tune AutoCorrect.
Tip

98

AutoCorrect can be used as a quick way to insert special
characters. For example, (c) will be autocorrected to ©. You
can add your own special characters.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Using word completion
If Word Completion is enabled, Writer tries to guess which word you
are typing and offers to complete this word for you. To accept thesuggestion, press Enter. Otherwise, continue typing.
To turn off Word Completion, select Tools > AutoCorrect Options >Word Completion and deselect Enable word completion.
You can customize word completion from the Word Completion tab.
• Add (append) a space automatically after an accepted word.
• Show the suggested word as a tip (hovering over the word) rather
than completing the text as you type.
• Collect words when working on a document, and then either savethem for later use in other documents or select the option toremove them from the list when closing the document.
• Change the maximum number of words remembered for word
completion and the length of the smallest words to beremembered.
• Delete specific entries from the word completion list.
• Change the key that accepts a suggested entry—the options areright arrow, End key, Enter (Return), Space bar, and Tab.

Figure 87: Customizing word completion

Free eBook Edition

Chapter 3 Working with Text

99

Note

Automatic word completion only occurs after you type a word
for the second time in a document.

Using AutoText
AutoText allows you to assign text, tables, graphics, and other items toa key combination. For example, rather than typing “Senior
Management” every time you use that phrase, you just have to type“sm” and press F3. You can also save graphics or tables (such as aformatted Tip like the one on this page) as AutoText.
To assign some text to an AutoText shortcut:
1) Type the text into your document.
2) Select the text.
3) Go to Edit > AutoText (or press Control+F3).
4) Enter a name for your shortcut. Writer will suggest a one-letter
shortcut, which you can change.
5) Click the AutoText button on the right of the AutoText dialog box
and select New (text only) from the menu.
6) Click Close to return to your document.
To insert AutoText, type the shortcut and press F3.
Tip

If the only option under the AutoText button is Import, either
you have not entered a name for your AutoText or there is notext selected in the document.

AutoText is especially powerful when assigned to fields. See Chapter
14 (Working with Fields) for more information.

Line numberingLine numbering puts line numbers in the margin. The line numbers are
displayed on screen and are printed. Figure 88 shows an example withnumbering on every line.
Click Tools > Line Numbering and select the Show numbering
option in the top left corner. Then click OK.

100

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 88: Line numbering example
You can choose how many lines are numbered (for example, every line
or every tenth line), the numbering type and whether numbers restarton each page. In addition, a text separator (any text you choose) can be
set on a different numbering scheme (one every 12 lines, for example).

Figure 89: The Line Numbering dialog box

Tracking changes to a document
You can use several methods to keep track of changes made to a
document.
• Make your changes to a copy of the document (stored in adifferent folder, under a different name, or both), then use Writer
to combine the two files and show the changes you made. Click
Edit > Compare Document. This technique is particularly
useful if you are the only person working on the document, as it
avoids the increase in file size and complexity caused by the othermethods.

Free eBook Edition

Chapter 3 Working with Text101• Save versions that are stored as part of the original file. However,this method can cause problems with documents of nontrivial sizeor complexity, especially if you save a lot of versions. Avoid thismethod if you can.
• Use Writer’s change marks (often called “redlines” or “revisionmarks”) to show where you have added or deleted material orchanged formatting. Later, you or another person can review andaccept or reject each change.
Tip

Not all changes are recorded. For example, changing a tabstop from align left to align right and changes in formulas(equations) or linked graphics are not recorded.

Preparing a document for review
When you send a document to someone else to review or edit, you may
want to prepare it first so that the editor or reviewer does not have toremember to turn on the revision marks. After you have protected the
document, any user must enter the correct password in order to turnoff the function or accept or reject changes.
1) Open the document. To check whether it contains multiple
versions, click File > Versions. If multiple versions are listed,save the current version as a separate document with a different
name and use this new document as the review copy.
2) With the review copy open, make sure that change recording isturned on. The Edit > Changes > Record menu item has acheck mark next to it when recording is turned on.
3) Click Edit > Changes > Protect Records. On the Enter
Password dialog box, type a password (twice) and click OK.
Note

Passwords must contain at least five characters. It is notnecessary to password protect the document while preparing it
for review.

Recording changes
See Chapter 2 (Setting up Writer) for instructions on setting up how
your changes will be displayed.
1) To begin tracking (recording) changes, click Edit > Changes >Record. To show or hide the display of changes, click Edit >Changes > Show.

102

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Tip

Hold the mouse pointer over a marked change; you will see a
Help Tip showing the type of change, the author, date, andtime of day for the change. If Extended Tips are enabled, youwill also see any comments recorded for this change.

2) To enter a comment on a marked change, place the cursor in thearea of the change and then click Edit > Changes > Comment.
In addition to being displayed as an extended tip, the comment isalso displayed in the list in the Accept or Reject Changes dialog
box.

Figure 90: Inserting a comment duringchange recording
To move from one marked change to the next, use the arrow
buttons. If no comment has been recorded for a change, the Text
field is blank.
Tip

See also “Adding other comments” on page 105 for a way toannotate text that is not associated with a recorded change.

3) To stop recording changes, click Edit > Changes > Record
again.

Accepting or rejecting changes
1) Click Edit > Changes > Accept or Reject. The Accept or Reject
Changes dialog box (Figure 91) opens.
2) When you select a change in the dialog box, the actual change ishighlighted in the document, so you can see what the editor
changed.

Free eBook Edition

Chapter 3 Working with Text

1033) Click Accept or Reject to accept or reject the selected change.
You can also click Accept All or Reject All if you do not want toreview the changes individually.
Changes that have not yet been accepted or rejected are displayed in
the list. Accepted changes are removed from the list and appear in the
text without any marking.

Figure 91: The List tab of the Accept or Reject Changes dialog box
To show only the changes of certain people or only the changes on
specific days or various other restrictions, use the Filter page (Figure92) on the Accept or Reject Changes dialog box. After specifying thefilter criteria, return to the List page to see those changes that meetyour criteria.

Figure 92: The Filter page of the Accept or Reject Changes dialog box

104

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Merging modified documents
The processes discussed to this point are effective when you have one
reviewer at a time. Sometimes, however, multiple reviewers all returnedited versions of a document at the same time. In this case, it may bequicker to review all of these changes at once, rather than one review
at a time. For this purpose, you can merge documents in Writer.
To merge documents, all of the edited documents need to haverecorded changes in them.
1) Open one copy.
2) Click Edit > Changes > Merge Document and select and insert
another copy of the document to be merged with the first.
3) After the documents merge, the Accept or Reject Changes dialog
box opens, as in Figure 91, showing changes by more than one
reviewer. If you want to merge more documents, close the dialog
box and then repeat step 2.
4) Repeat until all copies are merged.
All recorded changes are now included in the open copy. Save this fileunder another name.

Comparing documents
Sometimes reviewers may forget to record the changes they make.
This is not a problem with Writer because you can find the changes if
you compare documents.
In order to compare documents, you need to have the original
document and the one that is edited. To compare them:
1) Open the edited document. Select Edit > Compare Document.
2) The Insert dialog box appears. Select the original document andclick Insert.
Writer finds and marks the changes and displays the Accept or Reject
Changes dialog box. From this point, you can go through and accept or
reject changes procedure as described earlier.

Adding other comments
Writer provides another type of comments (formerly called “notes”),
which authors and reviewers often use to exchange ideas, ask forsuggestions, or brainstorm during the review process.

Free eBook Edition

Chapter 3 Working with Text105

To insert a comment in the text, place the cursor in the place thecomment refers to and select Insert > comment or press Ctrl+Alt+N.
The anchor point of the comment is connected by a dotted line to a box
on the right-hand side of the page where you can type the text of thecomment. Writer automatically adds at the bottom of the comment theauthor’s name and a time stamp indicating when the comment was
created. Figure 86 shows an example of text with comments from two
different authors.
Select Tools > Options > User Data to configure the name you want
to appear in the Author field of the comment, or to change it.
If more than one person edits the document, each author is
automatically allocated a different background color.

Figure 93: Comments in OOo 3
Right-clicking on a comment pops up a menu where you can delete thecurrent comment, all the comments from the same author, or all thecomments in the document. From this menu, you can also apply somebasic formatting to the text of the comment. You can also change font
type, size, and alignment from the main menu.
To navigate from one comment to another, open the Navigator (F5),expand the Comments section, and click on the comment text to movethe cursor to the anchor point of the comment in the document. Rightclick on the comment to quickly edit or delete it.
You can also navigate the comments using the keyboard. Use
Ctrl+Alt+Page Down to move to the next comment andCtrl+Alt+Page Up to move to the previous comment.
106

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Linking to another part of a document
If you type in references to other parts of the document, thosereferences can easily get out of date if you reorganize the order of
topics, add or remove material, or reword a heading, Writer provides
two ways to ensure that your references are up to date, by inserting
links to other parts of the same document or to a different document:• Hyperlinks• Cross-references
The two methods have the same result if you Control+click the link
when the document is open in Writer: you are taken directly to thecross-referenced item. However, they also have major differences:• The text in a hyperlink does not automatically update if youchange the text of the linked item (although you can change it
manually), but changed text does automatically update in a crossreference.
• When using a hyperlink, you do not have a choice of the content
of the link (for example text or page number), but when using across-reference, you have several choices, including bookmarks.
• To hyperlink to an object such as a graphic, and have thehyperlink show useful text such as Figure 6, you need to either
give such an object a useful name instead of leaving it as thedefault name (“Graphics6”), or you need to use the Hyperlink
dialog to modify the visible text. In contrast, cross-references tofigures with captions automatically show useful text, and you
have a choice of several variations of the name.
• If you save a Writer document to HTML, hyperlinks remain active
but cross-references do not. (Both remain active when the
document is exported to PDF.)

Using cross-references
To ensure that references update if you reword a heading, caption, orother linked item, use automatic cross-references. See “Using
automatic cross-references” in Chapter 14 (Working with Fields) for
details.

Using bookmarks
Bookmarks are listed in the Navigator and can be accessed directlyfrom there with a single mouse click. In HTML documents, bookmarks
are converted to anchors that you can jump to by hyperlink. For more

Free eBook Edition

Chapter 3 Working with Text107

about bookmarks, see “Using bookmarks” in Chapter 14 (Working withFields).

Using hyperlinks
When you type text (such as a website addresses or URL) that can beused as a hyperlink, and then press the spacebar or the Enter key,
Writer automatically creates the hyperlink and applies formatting to
the text (usually a color and underlining).
If this does not happen, you can enable this feature using Tools >AutoCorrect > Options and selecting the URL Recognition option.
If you do not want Writer to convert a specific URL to a hyperlink,choose Edit > Undo Insert from the menu bar or press Control+Z
immediately after the formatting has been applied.
You can also insert hyperlinks using the Navigator and the Hyperlink
dialog, and you can modify all hyperlinks using the Hyperlink dialog, as
described in this section.

Note

Hyperlinks between documents can be set as relative or
absolute, using the Save URLs relative to option in Tools >Options > Load/Save > General.
Relative linking is only possible when the document you areworking on and the link destination are on the same drive, andyou need to create the same directory structure on your harddisk as will apply on the destination website.
OOo uses absolute path names internally, so when you moveyour mouse cursor over a hyperlink, the tooltip displays theabsolute reference even when it is set to be a relative link.

Inserting hyperlinks using the Navigator
The easiest way to insert a hyperlink to another part of the same
document is by using the Navigator:
1) Open the document containing the items you want to crossreference.
2) Open the Navigator (by clicking its icon, choosing View >Navigator, or pressing F5.
3) Click the arrow next to the Drag Mode icon, and select Insert asHyperlink. (See Figure 94.)
4) In the list at the bottom of the Navigator, select the document
containing the item that you want to cross-reference.
108

Free eBook Edition

OpenOffice.org 3.x Writer Guide

5) In the Navigator list, select the item that you want to insert as a
hyperlink.
6) Drag the item to where you want to insert the hyperlink in the
document. The name of the item is inserted in the document as anactive hyperlink.

Figure 94: Inserting a hyperlink using
the Navigator
You can also use the Hyperlink dialog to insert and modify hyperlinks
within and between documents (see next page).

Inserting hyperlinks using a dialog box
To display the Hyperlink dialog box (Figure 67), click the Hyperlink
icon
on the Standard toolbar or choose Insert > Hyperlink fromthe menu bar. To turn existing text into a link, highlight it before
opening the dialog box.
On the left hand side, select one of the four types of hyperlink:• Internet: a web address, normally starting with http://• Mail & News: for example an email address.
• Document: the hyperlink points to another document or toanother place in the presentation.
• New document: the hyperlink creates a new document.

Free eBook Edition

Chapter 3 Working with Text

109

Figure 95. Hyperlink dialog box showing details for Internet links
The top right part of the dialog box changes according to your choicefor the hyperlink type. A full description of all the choices, and theirinteractions, is beyond the scope of this chapter. Here is a summary of
the most common choices used in presentations.
For an Internet type hyperlink, choose the type of hyperlink (choose
between Web, FTP or Telnet), and enter the required web address(URL).
For a Mail and News type hyperlink, specify whether it is a mail ornews link, the receiver address and for email, also the subject.
For a Document type hyperlink, specify the document path (the Open
File button opens a file browser); leave this blank if you want to link toa target in the same presentation. Optionally specify the target in the
document (for example a specific slide). Click on the Target icon to
open the Navigator where you can select the target, or if you know thename of the target, you can type it into the box.
For a New Document type hyperlink, specify whether to edit the newly
created document immediately or just create it (Edit later) and thetype of document to create (text, spreadsheet, etc.). For a presentation,
Edit now is the more likely choice. The Select path button opens a
directory picker.
The Further settings section in the bottom right part of the dialog box
is common to all the hyperlink types, although some choices are more
relevant to some types of links.
• Set the value of Frame to determine how the hyperlink will open.
This applies to documents that open in a Web browser.
110Free eBook Edition

OpenOffice.org 3.x Writer Guide• Form specifies if the link is to be presented as text or as a button.
• Text specifies the text that will be visible to the user.
• Name is applicable to HTML documents. It specifies text that will

be added as a NAME attribute in the HTML code behind thehyperlink.
• Event button: this button will be activated to allow OOo to react
to events for which the user has written some code (macro). Thisfunction is not covered in this book.

Editing hyperlinks
To edit a hyperlink, click anywhere in the link text and then open theHyperlink dialog box by clicking the Hyperlink icon on the Standard
toolbar or choosing Edit > Hyperlink from the menu bar. Make yourchanges and click Apply. If you need to edit several hyperlinks, you
can leave the Hyperlink dialog box open until you have edited all ofthem. Be sure to click Apply after each one. When you are finished,click Close.
The standard (default) behavior for activating hyperlinks within OOo is
to use Ctrl+click. This behavior can be changed in Tools > Options >OpenOffice.org > Security > Options, by deselecting the option
Ctrl-click required to follow hyperlinks. If clicking in your links
activates them, check that page to see if the option has beendeselected.
To change the color of hyperlinks, go to Tools > Options >OpenOffice.org > Appearance, scroll to Unvisited links and/orVisited links, select those options, pick the new colors and click OK.
Caution: this will change the color for all hyperlinks in all componentsof OpenOffice.org—this may not be what you want.
In Writer and Calc (but not Draw or Impress), you can also change theInternet link character style or define and apply new styles to selected
links.

Free eBook Edition

Chapter 3 Working with Text111

Switching between insert and overwrite
modeWith the keyboard, press Insert to toggle between overwrite mode andinsert mode. In insert mode, any text after the cursor position moves
forward to make room for the text you type; in overwrite mode, text
after the cursor position is replaced by the text you type. The current
mode is displayed on the Status Bar.
With the mouse, click in the area on the Status Bar that indicates thecurrent mode in order to switch to the other mode.

Counting the words in a selection
Select a block of text and choose Tools > Word Count. OOo displays
the number of words and characters in the selection as well as thenumber of words in the document. You can also see the number ofwords and characters (and other information) in the entire documentin File > Properties > Statistics.

112

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4

ChapterFormatting Pages
Using Page Styles, Tables, Frames, Columns,
and Sections

Free eBook Edition

Introduction
Writer provides several ways for you to control page layouts:• Page styles• Columns• Frames• Tables• Sections
This chapter describes these methods and some associated things:• Headers and footers• Numbering pages• Changing page margins

Tip

Page layout is usually easier if you select the options to show
text, object, table, and section boundaries in Tools > Options> OpenOffice.org > Appearance and if you select the options
for paragraph ends, tabs, breaks, and other items in Tools >Options > OpenOffice.org Writer > Formatting Aids.

Choosing a layout method
The best layout method depends on what the final document shouldlook like and what sort of information will be in the document. Hereare some examples. Do not worry if all this does not mean much to you
now. The techniques mentioned are all described in this chapter.
For a book similar to this user
guide with one column of text,
some figures without text besidethem, and some other figures withdescriptive text, use page styles forbasic layout, and use tables toplace figures beside descriptive
text, where necessary.

114

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Use page styles (with two columns)
for an index or other documentwith two columns of text where thetext continues from the left-handcolumn to the right-hand column
and then to the next page, all insequence (also known as snaking
columns of text). If the title of the
document (on the first page) is fullpage width, put it in a singlecolumn section.

For a newsletter with a complex
layout, two or three columns on thepage, and some articles that
continue from one page to someplace several pages later, use pagestyles for basic layout. Place
articles in linked frames andanchor graphics to fixed positions
on the page, if necessary.

For a document with terms andtranslations to appear side-by-side
in what appear to be columns, usea table to keep items lined up so
you can type in both “columns”.

Free eBook Edition

Chapter 4 Formatting Pages

115

Setting up basic page layout using styles
In Writer, page styles define the basic layout of all pages, including
page size, margins, the placement of headers and footers, borders andbackgrounds, number of columns, and so on.
Writer comes with several page styles, which you can build on or
modify, and you can define new (custom) page styles. You can have one
or many page styles in a single document.
Note

All pages in a Writer document are based on styles. If you do
not specify a page style, Writer uses the Default page style.

To change the layout of individual pages, either define a new pagestyle or use one of the techniques (sections, frames, or tables)
described later in this chapter.
This chapter describes some uses of page styles. Some other uses are
discussed in Chapter 6 (Introduction to Styles). The Page Style dialog
box is covered in detail in Chapter 7 (Working with Styles).

Tip

Any modifications of page styles, including the Default pagestyle, apply only to the document you are working on. If you
want the changes to be the default for all documents, you needto put the changes into a template and make that template thedefault template. See Chapter 10 (Working with Templates) for
details.

Inserting a page break without switching the style
In many documents (for example, a multi-page report), you may want
the text to flow from one page to the next as you add or delete
information. Writer does this automatically, unless you override thetext flow using one of the techniques described earlier.
If you do want a page break in a particular place, for example, to put aheading at the top of a new page, here is how to do it:1) Position the cursor in the paragraph you want to be at the start of
the next page. Right-click and choose Paragraph in the pop-up
menu.
2) On the Text Flow page of the Paragraph dialog box (Figure 96), in
the Breaks section, select Insert. Do not select With Page Style.
3) Click OK to position the paragraph at the start of the next page.

116

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 96: Inserting a manual page breakDefining a different first page for a document
Many documents, such as letters and reports, have a first page that isdifferent from the other pages in the document. For example, the firstpage of a letterhead typically has a different header, as shown in
Figure 97, or the first page of a report might have no header or footer,
while the other pages do. With Writer, you can define the style for the
first page and specify the style for the following page to be applied
automatically.

Figure 97: Letterhead with different page styles for first andfollowing pages
As an example, we can use the First Page and Default page styles thatcome with Writer. Figure 98 shows what we want to happen: the firstpage is to be followed by the default page, and all the following pages
are to be in the Default page style.

Free eBook Edition

Chapter 4 Formatting Pages

117

Figure 98: Flow of page styles
To set up this sequence:
1) Open the Styles and Formatting window. (Do one of the following:click the Styles and Formatting icon
located at the left-handend of the object bar, choose Format > Styles and Formatting,or press F11.)
2) On the Styles and Formatting window, click on the Page Styles
icon
to display a list of page styles.
3) Right-click on First Page and select Modify from the pop-up
menu.
4) On the Organizer page of the Page Style dialog box, look at the
Next Style property. This property defines what the page style forthe next page will be. It should be set to Default, but if it is not,you can change the next style by clicking on the drop-down
button and choosing Default from the list of page styles.

Figure 99: Setting the Next Style property for a page style5) On the other pages of this dialog box, you can turn on or off theheader and footer for the first page and define othercharacteristics, such as columns, a page border, or a page
background. For more information, see Chapter 7 (Working with
Styles).
6) Click OK to save the changes.
118Free eBook Edition

OpenOffice.org 3.x Writer GuideNote

You can override the Next Style property by manually insertinga page break and specifying a page style or by starting a page
with a paragraph or table that has its own page style property
defined. These techniques are described in “Inserting alandscape page into a portrait document” on page 120.

Changing page orientation within a document
A document can contain pages in more than one orientation. A
common scenario is to have a landscape page in the middle of adocument, whereas the other pages are in a portrait orientation. Hereare the steps to achieve it.

Setting up a landscape page style1) Note the page style that is current and the margin settings. (Youcan find the margin settings on the Page page of the Page Style
dialog box, as shown in Figure 101.)2) Create a new style. (Right-click on the current page style in the
Styles and Formatting window and choose New from the pop-up
menu)3) On the Organizer page of the Page Style dialog box (Figure 100),
name (by typing in the Name field) this new style Landscape andset the Next Style property to Landscape (to allow for having
more than one sequential landscape page).

Figure 100: Naming the new style and setting the next
page style to Landscape4) On the Page page of the Page Style dialog box (Figure 101), set
the Orientation to Landscape. The width and height attributes ofthe page will automatically change.
5) Change the margins so that they correspond with the margins of
the portrait page. That is, the portrait top margin becomes thelandscape left margin, and so on.

Free eBook Edition

Chapter 4 Formatting Pages

1196) Click OK to save the changes.

Figure 101: Setting orientation and margins for a landscape page

Inserting a landscape page into a portrait document
Now that you have defined the Landscape page style, here is how toapply it.
1) Position the cursor in the paragraph or table at the start of thepage that is to be set to landscape. Right-click and choose
Paragraph or Table, respectively, in the pop-up menu.
2) On the Text Flow page of the Paragraph dialog box (Figure 102)or the Table Format dialog box (Figure 103), select Insert (orBreak for a table) and With Page Style. Set the Page Style
property to Landscape. Click OK to close the dialog box and to
apply the new page style.
3) Position the cursor in the paragraph or table where the page is toreturn to portrait orientation and change the properties of thatparagraph or table properties so that With Page Style is theportrait page style that was used before the Landscape pagestyle.
4) Click OK to return to the previous portrait page style.

120

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 102: Specifying a page break before a paragraph

Figure 103: Specifying a page break before a tableTip

If you need the headers or footers on the landscape pages to bein portrait orientation, see “Portrait headers on landscapepages” on page 147.

Changing page margins
You can change page margins in two ways:• Using the page rulers—quick and easy, but does not have finecontrol.
• Using the Page Style dialog box—can specify margins to two(fractional) decimal places.
Note

If you change the margins using the rulers, the new margins
affect the page style and will be shown in the Page Style dialog
box the next time you open it.

Free eBook Edition

Chapter 4 Formatting Pages

121

To change margins using the rulers:
1) The shaded sections of the rulers are the margins (see Figure104). Put the mouse cursor over the line between the gray andwhite sections. The pointer turns into a double-headed arrow.
2) Hold down the left mouse button and drag the mouse to move themargin.

Tip

The small arrows on the ruler are used for indenting
paragraphs. They are often in the same place as the pagemargins, so you need to be careful to move the margin marker,
not the arrows. Place the mouse pointer between the arrows
and, when the pointer turns into a double-headed arrow, you
can move the margin (the indent arrows will move with it).

Figure 104: Moving the margins
To change margins using the Page Style dialog box (Figure 101):
1) Right-click anywhere on the page and select Page from the popup menu.
2) On the Page page of the dialog box, type the required distances in
the Margins boxes.

Using columns to define the page layout
You can use columns for page layout in these ways:• Define the number of columns and their layout on a page, using
page styles.
• Change the number of columns for existing text.

Defining the columns on a page
It is a good idea to define your basic page style (such as Default) withthe most common layout to be used in your document, either singlecolumn or multiple-column. You can then either define extra pagestyles for pages with different numbers of columns or use sections
122

Free eBook Edition

OpenOffice.org 3.x Writer Guide(described in “Using sections for page layout” starting on page 136)
for pages or parts of pages with different numbers of columns.
To define the number of columns on a page:1) Choose Format > Columns or go to the Columns page of the
Page Style dialog box.
2) In the Settings area (Figure 105), choose the number of columns
and specify any spacing between the columns and whether you
want a vertical separator line to appear between the columns. You
can use one of Writer’s predefined column layouts, or you cancreate a customized column layout. The preview box, located to
the right of the Settings area, shows how the column layout willlook.
3) Notice the Apply to box on the right-hand side of the dialog box.
In this case, the changes are being applied to the Default pagestyle.
4) Click OK to save the changes.

Figure 105: Defining the number of columns on a page

Specifying the number of columns
The Settings area displays five predefined column layouts. To use oneof them, click the desired layout.
If you prefer to create a customized column layout, you must specify
the number of columns that you want by entering the desired numberin the Columns box.

Free eBook Edition

Chapter 4 Formatting Pages

123Formatting column width and spacing
To create evenly-spaced columns that are all the same width, select the
AutoWidth option in the Width and spacing area.
To customize the width and spacing of the columns, follow these steps:
1) In the Width and spacing area, deselect the AutoWidth option.
2) On the Width line, enter a width for each column.
3) On the Spacing line, enter the amount of space that you want
between each pair of columns.
If you specify more than three columns, use the arrow keys on the
Column line to scroll among the columns.

Formatting separator lines
To display separator lines between the columns:
1) Eighteen separator line options exist: None or various lines ofthicknesses which range from 0.05 to 9 pt). From the Line dropdown list in the Separator line area, select the type of line thatyou want. (1 pt = 1 point = 1/12 pica = 1/72 inch = 127/360 mm= 0.3527 mm.)2) The default format is for the separator lines to have the sameheight as the columns. If you want the separator lines to be
shorter than the columns, use the Height box to enter the heightof the separator lines as a percentage of the height of thecolumns. For example, if you enter 50%, the separator lines will
be half as high as the columns.
3) If you entered a height of less than 100%, use the Position dropdown list to select a vertical alignment for the separator lines.
The vertical-positioning options are: Top, Centered, or Bottom.

Reverting to a single-column layout
To revert to a single-column layout for the page style, go to the
Settings area and either reset the number in the Columns box to 1 orclick the single-column layout icon.

Changing the number of columns for existing text
You might want some parts of a page to have one column and otherparts of the page to have two or more columns. For example, you might
have a page-width headline over a three-column news story.

124

Free eBook Edition

OpenOffice.org 3.x Writer Guide

You can create columns and then type or paste text into them, or you
can select some existing text and change the number of columns fordisplaying it.
When you select text and change the number of columns for that text,
Writer turns the selected text into a section, as described in “Using
sections for page layout” on page 136.

Tip

You cannot select text on a two-column page and change it to asingle column using this method. Instead, you need to define asingle-column page and then select the text you want to be in a
two-column section.

Figure 106 shows the Columns dialog box for a selection. Notice that
the Apply to box on the right-hand side has Selection highlighted andan extra option (Evenly distribute contents to all columns) appears
in the upper left-hand part of the dialog box.

Figure 106: Specifying columns for a selection

Distributing text across columns
As you add text to the section, you will see that the text flows from one
column to the next. You can distribute text across the columns in one of
two ways, as shown in Figure 107:
• Evenly—Writer adjusts the length of the columns to the amountof text, so that all the columns are approximately the same height.
As you add or delete text, the columns readjust.

Free eBook Edition

Chapter 4 Formatting Pages

125• Newspaper-style—Writer fills the columns one at a time,

beginning with the first column. The last column may be shorter
than the others.

Figure 107: (Left) Evenly distributed columns; (Right)
Newspaper-style columns.
To distribute text evenly, select the Evenly distribute contents to allcolumns option in the Settings area. Deselect this option if you want
to distribute text newspaper-style.

Tip

Choose View > Nonprinting Characters (or press Ctrl+F10)
to display end of paragraph markers (¶). Often, unexpectedbehavior of columns is due to extra paragraphs that arenormally invisible to the user but are taking up space.

Using frames for page layout
Frames can be very useful when producing a newsletter or otherlayout-intensive documents. Frames can contain text, tables, multiple
columns, pictures, and other objects.
Use frames when you need to:• Position something in a particular place on a page, for example, alogo or a “stop press” news box in one corner of a page.

126

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Allow text on one page to continue on another page, somewheremore distant than the next one, by linking the content of one
frame to another so the contents flow between them as you edit
the text.
• Wrap text around an object, such as a photograph.
Because OpenOffice.org does not allow you to define page styles withrecurring frames, consider doing some quick sketches of the basic
page layouts you need, indicating the approximate positions ofdifferent frames and their purposes. Try to keep the number ofdifferent page layouts as low as possible in order to avoid chaos in yourdesign.
Pay special attention to the positioning of frames. Many of thepredefined styles default to a center alignment. Although centering all
frames looks reasonably good in most cases but is rarely the best
choice.
One of the most visually effective ways to position a frame is to alignits left margin with that of the paragraph above it. To achieve thiseffect, insert the frame in a blank paragraph of the same style as theparagraph above. Then, select Insert > Frame > Type > Position >Horizontal > From Left to position the frame exactly where you wantit.
You also should think about the type of wrap and the spacing between
the frame and text. Instead of cramming a frame close to the text, use
the Wrap tab to place some white space between them.
You can format frames individually or define and apply frame styles—
see Chapter 7 (Working with Styles).
Example: Using a frame to center text on a page
Although you can center text horizontally as part of a paragraph style
or by using manual formatting, those methods do not work for verticalcentering. To center text vertically, you need to place the text in aframe, anchor the frame to a page or a paragraph, and then center theframe vertically on the page. See “Anchoring frames” on page 130.

Creating frames
You can create a frame in several ways, depending on your needs.
• Choose Insert > Frame) to create an empty frame. The Frame
dialog box (Figure 109) appears. You can click OK and come backto customize it later, or you can set the frame’s characteristics at
this stage.

Free eBook Edition

Chapter 4 Formatting Pages

127• Select text or a graphic, choose Insert > Frame, and click OK tocreate a frame containing the selection. The selected text is
automatically deleted from the normal text flow and inserted into
the frame, and the Frame dialog box appears.
• Insert a picture or other object by selecting Insert > Picture >From file or Insert > Object to start the process to insert apicture or object. The item inserted automatically appears in aframe, but the Frame dialog box does not appear.
• Use the Insert Frame Manually

button on the Insert
toolbar (go to View > Toolbars > Insert to display it), select the
number of frames in the drop-down menu, and drag the mouse to
draw the frame.

Figure 108: Using an icon on the Insert toolbar to create a frame
When you release the mouse button, a box appears
where the cursor is located in the document. This box
represents the frame: an area isolated from the main
document.
To add content to a frame, first deselect the frame by clicking
somewhere else on the page. Then, click inside the frame so that the
cursor shifts its focus there. Now add content just like you would on
the main page. When you are done, deselect the frame.

Moving, resizing, and changing frame attributes
When an object is added to Writer, it is automatically enclosed in aframe of a predetermined type. The frame sets how the object is placedon the page, as well as how it interacts with other elements in the
document. You can edit the frame by modifying the frame style it uses
or by using a manual override when a frame is added to the document.
Frame styles are discussed in Chapter 7 (Working with Styles).
To change the size or location of a frame, first select the frame, thenuse either the mouse or the Frame dialog box (Figure 109). Using themouse is faster but less accurate. You might use the mouse for grosslayout and the dialog box for fine-tuning.
128

Free eBook Edition

OpenOffice.org 3.x Writer Guide

You can resize the frame manually (by clicking on the green squares
and dragging to the appropriate size) or start adding content to it (theframe will resize automatically if, for example, you add a large picture
to it) or go back to the Frame dialog box and set the size and othercharacteristics.
To change the location of the frame using the mouse, drag and drop
one of the edges or put the cursor anywhere within the frame. (The Ibar cursor changes to a four-headed arrow when properly positioned
for a drag-and-drop move.)
To change the size of the frame, drag one of the handles. Drag a handle
on one of the sides to enlarge or reduce the text frame in one
dimension only; drag a corner handle to enlarge or reduce it in bothdimensions.
These resizing actions distort the proportions of the frame. Holding
down the Shift key while dragging one of the handles makes the frame
keep the same proportions.
You can open the Frame dialog box at any time by selecting the frame,
right-clicking, and choosing Frame from the pop-up menu.

Figure 109: Frame dialog box

Free eBook Edition

Chapter 4 Formatting Pages

129

To remove the default border on a newly created frame, open the
Frame dialog box, go to the Borders page, and under Line Style, selectNone. Alternatively, you can assign a borderless style to the frame; see
the Chapter 7 (Working with Styles) for information on frame styles.
Tip

Do not confuse a frame’s border with the text boundaries thatare made visible using the View menu (by selecting View >Text Boundaries).

Figure 110: Removing the border from a frame

Anchoring frames
Using the Frame dialog box (or by right-clicking and pointing to
Anchor), you can anchor a frame to a page, paragraph, or character,or you can anchor it as a character.
To Page
The frame keeps the same position in relation to the page margins.
It does not move as you add or delete text. This method is usefulwhen the frame does not need to be visually associated with aparticular piece of text. It is often used when producing newslettersor other documents that are very layout-intensive. This method is
also used to center text on a page.
To Paragraph
The frame is associated with a paragraph and moves with theparagraph. It may be placed in the margin or another location. Thismethod is useful as an alternative to a table for placing icons besideparagraphs. It is also used to center text on a page in documents
which will be used in a master document (frames anchored to pages
will disappear from the master document).

130

Free eBook Edition

OpenOffice.org 3.x Writer Guide

To Character
The frame is associated with a character but is not in the text
sequence. It moves with the paragraph but may be placed in themargin or another location. This method is similar to anchoring to aparagraph.
As Character
The frame is placed in the document like any other character and,
therefore, affects the height of the text line and the line break. The
frame moves with the paragraph as you add or delete text before theparagraph. This method is useful for adding a small icon in sequencein a sentence. It is also the best method for anchoring a graphic toan empty paragraph so it does not move around the page in
unexpected ways.

Linking frames
You can link frames to each other even when they are on different
pages of a document. The contents will automatically flow from one to
the next. This technique is very useful when designing newsletters,
where articles may need to be continued on a different page.
Note

You cannot link from a frame to more than one other frame.

To link one frame to another:
1) Select the frame to be linked from.
2) Click the Link Frames iconon the object bar.

3) Click the next frame in the series (which must be empty).
When a linked frame is selected, any existing links are indicated by afaint connecting line, as shown in Figure 111. Note that any framelinking line will not be as clear as illustrated in the figure.

Figure 111: Linked frames
The height of a frame that is being linked from is fixed; you can change
this height manually or by using the Frame dialog box, but it does not

Free eBook Edition

Chapter 4 Formatting Pages

131automatically adjust to the size of the contents (that is, the AutoHeight
attribute is disabled). Only the last frame of a chain can adapt its
height to the content.
The Options page of the Frame dialog box shows the names of theselected frame and any frames it is linked to or from. You can change
this information here. On this page, you can also select options toprotect the contents, position, and size of the frame.

Figure 112: Options page of the Frame dialog box
On the Hyperlink page, you can specify the file for the hyperlink to
open. This file can be on your machine, a network, or the Internet.

Figure 113: Hyperlink page of the Frame dialog box
The Wrap, Borders, Background, Columns, and Macro pages of the
Frame dialog box are the same as those for frame styles. Refer to the
Chapter 7 (Working with Styles) for details.

132

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Using tables for page layout
Writer’s tables can serve several purposes, such as holding data as you
might see it in a spreadsheet, lining up material, and creating more
complex page layouts. For information about using tables of data, see
Chapter 9 (Working with Tables).
This topic describes how to achieve some common layouts by using
tables.

Example: Creating sideheads using tables
Sideheads and marginal notes are commonly used in documents fromresumes to computer user guides. The main body of the text is offset toleave white space (usually on the left-hand side) in which the sideheads
or notes are placed. The first paragraph is aligned beside the sidehead,as in Figure 114.
Example of asideheadIn some cases you may want to put only one or two paragraphs inthe table itself and the rest of the text and graphics in ordinary
paragraphs (formatted to line up with the paragraphs in thetable) so that text and graphics will flow more easily from one
page to another when you add or delete material.
In other cases, you might put each paragraph in a separate row of
the table and allow the table to break between pages.

Figure 114: Example of a sidehead
Note

Sideheads can also be created by placing text in a frame using
the Marginalia frame style, as described in the Chapter 7(Working with Styles).

To create a table for use with a sidehead:
1) Place the cursor where you want the table to appear and choose
Insert > Table (Ctrl+F12).
2) In the Insert Table dialog box, define a one-row, two-column tablewith no border and no heading. Click OK to create the table.

Free eBook Edition

Chapter 4 Formatting Pages

133

Figure 115: Defining a two-column borderless table withno header
3) Right-click on the table and choose Table from the pop-up menu.
On the Columns page of the Table Format dialog box, make thecolumns the required width.

Figure 116: Defining a two-column table to line up
with text offset at 1.2 inches
4) On the Table page of the Table Format dialog box (Figure 117), in
the Spacing section, make the Above and Below values the sameas the Top and Bottom spacing you have defined for ordinary
paragraphs of text. Click OK to save your settings.

134

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 117: Defining the space above and below a table

Tip

To check the top and bottom spacing for ordinary paragraphs:
1) Position the cursor in a paragraph and press F11 (unless the
Styles and Formatting window is already open). Check that
the Styles and Formatting window shows paragraph styles(top left button).
2) The current style should be highlighted. If no paragraphstyle is highlighted, select All Styles in the bottom dropdown list. Right-click on it and select Modify from the popup list.
3) Go to the Indents & Spacing page and look in the Spacingarea for the values in Above paragraph and Below
paragraph.

You may also want to turn off number recognition so that Writer will
not try to format numbers if you want them to be plain text. To turnnumber recognition off:
1) Right-click in the table and then click Number Format on the
pop-up menu.
2) On the Number Format dialog box, make sure the Category is set
to Text. Click OK.
Tip

If you use this table format often, you may want to save it as
AutoText, as described in Chapter 3 (Working with Text).
Select the table (not just the contents) to assign the shortcut.

Free eBook Edition

Chapter 4 Formatting Pages

135

Figure 118: Setting number format to Text

Using sections for page layout
A section is a block of text that has special attributes and formatting.
You can use sections to:• Write-protect text
• Hide text
• Dynamically insert the contents of another document• Add columns, margin indents, a background color, or abackground graphic to a portion of your document• Customize the footnotes and endnotes for a portion of yourdocument

Creating sections
To create a section:
1) Place the cursor at the point in your document where you want toinsert the new section. Or, select the text that you want to placein the new section.
2) From the main menu, choose Insert > Section. The Insert
Section dialog box opens.
3) Click the Section tab, if it is not already displayed.
The Insert Section dialog box has five tabbed pages:• Use the Section page to set the section’s attributes.
• Use the Columns page to format the section into columns.
• Use the Indents page to set indents in the right and left marginsof the section.
• Use the Background page to add color or a graphic to thesection’s background.
• Use the Footnotes/Endnotes page to customize the section’sfootnotes and endnotes.
136

Free eBook Edition

OpenOffice.org 3.x Writer GuideAt any time, you can reset a tabbed page to its default settings byclicking the Reset button. (Note, however, that you cannot reset theSection page. If you wish to undo changes to the Section page, youmust do so manually.)
Use the Section page to set the attributes of the current section.

Figure 119: Inserting a section using the Insert Section
dialog box

Naming sections
Writer automatically enters a name for the current section in the top
box of the New section area. To change the name, select it and typeover it. The name is displayed in the Sections category of theNavigator window. If you give your sections meaningful names, you cannavigate to them more easily.

Linking sections
You can insert the contents of another document into the current
section and then have Writer update the section whenever the otherdocument is updated. This is called linking the section to the otherdocument.
To link the current section to another document, follow these steps:
1) In the Link area, select the Link option.

Free eBook Edition

Chapter 4 Formatting Pages

137

Figure 120: Linking sections
2) Click the (...) button to the right of the File name field. The Insert
dialog box opens.
3) Find and select the document you want to insert and then click
the Insert button. The Insert dialog box closes and the name ofthe selected document appears in the File name field.
4) If you want to insert only a section of the selected document,
select the desired section from the Section drop-down list.
Note

The section must already exist in the selected document. You
cannot create a section in the selected document at this point.

You can update links automatically or manually. See “Updating links”
on page 144.

Write-protecting sections
To write-protect the current section so that its contents cannot beedited, select the Protect option in the Write protection area.

Figure 121: Write-protecting sections
Note

Write-protection protects only the section’s contents, not its
attributes or format.

Password-protecting sections
To prevent others from editing the section’s attributes or format,
protect the section with a password, as follows:
1) Select the With password option. The Enter Password dialog box
opens.
2) Type a password in the Password field and then confirm thepassword by typing it again in the Confirm field.

138

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) Click OK. The Enter Password dialog box closes. Anyone whotries to edit the section’s attributes or format will be prompted toenter the password.

Figure 122: Password-protecting a section
Note

Passwords must contain at least five characters. The OK
button remains inactive until you have typed five characters.

Hiding sections
You can hide the current section so that it will not be displayed on thescreen or printed. You can also specify conditions for hiding thesection. For example, you can hide the section only from certain users.
Note

You cannot hide a section if it is the only content on the pageor if the section is in a header, footer, footnote, endnote, frame,or table cell.

To hide a section, select the Hide option in the Hide area.

Figure 123: Hiding sections
To hide the section only under certain conditions, enter the desiredconditions in the With Condition field. The syntax and operators thatyou use to enter conditions are the same ones that you use to enter
formulas. For syntax and a list of operators, see Writer’s online help
under “conditions”.
If the section is write-protected with a password, the password must beentered to hide or reveal the text.

Note

Hiding text is not a secure way to stop someone else reading
it. It will stop the casual reader but will not prevent someone
who actively wants to find out what you have hidden―even if it
is password protected.

Free eBook Edition

Chapter 4 Formatting Pages

139Formatting a section into columns
Use the Columns page of the Insert Section dialog box to format thecurrent section into columns. This page is very similar to the Columns
dialog box shown in Figure 106 on page 125. Please refer to that topic
for details.

Indenting the section from margins
Use the Indents page, pictured in Figure 124, to set indents in theright and left margins of the current section. Enter the desired leftmargin indent in the Before section box. Enter the desired rightmargin indent in the After section box. The preview box on the righthand side of the page shows you how the section will look with theindents applied.

Figure 124: Indenting sections

Changing the background of the section
Use the Background page to add color or a graphic to the backgroundof the current section. This page is similar to the Background pages forparagraphs, frames, tables, and other objects in OOo. For more
information, refer to Chapter 7 (Working with Styles).

Customizing footnotes and endnotes in a section
Use the Footnotes/Endnotes page, pictured in Figure 125, to customize
the current section’s footnotes and endnotes.
Customizing footnotes
If you want the current section’s footnotes to appear separately fromthe other footnotes in the document, select the Collect at end of text
option in the Footnotes area.

140

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo number the current section’s footnotes separately from the otherfootnotes in the document, follow these steps:
1) In the Footnotes area, make sure that the Collect at end of text
option is selected.
2) Select the Restart numbering option.
3) If you want the section’s footnotes to start at a number other than1, enter the desired starting number in the Start at spin box.

Figure 125: Setting footnotes and endnotes for sections
To edit the format of the section’s footnotes, follow these steps:
1) In the Footnotes area, make sure that the Collect at end of text
and Restart numbering options are selected.
2) Select the Custom format option.
3) From the drop-down list under and to the right of the Custom
format option, select a numbering format for the footnotes.
4) To add text to the selected numbering format, use the Before andAfter fields. For example, if you want the footnote numbers to bepreceded by the word “Note” and followed by a colon, fill the
Before and After fields like this:Free eBook Edition

Chapter 4 Formatting Pages

141

Figure 126: Numbering footnotes for sections
Customizing endnotes
If you want the current section’s endnotes to appear at the end of thesection rather than at the end of the document, select the Collect at
end of section option in the Endnotes area.
To number the current section’s endnotes separately from the otherendnotes in the document, follow these steps:
1) In the Endnotes area, make sure that the Collect at end ofsection option is selected.
2) Select the Restart numbering option.
3) If you want the section’s endnotes to start at a number other than1, enter the desired starting number in the Start at spin box.
To edit the format of the section’s endnotes, follow these steps:
1) In the Endnotes area, make sure that the Collect at end ofsection and Restart numbering options are selected.
2) Select the Custom format option.
3) From the drop-down list under and to the right of the Custom
format option, select a numbering format for the endnotes.
4) To add text to the selected numbering format, use the Before andAfter fields, as shown above for footnotes (Figure 126).

Saving a new section
To save a new section so that it appears in your document, click theInsert button. The Insert Section dialog box closes and the newsection appears in your document.

Editing and deleting sections
You can edit a section’s attributes and formatting, and you can alsodelete sections by using Format > Sections.

142

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo select the section that you want to edit or delete, follow these steps:
1) From the main menu, choose Format > Sections. The Edit
Sections dialog box opens.
2) The name of the current section appears in the Section area, inthe field above the list box. If you want to edit or delete a
different section, click the name of the desired section in the list.
The selected section becomes the current section, and its nameappears in the field above the list box.

Figure 127: Edit Sections dialog box

Deleting sections
To delete the current section, click the Remove button.
Note

Writer will not prompt you to confirm the delete! To undo adelete, click the Cancel button.

Editing section attributes
To rename the current section, simply type over its name in the
Section area.
From the Edit Sections dialog box, you can also edit the current
section’s link, write-protect, and hide attributes. To learn how to edit
these attributes, see:
“Linking sections” on page 137.
“Write-protecting sections” on page 138.
“Hiding sections” on page 139.

Free eBook Edition

Chapter 4 Formatting Pages

143

Editing the format of a section
To edit the format of the current section, click the Options button. The
Options dialog box opens.
The Options dialog box has four tabbed pages: Columns, Indents,
Background, and Footnotes/Endnotes. The use of these pages is
described earlier in this topic.
To reset a page to its most recently saved settings, click the Resetbutton.
To save your Options settings and return to the Edit Sections dialog
box, click OK.

Figure 128. Options dialog box for sections

Updating links
You can set Writer to update linked sections automatically, and you canalso update links manually.

Updating links automatically
To set Writer to update links without prompting you, or to turn off
automatic updating, follow these steps:
1) Choose Tools > Options > OpenOffice.org Writer > General.
The dialog box displays general text document settings.

144

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) In the Update area, under Update links when loading, select oneof the following three options:•••

Select Always if you want Writer to update links
automatically, without prompting you, whenever you open adocument that contains links.
Select On request if you want Writer to prompt you before
updating links.
Select Never if you do not want Writer to update links.

3) Click OK to save your settings. The Options dialog box closes.

Updating links manually
To update a link manually:
1) Open the document that contains the link.
2) Choose Edit > Links. The Edit Links dialog box opens.

Figure 129: Edit Links dialog box3) The list in the Edit Links dialog box displays the names of all thefiles that are linked to the current document. Click the file that
corresponds to the link that you want to update.

Free eBook Edition

Chapter 4 Formatting Pages

1454) Click the Update button. The most recently saved contents of thelinked file appear in the current document.
5) To close the Edit Links dialog box, click Close.

Creating headers and footers
Headers are portions of a document that always appear at the top of apage; footers appear at the bottom of a page. Typically, headers display
the title or chapter name of a document.
In OOo, headers are specified by page styles; therefore, when inserted,
all the pages with the same page style will display the same header.
Chapter 7 describes how to format a header as part of the page styleformatting. For the purpose of this example, we will insert a header inthe Default pages using manual formatting.
Select from the main menu Insert > Header > [Page Style]. The
submenu lists the page styles used in your document. In addition, thesubmenu includes the entry All, which activates headers on all thepages of the document regardless of their page style.
For our example, select the Default menu item to activate the headers
only on the pages that use the Default page style. Similarly, to insert afooter, choose Insert > Footer.
CautionThe Insert Menu can also be used for deleting a preexistingheader or footer for a page style. If that page style has a check
mark in front of it, clicking on it opens an OOo dialog box
warning about this and asking whether you want to delete theheader or footer for that particular page style.

Depending on which option you choose, an area will appear at the top
or bottom of the page. In this area you can enter text and graphics thatwill appear on every page.

Figure 130. A page with a page header

146

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Items such as document titles, chapter titles, and page numbers, which
often go into headers and footers, are best added as fields. That way, if
something changes, the headers and footers are all updated
automatically.
Fields are covered in Chapter 14 (Working with Fields), but one
example here may be useful. To insert the document title into theheader:1) Select File > Properties > Description, enter a title for yourdocument in the Title area, and click OK to close the dialog box.
2) Add a header (Insert > Header > Default).
3) Place the cursor in the header part of the page.
4) Select Insert > Fields > Title. The title should appear on a graybackground (which does not show when printed and can beturned off).
5) To change the title for the whole document, choose File >Properties > Description.

Formatting headers and footers
In Writer headers and footers are considered paragraphs and therefore
you can format the header or footer text using the same techniques
you use for formatting text in the main body of the document.

Tip

You can define styles for headers and footers so that you canquickly obtain a consistent formatting in case you use several
page styles. Writer includes three predefined header styles andthree footer styles: generic ones, for left pages, and for rightpages. You can also add custom header and footer styles.

Portrait headers on landscape pages
When you define a header and footer on a landscape page, they will bealigned with the long side of the page. If your landscape pages aregoing to be inserted between portrait pages, you might want theheaders and footers to be on the short sides of the landscape pages, so
the final printed product looks like the contents of the landscape pages
have been rotated 90 degrees on portrait pages.
You can set up portrait headers and footers on landscape pages byusing a trick involving frames. These are a bit tedious to set up, but
once you have done so, you can copy and paste them to otherlandscape pages. There does not appear to be a way to make this partof the landscape page style.

Free eBook Edition

Chapter 4 Formatting Pages

147

To set up portrait headers and footers on landscape pages:
1) Calculate the required margins so the text area of the landscape
page is the same size as the text area on the portrait pages,
taking into account the space for headers and footers on the
portrait pages. For example, consider a book which uses themargins shown in the following table. The landscape right and left
margins are 1 cm larger than the portrait top and bottom
margins, respectively. This difference accounts for the extra spaceused by the portrait header and footer (0.5 cm for the height of
the header or footer and a 0.5 cm gap between the header orfooter and the main text).
Portrait page (right page)

Landscape page (right page)Top margin

1.5 cmRight margin

2.5 cm

Bottom margin

1.5 cmLeft margin

2.5 cmLeft (inner) margin

2.8 cmTop margin

2.8 cmRight (outer) margin

1.8 cm

Bottom margin

1.8 cm2) Create the Landscape page style.
3) Measure the distance from the upper and left edges of the page tothe upper left-hand corner of the space where you want the footer
to appear. Measure the width and length of the space the footer
will occupy (to match footers on portrait pages).

Figure 131: Measuring the location and size of the footer frame
148

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4) In a blank paragraph in the text, type the footer text or insert
fields such as the page number or the chapter number and name—to match the footer text and fields on the portrait pages. Assign
the Footer style to this paragraph so the typeface, font size, andtab settings match those of the footers on the portrait pages.
5) Select the text (including the fields) you just entered. Choose
Format > Character. On the Character dialog box, choose thePosition tab and set Rotation / scaling to 270 degrees(counterclockwise). Click OK.

Figure 132: Rotating the footer text 270 degrees6) With the text still selected, choose Insert > Frame. In the Frame
dialog box, choose the Type tab and enter the width, height, andhorizontal and vertical position for the footer.

Figure 133: Defining the size and position of the footer frame

Free eBook Edition

Chapter 4 Formatting Pages

1497) If your footer has a line above the text, as in this book, on the
Borders page, select a right border and specify the line width andspacing to the frame’s contents.

Figure 134: Specifying the border position, line width,and spacing to contents
8) Click OK to save these settings. The footer should now appear in
the required position and orientation.
Repeat these steps (using appropriate measurements) to set up a
portrait header on the landscape page.

Numbering pages
This section describes techniques to insert page numbers and related
information in a document. Some basic knowledge of page styles,
which are fully described in Chapters 6 and 7, may be needed to follow
some of the examples given.

Preliminaries: fields
OpenOffice.org uses fields to manage page numbers. To insert a page
number field, position the cursor where you want to insert the number
and choose Insert > Fields > Page Number. The page number
appears with a gray background. The gray background denotes a field.
Note

150

The gray background is simply there to denote a field. Thisbackground is not printed. If you wish to turn this feature off,choose View > Field Shadings (or press Ctrl+F8.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

The page number field always displays the page number for the page
where it is placed. If you see the words “Page number” instead of anumber, press Ctrl+F9. This shortcut key toggles OOo between
displaying the field’s contents (what the field is for) and the field’s
results (what the field creates).
Note

For a full introduction to fields, see Chapter 14 (Working withFields).

Preliminaries: insert and format a header
For the purpose of this example, we will insert a header in the Default
page style pages using manual formatting. See “Creating headers andfooters” on page 146.

Simple page numbering
The simplest case is to have the page number at the top of every pageand nothing more. To do this, put the cursor on the header and selectInsert > Fields > Page Number.

Figure 135: Page number inserted in the header
Now the correct page number appears on every page.

Combining header text and page number
There are a lot of interesting variations that you can apply without
further knowledge of page styles. Here are some suggestions:• Right-align the header to make the page number appear on the
top-right.
• Type the word page before the page number field so the header
reads page 1, page 2, and so on. This also requires using thePage Number field, discussed earlier (page 150).

Free eBook Edition

Chapter 4 Formatting Pages

151• Add the document title so the header reads, for example: Peter's

favourite poems, left justified, and page x with rightjustification, where x is the value of the Page Number field.
Consider using a (right-aligned) tab to separate the title from thepage number.
• OOo also has a Page Count field (Insert > Fields > Page
Count). Using it, you could, for example, have a header that
reads page 2 of 12.

These variations are all illustrated in Figure 136.

Figure 136: Variations on the simple page numbering method

Changing the number format
Many more variations are possible. For example, you can set the page
number to display in Roman numerals. To do that, you could doubleclick on the page number and select the desired format; however, abetter choice is to specify the format of numbers in the page style as
explained here.
In the Styles and Formatting window (press F11 if not alreadydisplayed) select the Page Styles icon and right-click on thehighlighted entry for the current style. Select Modify, which opens the
Page Style dialog box.
On the Page page of the Page Style dialog box, in the Layout settings
section, select i, ii, iii, ... from the Format drop-down list.

152

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 137: Changing format of page numbers

Numbering the first page something other than 1
Sometimes you may want to start a document with a page number
greater than 1. For example, you may be writing a book, with eachchapter in a separate file. Chapter 1 may start with page 1, but
Chapter 2 could begin with page 25 and Chapter 3 with page 51.
Follow these instructions to start the page numbering in a document at
a number greater than 1. (These instructions are for a page number ina footer, but you could use a header instead.)Tip

Do not set a starting page number that is an even number
because you will end up with a blank page before the firstpage when you print the file or export it as a PDF.

1) Choose Insert > Footer > [page style] to activate the footer. (Ifthe page style is already selected in the Footer menu, point to it
and click OK in the OpenOffice.org 2.0 dialog box that appears.
Then point to that page style again to select it.)2) The cursor is now in the footer. To insert the page number, choose
Insert > Fields > Page Number. The page number will be 1.
3) Click in the first paragraph in the text area or type a paragraph oftext.
4) Choose Format > Paragraph (or right-click and choose
Paragraph from the pop-up menu) to display the Paragraphdialog box.
5) On the Text Flow page, in the Breaks section, select Insert andselect Page in the Type drop-down list. Select With Page Styleand the page style you are using for the first page of the
document.
6) The Page number field is now active. Type the page number you
want to start with. Click OK to close the Paragraph dialog box.

Free eBook Edition

Chapter 4 Formatting Pages

153

Numbering pages by chapter
Technical documents often include the chapter number with the page
number in the header or footer. For example, 1-1, 1-2, 1-3, ...; 2-1, 2-2,
2-3, ...
To set up this type of page numbering in OOo, you need to do three
things:1) Ensure that your chapter titles are all identified by the same
paragraph style, for example, the Heading1 style.
2) Use Tools > Outline Numbering to tell OOo what paragraphstyle you are using for Level 1 in your outline, and specify “1,2,3”
in the Number box.

Figure 138: Specifying paragraph style and numbering
for chapter titles
3) Insert the chapter number in your document. To do this:a) Place the cursor in the header or footer just before the page
number you inserted earlier, and choose Insert > Fields >Other from the menu bar.
b) On the Fields dialog, go to the Document page. SelectChapter in the Type list, Chapter number in the Format list,and 1 in the Layer box. Click Insert.
c) Type a hyphen or other punctuation between the chapter
number and the page number.

154

Free eBook Edition

OpenOffice.org 3.x Writer Guide

For more information, see “Choosing paragraph styles for outline
levels” and “Including chapter or section information in page headers”
in Chapter 7 (Working with Styles).

Figure 139: Inserting a chapter number field

Restarting page numbering
Often you will want to restart the page numbering at 1, for example, on
the page following a title page or a table of contents. In addition, many
documents have the front matter (such as the table of contents)
numbered with Roman numerals and the main body of the document
numbered in Arabic numerals, starting with 1.
You can restart page numbering in two ways.
Method 1:
1) Place the cursor in the first paragraph of the new page.
2) Choose Format > Paragraph.
3) On the Text Flow page of the Paragraph dialog box (Figure 102 on
page 121), select Insert in the Breaks area.
4) In the Type drop-down list, select Page.

Free eBook Edition

Chapter 4 Formatting Pages

1555) In the Position drop-down list, select Before or After to position
where you want to insert the page break.
6) Select With Page Style and specify the page style to use.
7) Specify the page number to start from and then click OK.
Method 2:
1) Place the cursor in the first paragraph of the new page.
2) Choose Insert > Manual break.
3) Page break is the default selected on the Insert Break dialog
box.

Figure 140: Restarting page numbering
after a manual page break4) Choose the required page in the Style drop-down list.
5) Select Change page number.
6) Specify the page number to start from and then click OK.

Example: Restart page numbering: a preface
A standard preface has the following properties:• Page numbers are displayed in Roman numerals (i, ii, iii, iv, …).
• After the preface, the document starts on a Default page.
• The page number resets to 1, and the number format becomesArabic (1, 2, 3, 4, …).
Resetting the page number requires page breaks.
First, let’s get the preliminary work done for the Preface style:
1) Create a new page style and name it Preface.
2) Set its Next Style to Preface because a preface could span
multiple pages.

156

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) Add a header to Preface and insert the Page Number field. Make
the page numbers display as Roman numerals (i, ii, iii, iv, …):a) Open the page style window for Preface (if not already open)
and click the Header tab. Select Header on under Header.
b) Click the Page tab. Under Layout settings, in the Format
drop-down list, set the format to i, ii, iii, …. Click OK to closethe dialog box.

Figure 141: Set page number format to Roman numerals.
After the preface is written, we are ready to restart the page
numbering in the main body of the document to Arabic numerals.
Follow these steps:
1) Make an empty paragraph at the very end of the preface.
2) Put the cursor on the blank line.
3) Choose Insert > Manual Break.
4) Select Page break and choose the Default style.
5) Select the Change page number option and set the new value to
1. Click OK to close the dialog box.
These settings are shown in Figure 142.

Free eBook Edition

Chapter 4 Formatting Pages

157

Figure 142: Set the new page number
to 1 and the page style to Default.

Note

You cannot assign an odd page number to a left page or aneven page number to a right page. OOo strongly adheres tothe convention that odd page numbers go on right-hand pages
and even page numbers on left-hand pages.

This change is also reflected on the status bar. The Page section of thestatus bar now includes both the total page count and the entry of thepage number field.

Figure 143: Page number in the status bar

Problems with restarting page numbering
Restarting page numbering may lead to two problems.
• The Statistics page in the document’s Properties (File >Properties) always displays the total number of pages in the
document, which may not be what you want to appear in the Page
Count field.
• When page numbering is restarted, OOo always makes oddnumbered pages to be on the right and even-numbered pages tobe on the left. It does this by inserting a blank page, if necessary.
Sometimes this blank page is not desired, particularly whencreating PDFs or when printing single sided.
158

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Solving the page count problem
Suppose you know exactly how many pages are not to be included in
the page count. (You want one page to be excluded in the page countfor the following example.)
Instead of inserting a Page Count field, you can do the following:
1) Position the cursor where you want the page count to appear.
2) Press F2 to open the formula bar, just above the horizontal ruler
in the main Writer window (see Figure 144).
3) After the equal sign, type page –1. If you want to exclude several
pages, substitute the number of excluded pages for 1 in theformula.
4) Press Enter to close the formula bar and insert the resulting field
into the document.

Figure 144: Formula bar
If you do not know the total number of pages in advance, then one
approach is to create a bookmark on the last page and then insert across reference to it.
To create a bookmark on the last page:
1) Go to the last page (Ctrl+End).
2) Choose Insert > Bookmark.
3) In the Insert Bookmark dialog box, type a name for the bookmark,for example LastPage. Click OK.

Figure 145: Inserting a bookmark.

Free eBook Edition

Chapter 4 Formatting Pages

159

To insert a cross-reference to the last page in the header or footer
where you want to refer to the total number of pages:
1) Position the cursor at the desired location—for example after the
space added after of in the header or footer, as in page xx of yy.
2) Choose Insert > Cross-reference.
3) On the Cross-references page of the Fields dialog box, selectBookmarks in the Type column and LastPage in the Selection
column. LastPage now appears in the Name box.
4) In the Insert Reference to box, select As page style. Click Insert.

Note

Do not delete the bookmark at the end of the document. If you
do, the cross-reference will not work.
If a field, such as a cross-reference, does not automatically
update, select the text containing the field and press F9.

Figure 146: Inserting a cross-reference to a bookmarkon the last page of a document

160

Free eBook Edition

OpenOffice.org 3.x Writer GuideNumbering portrait and landscape pages
To create page numbers on portrait and landscape pages in the sameplace and orientation:
1) Refer to “Portrait headers on landscape pages” on page 147 tocreate a landscape page style and landscape header or footer
styles. When creating the page style, select the Use dynamic
spacing option in the Spacing area in the Header or Footer pagesof the Page Style dialog box.
2) Insert the page break and choose the landscape page style; do notchange the page numbering.
3) In the relevant header or footer, insert the page number field(Insert > Fields > Page Number).

Defining borders and backgrounds
You can apply borders and backgrounds to many elements in Writer.
Paragraphs, pages, frames, sections, page styles, paragraph styles, andframe styles can include both borders and backgrounds; characterstyles, tables of contents, and indexes can include backgrounds only.
The dialog box pages for borders and backgrounds are similar in eachcase. To illustrate their use, we will define a border and backgroundfor a text frame.

Tip

Page backgrounds fill only the area within the margins,
including the header or footer (if any). To extend the backgroundcolor or graphic into the margins, you need to define a frame of
appropriate size and position, anchor it to the page or aparagraph, and send it to the background. For more aboutanchoring frames, see Chapter 8 (Working with Graphics).

Adding a border
To begin, select the frame, right-click, and choose Frame from the popup menu. Choose the Borders tab.
Borders have three components: where they go, what they look like,and how much space is left around them.
• Line arrangement specifies where the borders go. Writer provides
five default arrangements but you can just as easily click on theline you want to customize in the User-defined area to get exactly
what you want. Each line can be individually formatted.

Free eBook Edition

Chapter 4 Formatting Pages

161

Figure 147: Frame dialog box: Borders page
• Line specifies what the border looks like: the style and color.

There are a number of different styles and colors to choose from.
The Line Style and Color will apply to those borders highlighted
by a pair of black arrows in the User-defined map on the left handside of the dialog box.
• Spacing to contents specifies how much space to leave between
the border and the contents of the element. Spaces can be
specified to the left, right, above, and below. Check Synchronize
to have the same spacing for all four sides. This spacing is like a
padding and it is not factored in when calculating the text
measurements.
• Shadow style properties always apply to the whole element. A
shadow has three components: where it is, how far from theelement it is cast, and what color it is.

Adding color to the backgroundIn the Frame dialog box, choose the Background page. Here you can
add color or a graphic.
To add color to the background, select from the color grid. You canadjust the transparency of the color to make any text easier to read.

162

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 148. Frame dialog box: Background page showing
color choices

Adding a graphic to the backgroundTo add a graphic to the background:
1) From the As drop-down list on the Background page, selectGraphic. The page now displays the graphics options.
2) Click the Browse button. The Find Graphics dialog box opens.
3) Find the file you want and then click the Open button. The Find
Graphics dialog box closes and the selected graphic appears in
the preview box on the right-hand side of the Background tab. (Ifyou do not see the graphic, select the Preview option.)
4) To embed the graphic in your document, deselect Link. To link
the graphic to the document but not embed it, select Link. For
more about linking graphics, see Chapter 8 (Working with
Graphics).
5) In the Type area, choose how you want the background graphic toappear:•To position the graphic in a specific location, select Position
and then click the desired location in the position grid.
•
To stretch the graphic to fill the entire background area,
select Area.

Free eBook Edition

Chapter 4 Formatting Pages

163

•

To repeat the graphic across the entire background area,
select Tile.

6) In the Transparency area, you can adjust the transparency of thegraphic. This adjustment is often necessary to make any text
easier to read.

Figure 149. Graphic options on the Background page of
the Frame dialog box

Deleting color or graphics from the backgroundTo delete color or graphics from the background:
1) From the As drop-down list, select Color.
2) Click No Fill on the color grid.

164

Free eBook Edition

OpenOffice.org 3.x Writer Guide

5

Chapter
Printing, Exporting,Faxing, and E-MailingFree eBook Edition

Introduction
General information about printing and faxing documents from OOo is
provided in the Getting Started guide. This chapter describes someitems of particular interest to users of Writer.

Quick printing
Click the Print File Directly icon
to send the entire document to
the default printer defined for your computer.

Note

You can change the action of the Print File Directly icon tosend the document to the printer defined for the document
instead of the default printer for the computer. Go to Tools >Options > Load/Save > General and select the Loadprinter settings with the document option.

Controlling printing
For more control over printing, use File > Print to display the Print
dialog box.

Figure 150. The Print dialog box
On the Print dialog box, you can choose:• Which printer to use (if more than one are installed on yoursystem) and the properties of the printer—for example,
orientation (portrait or landscape), which paper tray to use, and
166

Free eBook Edition

OpenOffice.org 3.x Writer Guidewhat paper size to print on. The properties available depend on
the selected printer; consult the printer’s documentation for
details.
• What pages to print, how many copies to print, and in what orderto print them.
•Use dashes to specify page ranges and commas or semicolons
to separate ranges; for example: 1, 5, 11–14, 34–40.
•
Selection is the highlighted part of a page or pages.
• What items to print. Click the Options button to display the

Printer Options dialog box.

Figure 151. Printer Options dialog box

Selecting print options for a document
Selections on the Printer Options dialog box (Figure 151) apply to thisprinting of this document only. To specify default printing options forWriter, see “Selecting default print options” on page 168.
Some items of interest on the Printer Options dialog box include:• In the Contents section, you might choose not to print graphics or
page background in drafts, for example (to save toner or ink).
• In the Pages section, you can choose:–
Print only left (even-numbered) pages or only right (oddnumbered) pages. These settings are useful when you want toprint on both sides of the page, but do not have a printer that
handles this automatically.
–
Print in reversed page order.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

167

–

Brochure—the results of this selection are discussed in“Printing a brochure” on page 170.

• In the Notes section, you can choose whether to print any notesthat have been added to your document (using Insert > Note),
and where to print the notes.

Selecting default print options
Selections on the Printer Options dialog box over-ride any default
settings. To specify default settings for printing, use Tools > Options> OpenOffice.org Writer > Print. The page displayed contains thesame choices as the Printer Options dialog box.
Other printer settings are found in Tools > Options >OpenOffice.org > Print, as shown in Figure 152. Use this page to
specify quality settings for printing, and whether to have OOo warn
you if the paper size or orientation of your document does not match
the printer settings.

Figure 152. Print options for OpenOffice.org

Printing in black and white on a color printerYou may wish to print documents in black and white on a color printer,to save expensive color ink or toner. Common uses are for drafts or
documents to be photocopied in black and white. Several choices areavailable.
To print the current document in black and white or grayscale:1) Click File > Print to open the Print dialog box (Figure 150).
168

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) Click Properties to open the properties dialog box for the printer.
The available choices vary from one printer to another, but you
should find an option for Color. See your printer’s help or user
manual for more information.
3) The choices for color may include black and white or grayscale.
Choose one of these. Grayscale is best if you have any graphics inthe document. Click OK to confirm your choice and return to thePrint dialog box, then click OK again to print the document.
To set up OOo to print all color text and graphics as grayscale:1) Click Tools > Options > OpenOffice.org > Print to display the
dialog box shown in Figure 152.
2) Select the Convert colors to grayscale checkbox. Click OK tosave the change.
To set up Writer to print all color text as black, and all graphics asgrayscale:1) Click Tools > Options > OpenOffice.org Writer > Print.
2) Under Contents, select the Print black checkbox. Click OK tosave the change.

Previewing pages before printing
The normal page view in Writer shows you what each page will look
like when printed, but it shows only one page at a time. If you aredesigning a document to be printed double-sided, you may want to see
what facing pages look like. Writer provides two ways to do this:• View Layout (editable view) —see Chapter 1 (Introducing Writer).
• Page Preview (read-only view) —from which you can also print
multiple pages onto one sheet of paper.
To use Page Preview:1) Click File > Page Preview, or click the Page Preview button.
The Writer window changes to display the current page and thefollowing page, and shows the Page Preview toolbar in place of
the Formatting toolbar.

Figure 153. Page Preview toolbar
2) Click the Book Preview icon
their correct orientation.

to display left and right pages inFree eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing1693) To print the document in this page view, click the Print pageview icon
to open the Print dialog box (Figure 150). Choose
your options and click OK to print as usual.
4) To choose margins and other options for the printout, click thePrint options page view icon
dialog box.

to display the Print Options

Figure 154. Print Options dialog box

Printing a brochure
You can print a document with two pages on each side of a sheet ofpaper, arranged so that when the printed pages are folded in half, thepages are in the correct order to form a booklet or brochure.
To print a brochure on a single-sided printer:
1) Plan your document so it will look good when printed half size(choose appropriate margins, font sizes, and so on). Click File >Print. In the Print dialog box (Figure 150), click Properties andbe sure the printer is set to the same orientation (portrait orlandscape) as specified in the page setup for your document.
(Usually the orientation does not matter, but it does forbrochures.)2) Click Options. In the Pages section of the Printer Options dialog
box (Figure 151), choose Brochure and Right pages. Click OK
twice to print the first side of each page.
3) Flip the pages and put them back into the printer, in the correctorientation to print on the blank side. You may need toexperiment a bit to find out what the correct arrangement is foryour printer.
170

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4) Click File > Print and check Properties to make sure the printersetup is still correct.
5) Click Options again. In the Pages section of the Printer Options
dialog box, choose Brochure and Left page. Click OK twice toprint the second sides.
6) If your printer can do double-sided, then click on the checkboxes
for Left pages, Right pages, and Brochure, and it should not
only do those but collate too.

Printing envelopes
Printing envelopes involves two steps: setup and printing.
To set up an envelope to be printed by itself or with your document:
1) Click Insert > Envelope from the menu bar.
2) In the Envelope dialog box, start with the Envelope tab. Verify,
add, or edit the information in the Addressee and Sender boxes(the “from” on the envelope).

Figure 155. Choosing addressee and sender
information for an envelope

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

171

You can type information directly into the Addressee and Senderboxes, or use the right-hand drop-down lists to select the
database or table from which you can draw the envelope
information, if desired. See Chapter 11 (Using Mail Merge) for
details on how to print envelopes from a database.
3) On the Format page, verify or edit the positioning of theaddressee and the sender information. The preview area on thelower right shows the effect of your positioning choices.

Figure 156. Choosing positioning and size ofelements for an envelope
To format the text of these blocks, click the Edit buttons to theright. In the drop-down list you have two choices: Character andParagraph.
•
In Character, you can choose Fonts (Sizes...), Fonts Effects(Underlining, Color...), Position (Rotating/scaling...),
Hyperlink, Background and more.
•

In Paragraph, you can choose Indents & Spacing, Alignment,
Text Flow, Tabs, Drop Caps, Borders and Backgrounds.

4) In the lower left of this page, choose the envelope format from thedrop-down list. The width and height of the selected envelope
then show in the boxes below the selected format. If you chose apre-existing format, just verify these sizes. If you chose User
defined in the Format list, then you can edit the sizes.
172

Free eBook Edition

OpenOffice.org 3.x Writer Guide

5) After formatting, go to the Printer page to choose printer options
such as envelope orientation and shifting. You may need toexperiment a bit to see what works best for your printer.
You can also choose a different printer or alter printer setup (forexample, specify the tray that holds envelopes) for this print job.

Figure 157. Choosing printer options for an envelope
6) When you have finished formatting and are ready to print, click
either the New Doc or Insert button to finish. New Doc makes
only an envelope or starts a new document with the envelope.
Insert puts the envelope into your existing document as page 1.
To not proceed with this envelope, click Cancel or press the Esc
key. You can also click Reset to remove your changes and returnto the original settings when the dialog box opened.
When the Envelope dialog box closes, you are returned to yourdocument, which now has the envelope in the same file as the
document. Save this file before you do anything else.
To print the envelope:1) Choose File > Print from the menu bar.
2) On the Print dialog box, under Print range, choose Pages andtype 1 in the box. Click OK to print.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing173

Printing labels
Labels are commonly used for printing address lists (where each labelshows a different address), but they can also be used for making
multiple copies of one label only, for example return-address stickers.
To print labels:
1) Choose File > New > Labels on the menu bar. The Labels dialog
box opens.
2) On the Labels page, fill in your own label text in the Inscriptionbox, or use the Database and Table drop-down lists to choose
the required information, as described in Chapter 11 (Using Mail
Merge).

Figure 158. Labels dialog box, Labels page3) Select the label stock in the Brand drop-down list. The types forthat brand then appear in the Type drop-down list. Select the size
and type of labels required. You can also select User in the Typedrop-down list and then make specific selections on the Format
page.
4) On the Format page, choose the pitch, sizes, margins, columns
and rows for user-defined labels, or just verify with a brand oflabel stock you have loaded into the printer.
174

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 159. Labels dialog box, Format page5) Click Save to save your new format.
6) On the Options page, choose to print the entire page of labels or
one single label, then select which one by the column and row.
You can also change printer setup.

Figure 160. Labels dialog box, Options page7) When you have finished formatting, click New Document tomake your sheet of labels or click Cancel (or press the Esc key).
You can also click Reset to remove your changes and return tothe original settings when the dialog box opened.
8) You can print right away using the Print File Directly icon on
the toolbar or by choosing File > Print from the menu bar, or you
can save the file to print later.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

175

Sending a fax
To send a fax directly from OpenOffice.org, you need a fax modem anda fax driver that allows applications to communicate with the fax
modem.

Sending a fax through the Print dialog box1) Open the Print dialog box (Figure 150) by choosing File > Print
and select the fax driver in the Name list.
2) Click OK to open the dialog box for your fax driver, where you canselect the fax recipient.

Adding a Fax icon to the toolbar (advanced)
You can set up a toolbar icon so that a single click sends the current
document as a fax. To add an icon for this purpose to a toolbar, see
Chapter 17 (Customizing Writer).

Exporting to PDF
OpenOffice.org can export documents to PDF (Portable Document
Format). This industry-standard file format for file viewing is ideal for
sending the file to someone else to view using Acrobat Reader or other
PDF viewers. Unlike exporting to other formats, PDF documents will
look exactly as the document appears on your screen. The only
limitation of PDF is that the recipient will not be able to edit the
document.

Quick export to PDF
Click the Export Directly as PDF icon
to export the entire
document using the default PDF settings. You are asked to enter the
file name and location for the PDF file, but you do not get a chance tochoose a page range, the image compression, or other options.

Controlling PDF content and quality
For more control over the content and quality of the resulting PDF, use
File > Export as PDF. The PDF Options dialog box opens. This dialog
box has five pages (General, Initial View, User Interface, Links, andSecurity). Make your selections, and then click Export. Then you are

176

Free eBook Edition

OpenOffice.org 3.x Writer Guideasked to enter the location and file name of the PDF to be created, andclick Save to export the file.

General page of PDF Options dialog box
On the General page (Figure 161), you can choose which document
pages to include in the PDF, the type of compression to use for images(which affects the quality of images in the PDF), and other options.
Range section• All: Exports the entire document.
• Pages: To export a range of pages, use the format 3-6 (pages 3 to6). To export single pages, use the format 7;9;11 (pages 7, 9, and11). You can also export a combination of page ranges and single
pages, by using a format like 3-6;8;10;12.
• Selection: Exports whatever material is selected.

Figure 161: General page of PDF Options dialog box

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

177

Images section• Lossless compression: Images are stored without any loss ofquality. Tends to make large files when used with photographs.
Recommended for other kinds of images or graphics.
• JPEG compression: Allows for varying degrees of quality. A
setting of 90% works well with photographs (small file size, little
perceptible loss of quality).
• Reduce image resolution: Lower-DPI (dots per inch) images
have lower quality. For viewing on a computer screen generally aresolution of 72dpi (for Windows) or 96dpi (GNU/Linux) is
sufficient, while for printing it is generally preferable to use atleast 300 or 600 dpi, depending on the capability of the printer.
Higher dpi settings greatly increase the size of the exported file.
Note

EPS images with embedded previews are exported only as
previews. EPS images without embedded previews areexported as empty placeholders.

General section• PDF/A-1: PDF/A is an ISO standard established in 2005 for longterm preservation of documents, by embedding all the pieces
necessary for faithful reproduction (such as fonts) whileforbidding other elements (including forms, security, encryption,and tagged PDF). If you select PDF/A-1, the forbidden elements
are greyed-out (not available). Because the fonts are embedded in
the PDF file, the document will appear as the author intended
even if the machine where it is viewed does not support thechosen font types.
• Tagged PDF: Exports special tags into the corresponding PDF
tags. Some tags that are exported are table of contents,
hyperlinks, and controls. This option can increase file sizes
significantly.
• Create PDF form - Submit format: Choose the format ofsubmitting forms from within the PDF file. This setting overrides
the control’s URL property that you set in the document. There is
only one common setting valid for the whole PDF document: PDF(sends the whole document), FDF (sends the control contents),
HTML, and XML. Most often you will choose the PDF format.
• Export bookmarks: Creates PDF bookmarks for all outline
paragraphs and for all table of contents entries for which you
assigned hyperlinks.

178

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Export comments: Exports comments in Writer and Calc

documents as PDF notes. You may not want this!
• Export automatically inserted blank pages: If selected,
automatically inserted blank pages are exported to the PDF. Thisis best if you are printing the PDF double-sided. For example,
books usually have chapters set to always start on an oddnumbered (right-hand) page. When the previous chapter ends onan odd page, OOo inserts a blank page between the two odd
pages. This option controls whether to export that blank page.

Initial View page of PDF Options dialog box
On the Initial View page, you can choose how the PDF opens by default
in a PDF viewer. The selections should be self-explanatory.

Figure 162: Initial View page of PDF
Options dialog box

User Interface page of PDF Options dialog box
On the User Interface page (Figure 163), you can choose more settings
to control how a PDF viewer displays the file. Some of these choices
are particularly useful when you are creating a PDF to be used as apresentation or a kiosk-type display.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

179

Window options section• Resize window to initial page. Causes the PDF viewer window
to resize to fit the first page of the PDF.
• Center window on screen. Causes the PDF viewer window to becentered on the computer screen.
• Open in full screen mode. Causes the PDF viewer to open fullscreen instead of in a smaller window.
• Display document title. Causes the PDF viewer to display the
document’s title in the title bar.

Figure 163: User Interface page of PDF Options
dialog box
User interface options section• Hide menubar. Causes the PDF viewer to hide the menu bar.
• Hide toolbar. Causes the PDF viewer to hide the toolbar.
• Hide window controls. Causes the PDF viewer to hide otherwindow controls.
Bookmarks
Select how many heading levels are displayed as bookmarks, if
Export bookmarks is selected on the General page.

180

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Links page of PDF Options dialog box
On this page you can choose how links in documents are exported to
PDF.

Figure 164: Links page of PDF Options dialog box
Export bookmarks as named destinations
If you have defined Writer bookmarks, this option exports them as“named destinations” to which Web pages and PDF documents canlink.
Convert document references to PDF targets
If you have defined links to other documents with OpenDocument
extensions (such as .ODT, .ODS, and .ODP), this option converts thefiles names to .PDF in the exported PDF document.
Export URLs relative to the file system
If you have defined relative links in a document, this option exports
those links to the PDF.
Cross-document links
Set up the behavior of the PDF links to other files. Select one among
the following alternatives:• Default mode: The PDF links will be handled as specified in youroperating system.
• Open with PDF reader application: Use the same application
used to display the PDF document to open linked PDF documents.
• Open with Internet browser: Use the default Internet browser
to display linked PDF documents.

Security page of PDF Options dialog box
PDF export includes options to encrypt the PDF (so it cannot be
opened without a password) and apply some digital rights management(DRM) features.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

181

• With an open password set, the PDF can only be opened with the

password. Once opened, there are no restrictions on what theuser can do with the document (for example, print, copy, orchange it).
• With a permissions password set, the PDF can be opened byanyone, but its permissions can be restricted. See Figure 165.
• With both the open password and permission password set, thePDF can only be opened with the correct password, and its
permissions can be restricted.
Note

Permissions settings are effective only if the user’s PDF viewer
respects the settings.

Figure 165: Security page of PDF Options dialog box
Figure 166 shows the pop-up dialog box displayed when you click the
Set open password button on the Security page of the PDF Options
dialog box.

182

Free eBook Edition

OpenOffice.org 3.x Writer Guide

After you set a password for permissions, the other choices on the
Security page (shown in Figure 165) become available. These
selections should be self-explanatory.

Figure 166: Setting a password to encrypt a PDF

Exporting to XHTMLOOo uses the term “export” for some file operations involving a changeof file type. OOo can export files to XHTML. Other formats may bemade available through extensions.
To export to XHTML, choose File > Export. On the Export dialog,
specify a file name for the exported document, then select the XHTML
in the File format list and click the Export button.

E-mailing Writer documents
OOo provides several ways to quickly and easily send a Writer
document as an e-mail attachment in one of three formats: .ODT(OpenDocument Text, Writer’s default format), .DOC (Microsoft Word
format), or PDF.
To send the current document in .ODT format:
1) Choose File > Send > Document as E-mail. Writer opens the email program specified in Tools > Options > Internet > Email. The document is attached.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

183

2) In your e-mail program, enter the recipient, subject, and any text
you want to add, then send the e-mail.
File > Send > E-mail as OpenDocument Text has the same effect.
If you choose E-mail as Microsoft Word, Writer first creates a .DOC
file and then opens your e-mail program with the .DOC file attached.
Similarly, if you choose E-mail as PDF, Writer first creates a PDF
using your default PDF settings (as when using the Export Directly as
PDF toolbar button) and then opens your email program with the .PDF
file attached.

E-mailing a document to several recipients
To e-mail a document to several recipients, you can use the features inyour e-mail program or you can use OOo’s mail merge facilities toextract email addresses from an address book.
You can use OOo’s mail merge to send e-mail in two ways:• Use the Mail Merge Wizard to create the document and send it.
See Chapter 11 (Using Mail Merge) for details.
• Create the document in Writer without using the Wizard, then use
the Wizard to send it. This method is described here.
To use the Mail Merge Wizard to send a previously-created Writer
document:
1) Open the document in Writer. Click Tools > Mail Merge Wizard.
On the first page of the wizard, select Use the current
document and click Next.

Figure 167: Select starting document

184

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) On the second page, select E-mail message and click Next.

Figure 168: Select document type3) On the third page, click the Select Address List button. Selectthe required address list (even if only one is shown) and then click
OK. (If the address list you need is not shown here, you can click
Add to find and add it to the list.)

Figure 169: Selecting an address list4) Back on the Select address list page, click Next. On the Create
salutation page, deselect the checkbox by This document
should contain a salutation.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

185

Figure 170: Deselecting a salutation
5) In the left-hand list, click 8. Save, print or send. OOo displays a“Creating documents” message and then displays the Save, print
or send page of the Wizard.
6) Select Send merged document as E-Mail. The lower part of thepage changes to show e-mail settings choices.
7) Type a subject for your email and click Send documents. OOosends the e-mails.

Figure 171: Sending a document as an email message

186

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Digital signing of documents
To sign a document digitally, you need a personal key, the certificate. A
personal key is stored on your computer as a combination of a private
key, which must be kept secret, and a public key, which you add to yourdocuments when you sign them. You can get a certificate from acertification authority, which may be a private company or agovernmental institution.
When you apply a digital signature to a document, a kind of checksum
is computed from the document’s content plus your personal key. The
checksum and your public key are stored together with the document.
When someone later opens the document on any computer with arecent version of OpenOffice.org, the program will compute thechecksum again and compare it with the stored checksum. If both are
the same, the program will signal that you see the original, unchanged
document. In addition, the program can show you the public key
information from the certificate. You can compare the public key withthe public key that is published on the web site of the certificate
authority.
Whenever someone changes something in the document, this change
breaks the digital signature.
On Windows operating systems, the Windows features of validating asignature are used. On Solaris and Linux systems, files that aresupplied by Thunderbird, Mozilla or Firefox are used. For a moredetailed description of how to get and manage a certificate, andsignature validation, see “Using Digital Signatures” in the OOo Help.
To sign a document:
1) Choose File > Digital Signatures.
2) If you have not saved the document since the last change, amessage box appears. Click Yes to save the file.
3) After saving, you see the Digital Signatures dialog box. Click Add
to add a public key to the document.
4) In the Select Certificate dialog box, select your certificate andclick OK.
5) You see again the Digital Signatures dialog box, where you can
add more certificates if you want. Click OK to add the public key
to the saved file.
A signed document shows an iconin the status bar. You can doubleclick the icon to view the certificate.

Free eBook Edition

Chapter 5 Printing, Exporting, Faxing, and E-Mailing

187

6

ChapterIntroduction to Styles
Paragraph, Page, Character, and List Styles

Free eBook Edition

What are styles?
Most people are used to writing documents according to physicalattributes. For example, you might specify the font family, font size,
and weight (for example: Helvetica 12pt, bold).
Styles are logical attributes. We use styles every day. For example,
there are two styles of personal computer: desktop and laptop. Eachhas its own distinctive set of properties. You never say “my computer isa low-weight, one-piece unit with an LCD screen attached to arectangular casing containing the computing components and the
keyboard”. Instead, you could say that you have a laptop.
OpenOffice.org (OOo) styles are a way to do the same thing for yourdocument. Using styles means that you could stop saying “font size
14pt, Times New Roman, bold, centered” and start saying “title” fordescribing that particular font usage. In other words, styles mean thatyou shift the emphasis from what the text looks like to what the text is.

Why use styles?
Styles help improve consistency in a document. They also make major
formatting changes easy. For example, you might decide to change theindentation of all paragraphs or change the font of all titles. For a long
document, this simple task could be prohibitive. Styles make the taskeasy.
The time is 9:50 AM, and Jane is finishing the 30-page paper forschool that is due at 10:00 AM. 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 thefirst.
• Even-numbered pages must have a wider right margin, andodd-numbered pages must have a wider left margin.
Thankfully, Jane used OOo Writer and styles. She makes all thechanges in only two minutes and hands in the paper on time.

Free eBook Edition

Chapter 6 Introduction to Styles

189

Style categories
OOo Writer has five style categories:• Paragraph styles affect entire paragraphs represented with thosestyles.
• Character styles affect a block of text inside a paragraph.
• Page styles affect page formatting (page size, margin, and thelike).
• Frame styles affect frames and graphics.
• List styles affect outlines, numbered lists, and bulleted lists.
In the same way that characters are the building blocks for creatingwords, paragraphs are the building blocks of every document.
Headings (subheads) are paragraphs; headers, footers, and numberedlists are also paragraphs. Paragraph styles are, therefore, the mostfrequently used styles and are the ones treated in more detail in thisand the next chapter.

The Styles and Formatting window
Styles are available through a floating or dockable window called
Styles and Formatting, shown in Figure 172. This window is at thecenter of styles management. Do not worry if, at first, some contents ofthis section seem obscure while progressing through this or the next
chapter. This guide describes how to use all these functions.

Figure 172: Styles and Formatting window buttons

190

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo open the Styles and Formatting window, do any one of thefollowing:• Click on theicon located at the left-hand end of theFormatting toolbar.
• Select Format > Styles and Formatting.
• Press F11.
Tip

You can move the Styles and Formatting window to aconvenient position on the screen or dock it to an edge.

Style selection basics
The first five icons at the top of the Styles and Formatting window
select the category of styles to work on. Click on one of these icons todisplay a list of styles in that category, such as paragraph or characterstyles, in the main window.
To apply a character style to existing text, select the text and thendouble-click on the name of the style in the Character Styles list. To
apply any other style, put the cursor in the paragraph, frame, or page
you want to modify and double-click on the name of the style in thecorresponding section. You can select more than one paragraph orframe and apply the same style to all of them at the same time.

Using Fill Format mode
The sixth icon at the top of the Styles and Formatting window activates
the Fill Format mode. Use Fill Format to apply a style to many different
areas quickly without having to go back to the Styles and Formatting
window and double-click every time. This method is useful forformatting many scattered paragraphs, words, or other items with thesame style, and it may be easier to use than making multiple selections
first and then applying a style to all of them.
1) Open the Styles and Formatting window (Figure 172) and select astyle.
.
2) Click the Fill Format Mode icon
3) To apply a paragraph, page, or frame style, hover the mouse overthe paragraph, page, or frame and click. To apply a characterstyle, hold down the mouse button while selecting the characters.
Clicking on a word applies the character style for that word.
4) Repeat step 3 until you have made all the changes for that style.

Free eBook Edition

Chapter 6 Introduction to Styles

1915) To quit the Fill Format mode, click the icon again or press the Esc
key.
CautionWhen this mode is active, a right-click anywhere in the
document undoes the last Fill Format action. Be careful notto accidentally right-click and mistakenly undo actions you
want to keep.

New Style from Selection, Update Style, and Load
Styles functions
The last button in the toolbar of the Styles and Formatting window is amultipurpose button that gives access to three different functions: New
Style from Selection, Update Style, and Load Styles.

Using New Style from Selection
Use the first function of the multipurpose button to create a new style
from the formatting of an object in the current document. For instance,
you can change the formatting of a paragraph or frame until it appears
as you like, and then you can turn that object’s formatting into a newstyle. This procedure can save time because you do not have remember
all the formatting settings you want, as is necessary when creating a
new style with the Style dialog box. Besides, unlike when setting theformatting parameters in dialog box pages as you will learn to do later,
you can immediately see how the objects will look like when formatted
with the style you are creating.
Follow these steps to create a new style from a selection:
1) Change the formatting of the object (paragraph, frame, etc.) toyour liking.
2) From the icons at the top of the window, choose the type of style
to create (paragraph, character, and so on).
3) In the document, select the item to save as a style.
4) Go back to the Styles and Formatting window and click the New
Style from Selection icon.
In the Create Style dialog box, enter a name for the new style. The listshows the names of existing custom styles of the selected type, if any.
Click OK to save the new style.

192

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 173: Dialog to name a new style from selection

Update Style (from a selection)
Let’s use paragraph styles as an example.
1) Create a new paragraph (or modify an existing paragraph) andedit all the properties you want to go into the style (such as
indentation, font properties, alignment, among others).
CautionMake sure that there are unique properties in thisparagraph. For example, if there are two different fontsizes in the paragraph selected to update the style, thatparticular property will not be updated.

2) Select the paragraph by clicking anywhere in the paragraph.
3) In the Styles and Formatting window, select the style you want to
update (single-click, not double-click) and then click on the New
Style from Selection icon and select Update Style.

Figure 174: Updating a style from a selection
The procedure to update another type of style (character, page, orframe styles) is the same. Just select the item in question, select thestyle you want to update, and choose Update Style.

Free eBook Edition

Chapter 6 Introduction to Styles

193

Load Styles (from a template or document)
The last option in the New Style from Selection icon is used to copy
styles into the current document by loading them from a template oranother document. This method copies all styles, or groups of styles, at
one time.
1) Open the document to copy styles into.
2) In the Styles and Formatting window, click on the New Style
from Selection icon and then on Load Styles (see Figure 173).
3) In the Load Styles dialog box, find and select the template to copy
styles from. Click on the From File button if the styles you want
are contained in a text document rather than a template. In thiscase, a standard file selection dialog box opens up, allowing you
to select the desired document.
4) Select the check boxes for the types of styles to be copied. If you
select Overwrite, the styles being copied will replace any stylesof the same names in the target document.
5) Click OK to copy the styles.

Figure 175: Loading styles from a template

Using the visible styles filters
At the bottom of the Styles and Formatting window, use the drop-downmenu to select a filtering criterion for the contents of the main body of
the window. Normally, you will find that only a handful of styles areneeded in any given document, and it makes sense to have only thesestyles shown.
So, at the beginning of the writing process, you may want to haveaccess to all the available styles (by selecting All Styles). However, as
the document develops, it is useful to reduce the size of the list
displayed to only the styles already in use (by selecting Applied
Styles). If you work on a document where you want to apply special194

Free eBook Edition

OpenOffice.org 3.x Writer Guidepurpose styles only (such as those styles used in writing this user
guide), select instead Custom Styles. The Hierarchical Styles view
is most useful when modifying styles as it reveals which styles arelinked together. This topic is discussed in more detail in Chapter 7(Working with Styles).
If you select the Paragraph Styles view in the Styles and Formatting
window, the drop-down menu contains many more filtering options so
you can view, for example, only Text Styles, Special Styles, and soon.

Drag-and-drop a selection to create a style
Another little known property of the Styles and Formatting window is
the capability of creating a new style with a simple drag-and-drop of atext selection into the Styles and Formatting window.
1) Open the Styles and Formatting window.
2) Select the style category you are going to create (for example acharacter style) using one of the five icons in the top left part of
the window.
3) Select the object you want to base the style on and drag it to the
Styles and Formatting window. The cursor changes its shapeindicating whether the operation is possible or not.
4) In the Create Style dialog box (Figure 173), enter a name for the
new style. The list shows the names of existing custom styles ofthe selected type, if any. Click OK to save the new style.
CautionYou cannot use the drag-and-drop method to create a custom
page style.

Applying styles
Styles can easily be applied by means of the Styles and Formatting
window. However, alternative ways exist to apply certain styles, as
explained in this section.

Applying paragraph styles
The most used style when drafting a document is the paragraph style.
OOo offers two quick alternatives to the Styles and Formatting window
to apply this category of style: the Apply Style menu and the Format
Paintbrush icon.

Free eBook Edition

Chapter 6 Introduction to Styles

195

When a paragraph style is in use in adocument, the style name appears on the
Apply Style menu near the left end of theformatting bar, to the right of the Styles andFormatting icon. You can select styles fromthis menu, just as you can from the Styles andFormatting window.

Figure 176: Apply
Style menu
Tip

To apply a style from this menu, click on thedesired style or use the up or down arrow
keys to move through the list, then press
Enter to apply the highlighted style.

Select More... at the bottom of the list to open the Styles andFormatting window.

The format paintbrush can be used to apply a certain paragraph style
to another paragraph (or group of paragraphs). Start by placing the
cursor inside the paragraph you want to copy, then press the Format
Paintbrush iconin the standard toolbar. The cursor changes into
an ink bottle. Select now the paragraphs to which you want to apply
the copied style. Note that it is not required to select the wholeparagraph.

Example: Applying a paragraph styleLet's see the three methods described above in action with an example.
1) Create a new document (choose File > New > Text Document
or press Control+N).
2) Type the words Heading 1 in the new document, but do not press
Enter so that the cursor remains in that same line where you
typed.
located on the3) Click the Styles and Formatting icon
Formatting Bar or press the F11 key. This opens the Styles andFormatting window (Figure 177).
4) Make sure the window is showing the Paragraph Styles section—
click on the top-left icon of the Styles and Formatting window.

196

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 177: Click on the Styles and Formatting icon
to bring up the window
Double-click the Heading 1 entry of Styles and Formatting (Figure178). This does two things:• Gives the line (actually, its entire paragraph) you typed the
Heading 1 style.
• Adds Heading 1 to the Apply Style menu.

Figure 178: Applying paragraph styles
To use the Apply Styles drop-down menu (Figure 176):
1) Move the cursor to a new line or create a new line by pressing theEnter key at the end of the previous line and type some text.

Free eBook Edition

Chapter 6 Introduction to Styles

1972) Keeping the cursor on the same paragraph, select Heading 1 in
the Apply Styles list.
The text acquires the properties of the Heading 1 style. If theparagraph style you want is not in the Apply Style list, select More to
bring up the Styles and Formatting window. If the Styles andFormatting window is still open, you may notice that the Heading 1style is also highlighted in the main window, as shown in Figure 178.
Finally, try the Format Paintbrush:1) Move the cursor to a new line or create a new line by pressing theEnter key at the end of the previous line and type some text.
2) Move the cursor to one of the two paragraphs with style
Heading 1 and select the Format Paintbrush icon
toactivate it (the cursor changes shape).
3) Move the cursor on the paragraph you have created and click theleft mouse button.
The cursor shape changes back to the normal one, and the text
acquires the properties of the Heading 1 style.
If the Styles and Formatting window is open, you may notice that the
Heading 1 style is also highlighted in the main window.

Applying character styles
Open the Styles and Formatting window (press F11) and click thesecond button in the top bar. The list of available character styles isdisplayed. To apply a character style, follow these steps:
1) Select the block of text where you wish to apply the style.
2) Double-click the appropriate character style in the Styles andFormatting window.
Some examples include:
This example uses the OOo-supplied Strong
Emphasis character style.
Definition: A statement describing the meaningof a word or phrase.

Note

198

One difference between character styles and paragraph styles
is the need for selecting text (highlighting). Character styles
require you to select the text you want to apply them to;paragraph styles do not.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Unset/undo character styles
Sometimes, you will want to remove the formatting from a block oftext. You must resist the temptation to do this manually. This will only
cause trouble down the road. There are three easy ways to remove
character formatting:• Select the block of text and right-click and choose Default
Formatting.
• If you have the Styles and Formatting window open, select theblock of text and double-click the Default character style.
• Select the block of text, then press Ctrl+Shift+Spacebar.
Note

The first method also works for removing manual formatting.

Applying frame styles
Whenever you insert an object into a document, it will automaticallyhave a frame around it. Some designers like to add frame styles tointroduce variety. For example, you could have two different framestyles for graphics: one that is centered for small graphics and anotherthat is left-aligned for graphics that take up the entire width of themain frame. In such a case, you need to add at least one frame style.
To apply a style to a frame:
1) Select the frame.
2) Bring up the Styles and Formatting window (for example, bypressing F11).
3) Click the Frame Styles icon (the third one from the left).
4) Double-click the frame style you want.

Tip

When a frame is selected, the Frame toolbar replaces theFormatting toolbar. Then, the Apply Style list at the left of the
Frame toolbar displays frame styles. You can use this tochange the style of a frame.

Most of a frame’s design can be set in a style. However, the following
options must be set manually:• Anchoring: how the frame is positioned in relation to the rest of
the page’s contents (Format > Anchor).
• Arrangement: the frame’s position in a stack of objects (Format> Arrange).
• Adding a hyperlink: so that a click on the frame opens a Web pageor another document in an HTML file (Insert > Hyperlink).

Free eBook Edition

Chapter 6 Introduction to Styles

199

The right-click menu also has items for anchoring and arrangement, as
well as for wrap and alignment.

Applying page styles
To apply a page style, place the cursor anywhere on the page to which
the style should be applied. You can easily check which page style isapplied because it is shown on the status bar.

Figure 179: The current page style is displayed on the status bar
If you want to apply a different style, you can either right-click on thestyle in the status bar and select a new stype from the pop-up menu, or
you can open the Styles and Formatting window, select the page styleicon at the top of the window (fourth icon), and then double click on
the desired style.
CautionChanging a page style may cause the style of subsequentpages to change as well. The results may not be what you
want. To change the style of only one page, you may need toinsert a manual page break, as described on the next page.

As discussed in Chapter 7 (Working with Styles), a correctly set up
page style will, in most cases, contain information on what the pagestyle of the next page should be. For example, when you apply a Leftpage style to a page, you can indicate in the style settings that the next
page has to apply a Right page style, a First page style could be
followed by either a Left page style or a Default page style, and so on.
Another very useful mechanism to change the page style is to insert amanual page break and specify the style of the subsequent page. The
idea is simple: you break a sequence of page styles and start a new
sequence. To insert a page break, choose Insert > Manual Break andchoose Page break. This section illustrates two common scenarios
where page breaks are useful.

Example: Chapters
A possible scenario: You are writing a book that is divided into
chapters. Each chapter starts with a page style called New Chapter.
The following pages use the Default page style. At the end of each200

Free eBook Edition

OpenOffice.org 3.x Writer Guide(except the last) chapter, we return to the New Chapter page style forthe first page of the next chapter.
OOo doesn’t have a predefined New Chapter style, so you must createa custom style (see Chapter 7). Let’s suppose that you already have thepage styles with the following properties:
Page style

Next Style

New Chapter

Default

Default

Default

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 (empty
paragraph) of its own.
2) Choose Insert > Manual Break. The Insert Break dialog box
appears.

Figure 180: Choose Page break and selectthe New Chapter page style3) Under Type, choose Page break and under Style, select New
Chapter.
Figure 181 illustrates the flow of page styles when using page breaks.

Figure 181: Page style flow using a page breakFree eBook Edition

Chapter 6 Introduction to Styles

201

Example: Page with special formatting
Sometimes you may need to insert a page with special formatting. For
example, a landscape page or a page with more columns. This can also
be done with page breaks. Suppose that the current page has theDefault page style.
1) Choose Insert > Manual Break.
2) Select the desired page style (say, Special Page) in the Insert
Break dialog box.
3) Fill in the contents for this page. Then insert another page break.
4) Then select Default again. The pagination continues on as normal,
except that one page has been replaced by a different page style.
This concept is illustrated in Figure 182.

Figure 182: Inserting a page with special formatting

Applying list styles
List styles define properties such as indentation, numbering style (forexample, 1,2,3; a,b,c; or bullets), and punctuation after the number,but they do not by themselves define properties such as font, borders,
text flow, and so on. The latter are properties of paragraph styles.
If you need your list to have specific paragraph-style properties, you
should embed the list style into paragraph styles, as explained in
Chapter 7. You can then create a numbered list by applying paragraphstyles alone.
Each of the list styles predefined in Writer has four associatedparagraph styles. For example, the Numbering 1 list style is associatedwith four paragraph styles:• Numbering 1• Numbering 1 Cont.
• Numbering 1 End• Numbering 1 Start
Numbering 1 is a default paragraph style to which you can attach a list
style. If you want to make exclusive use of paragraph styles and never
use the Formatting toolbar when creating a numbered list, you could
202

Free eBook Edition

OpenOffice.org 3.x Writer Guideuse the other three styles. All you need to do is to create a suitable list
style and set up the Next Style property in the Organizer page of theParagraph Style dialog box so that the Numbering 1 Start paragraph isfollowed by the Numbering 1 Cont. style, while the Numbering 1 End
paragraph style is followed by a default style paragraph.
If you only want to apply a list style (that is, the numbering or bullet
symbol and the indentation) then, when the cursor is on the paragraphto be numbered, double-click on the desired list style.
When creating a list style, you can define up to ten levels of depth fornested lists. Switch from one level to the other with either the
Promoteor the Demotebuttons on the Bullets and Numbering
toolbar or by pressing the Tab key (one level down) or Shift+Tab key
combination (one level up) or by right clicking on the list element andselect Up One Level or Down One Level from the pop up menu.

Restarting the numbering
When creating more than one numbered list of the same type within
the same chapter, Writer applies progressive numbering to all the lists.
Sometimes this is exactly what you want, while at other times you want
to restart the numbering. To do so, either click on the Restart
numbering iconon the Bullets and Numbering toolbar or rightclick on the first element of the list and select Restart numbering.

Modifying styles
Writer provides several predefined styles, but you may find that they
do not fit in one way or another your preferences. You can build yourown library of custom styles to use in place of the predefined ones, or
you can modify the existing styles. OOo offers four mechanisms tomodify both both predefined and custom (user-created) styles:• Update a style from a selection.
• Load or copy styles from another document or template.
• Change a style using the Style dialog box.
• Use AutoUpdate (paragraph and frame styles only).
The first two methods are discussed in “Update Style (from aselection)” on page 193 and “Load Styles (from a template or
document)” on page 194, while Chapter 7 (Working with Styles)
discusses at length the process of creating a new style.

Free eBook Edition

Chapter 6 Introduction to Styles

203

This section shows how you can quickly make simple modifications toexisting paragraph styles using the same tools you would use for
applying formatting manually.

Tip

Any changes made to a style are effective only in the current
document. If you want to reuse modified or new styles in otherdocuments, you need to either save the styles in a template—see Chapter 10 (Working with Templates)—or copy the styles
into the other documents, as described in “Copying andmoving styles” on page 212.

Changing a style using the Style dialog box
To change an existing style using the Style dialog box, right-click on
the style in the Styles and Formatting window and select Modify fromthe pop-up menu.
The dialog box displayed depends on the type of style selected. Figure
183 shows an example of the dialog box for a paragraph style. Eachstyle’s dialog box has several tabs. The various properties on these
dialog boxes are described in the next chapter.

Figure 183: Example of the Paragraph Style dialog box

204

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Move to the page where the setting you want to modify is specified andinput the new value. You can click the Help button at any time to bringup the online guide where all the options of the current page arebriefly described. When you are done, click OK to close the dialog box.
As discussed above, the great advantage of styles is that all the
instances of such style in your document are now modified to yourliking.

Examples: Modifying paragraph styles
For this example, we need three lines of text with three OOo-supplied
paragraph styles: Heading 1, Heading 2, and Heading 3. These
paragraph styles could be used in formating headings (subheads) in
the framework for a document that will be “fleshed out” afterwards.
Open a new text document for this exercise and type Title on the firstline, click the Paragraph Styles icon on the Styles and Formatting
window, and double-click Heading 1 in the drop-down list. Repeat thisprocedure for the other entries of Figure 184, using the properparagraph style for each: the Heading 1 style for the paragraphcontaining the word Title, Heading 2 for Subtitle 1, and so on.
Your document should resemble Figure 184.

Figure 184: Headings 1–3 with default styles
Suppose you decide to make some changes to these styles, namely:• Heading 1 should be centered.
• Heading 3 should be indented.

Free eBook Edition

Chapter 6 Introduction to Styles

205

Center Heading 1
On the Styles and Formatting window, select the Paragraph Styles
icon (if it isn’t already chosen), right-click on Heading 1, and choose
Modify.

Figure 185: Modifying a style
After the Paragraph Style window opens, choose the Alignment tab,select Center, and click OK.

Figure 186: Center Heading 1
Now, every paragraph marked as Heading 1 will be centered. If you
make another Heading 1 entry, it will be centered as well.

Figure 187: The text Title, which is formatted as acentered Heading 1 style

206

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Indent Heading 3
On the Styles and Formatting window, right-click on the Heading 3
paragraph style and choose Modify (as before). After the Paragraph
Style dialog box opens, follow the steps below:
1) Click the Indents & Spacing tab.
2) Under the Indent section, set the indentation before the text to0.60", as shown in Figure 188. Your display might be different,
depending upon what measurement unit was set in the options(Tools > OOo Writer > General > Settings).

Figure 188: Set indentation
The result should resemble Figure 189.

Figure 189: The text formatted as Heading 3 style is now indented

Using AutoUpdate
On the Organizer page of the Paragraph Style dialog box is a check box
named AutoUpdate (Figure 190). It is present only for paragraph andframe styles. If this check box is selected, then OOo will apply to thestyle itself any modification made manually to a paragraph formatted
with that style.
CautionIf you are in the habit of manually overriding styles in yourdocument, be sure that AutoUpdate is not enabled, or you
will suddenly find whole sections of your document
reformatting unexpectedly.

Free eBook Edition

Chapter 6 Introduction to Styles

207

Figure 190: The Organizer page of the Paragraph Style dialog box

Creating custom paragraph styles:
examplesYou have seen that the Styles and Formatting window provides several
predefined styles, such as Heading 1 and Text body. But what if you
need something different, like a poem style, that is not in Styles andFormatting? With Writer you can make your own styles to suit yourneeds.
Chapter 7 (Working with Styles) describes in detail the options on thevarious pages of the Paragraph Style dialog box. This section provides
an example of a typical use of custom paragraph styles.
We create a Poem paragraph style and a Poem Header paragraph style,with the following properties:• Poem: Centered, with a font size of 10pt.
• PoemHeading: Centered, bold, with a 12pt font size.
In addition, a PoemHeading style is to be followed by a Poem style. In
other words, when you press Enter, the next paragraph style in the
document changes to Poem.
Note

You may have noticed this behavior already. After you enter aheading using a Heading paragraph style and press Enter, thenext style switches to Text body.

Creating the Poem paragraph style
Our next example uses the Poem style. We will use the Default style asa starting point.
1) Click the Styles and Formatting icon
or press F11.
2) Click the Paragraph Styles icon (first from the left).
3) Right-click Default and choose New.

208

Free eBook Edition

OpenOffice.org 3.x Writer Guide

This opens the Paragraph Style dialog box, with the Organizer page
selected. To create a custom style, you have to understand andconfigure the top three entries.
Style fields

Description

Name

This is the name of the style itself, like Heading 1 or Text
body.
Set (type in the text box) the name to Poem.

Next Style

This is the default style that follows the Poem style.
When you press Enter while typing text in the Poemstyle, 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, thenany 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 these changes, the dialog box should look like
Figure 191.

Figure 191: Initial configuration for the Poem style. Set
the first three entries as shown.
The next step is to configure the alignment and font properties of thisstyle.
• On the Alignment page, select the Center option.
• On the Font page, select the 12pt font size.
Click OK to save the new Poem style.

Free eBook Edition

Chapter 6 Introduction to Styles

209

Creating the PoemHeading styleCreate a new PoemHeading style. Use the same procedure as before,
with these changes:• Next Style: Select Poem, not PoemHeading.
• Linked with: Heading.
The dialog box should look like Figure 192.

Figure 192: Settings for the PoemHeading style
Now set the settings of the new style:1) On the Alignment page, select Center.
2) On the Font page, choose Bold and size 14pt.
Click OK to save the new PoemHeading style.

Sample poem
It is a good idea to test out your new styles and see if you are happy
with them. Typing a poem using the styles we have just defined should
produce the results in Figure 193.

Changing the formatting of your styles
One of the main advantages of styles is that they allow the document
formatting to be changed after the content has been written. For
example, suppose you have written a 100-page book of poetry. Thenyou decide you don’t like the way the poems look after all. Or, perhaps,
your publisher doesn’t like it.
To learn about reconfiguring styles, we add an indentation to the Poemstyle instead of centering it.

210

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 193: Sample poem

Indent PoemFirst, set the Poem style to left alignment:
1) In the Styles and Formatting window, select Poem and right-click
and select Modify.
2) On the Alignment page, select Left.
Set the indentation:
1) Click the Indents & Spacing tab.
2) Under Indent, set the indentation before the text to 5cm (or about
2in).
Done! Click OK, and you should see the text change.

Final result
After all these changes, the poem should look similar to Figure 194.
Note in the figure that a third style has been created for the author of
the poem.

Free eBook Edition

Chapter 6 Introduction to Styles

211

Figure 194: Final result, using three custom styles

Copying and moving styles
Styles are part of the document properties, therefore changes made toa style or new styles you create are only available within the document
they belong to. Styles always stay with a document. So, for example, if
you e-mail a document to another person, the styles go with it.
If you want to reuse modified or new styles in other documents, youneed to either save the styles in a template (see Chapter 10) or copy
the styles into the document where you want to use them.
You can copy or move styles from one template or document to anotherin two ways:• Using the Template Management dialog box.
• Loading styles from a template or document (see page 194).
To copy or move styles using the Template Management dialog box:
1) Click File > Templates > Organize.
2) At the bottom of the Template Management dialog box, choose
either Templates or Documents, as needed. For example, if you
are copying styles between two documents, both entries should
say Documents.

212

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 195: Choosing to copy styles from a document,
not a template3) To load styles from a file, click the File button. When you returnto this window, both lists show the selected file, as well as all thecurrently open documents.

Figure 196: Copying a style from one document to another4) Double-click on the name of the template or document and thendouble-click the Styles icon to show the list of individual styles.
5) To copy a style, hold down the Control key and drag the name ofthe style from one list to the other.
6) Repeat for each style you want to copy or move. When you arefinished, click Close.

Free eBook Edition

Chapter 6 Introduction to Styles

213

Caution

If you do not hold down the Control key when dragging, thestyle will be moved from one list to the other. The style will
be deleted from the list you are dragging it from.

Deleting styles
It is not possible to delete OOo’s predefined styles from a document or
template, even if they are not in use. However, custom styles can bedeleted.
To delete an unwanted style, right-click on it in the Styles andFormatting window and choose Delete. If the style is in use, themessage shown in Figure 197 appears.

Figure 197: Deleting an applied style
CautionTip

Make sure the style is not in use before deletion. Otherwise,
all objects with that style will return to the Default style andretain their formatting as manual formatting. This can bevery problematic in a long document.
If an unwanted style is in use, use Find & Replace to replace
it with a substitute style before deleting it.

If the style is not in use, the message shown in Figure 198 appears.

Figure 198: Deleting a style that is not in use

214Free eBook Edition

OpenOffice.org 3.x Writer Guide

Assigning styles to shortcut keys
You can configure shortcut keys to quickly assign styles in yourdocument. Some shortcuts are predefined, such as Ctrl+1 for the
Heading 1 paragraph style and Ctrl+2 for Heading 2. You can modify
these shortcuts and create your own. See Chapter 17 (Customizing
Writer) for details.

Defining a hierarchy of headings
Tools > Outline Numbering defines the hierarchy of headings in adocument. Headings can be numbered or not; typically the first-level
headings in a book-length document are the next level of headings
after the chapter titles, which may be numbered, but lower-level
headings are not numbered. Some chapter title and heading styles(such as those commonly used in engineering documents) number eachchapter and heading level, for example 1, 1.1, 1.2, 2, 2.1, and so on.
When chapters or sections are added or deleted, the numbering is
automatically changed.
Paragraph styles are the key to OOo’s outline numbering feature. The
default paragraph styles assigned to outline levels are the headingstyles supplied with OOo: Heading 1, Heading 2, and so on. However,you can substitute any styles you wish, including custom (user-defined)styles.
The headings defined using the outline numbering feature can be used
for more than the table of contents (described in Chapter 12). For
example, fields are commonly used to display headings in headers andfooters of pages (see Chapter 14, Working with Fields), and Writer cansend the outline to Impress to use as the basis for a presentation (seethe Impress Guide for details).

Choosing paragraph styles for outline levels
If you are using the default heading styles for the headings in youroutline, and you do not want to use heading numbering, you do notneed to do anything on the Outline Numbering dialog box. The default
outline numbering scheme uses the default heading styles (Heading 1,
Heading 2, and so on).
To use custom styles in place of one or more of the default headingstyles:1) Choose Tools > Outline Numbering to open the Outline
Numbering dialog box (Figure 199).

Free eBook Edition

Chapter 6 Introduction to Styles

215

Figure 199: Choosing paragraph styles for outline levels
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: Paragraph Style section, choose from the dropdown list the paragraph style you want to assign to that headinglevel. For example, when setting up a chapter in the Writer Guide,
you would click Level 1 and choose OOoHeading1 (a custom
style defined for the OOoAuthors project) to replace Heading 1
and for Level 2, OOoHeading2 to replace Heading 2.
4) Repeat for each outline level that you want to change. Click OK
when done.

Assigning outline levels to other styles
Beginning with OpenOffice.org 3.1, you can assign an outline level toany paragraph style. This feature enables you to create a table ofcontents that includes those headings along with the headings using
styles listed in the Outline Numbering dialog box. For example, you
might use a different sequence of styles for annexes (appendixes), but
you want the annex headings and subheadings to appear in the TOC at
the same levels as the chapter headings and subheadings.
To assign an outline level to a paragraph style, go to the Outline &Numbering page for the style, and select the required outline level.
Click OK to save this change.

216

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 200: Specifying an outline level on the Outline &Numbering page for a paragraph style

Setting up heading numbering
If you want one or more heading levels to be numbered, many choices
are available; this example defines a scheme to create headings thatlook like those in Figure 201.

Figure 201: The numbering scheme to be set up.
Use the Numbering page of the Outline Numbering dialog box todefine the numbering scheme and its appearance. Figure 202 shows
the default settings.
1) In the Level list, choose 1. In the Number list, choose 1, 2, 3, ....
The result is shown in the preview box on the right in Figure 203.
2) In the Level list, choose 2. In the Number list, choose 1, 2, 3, ....
The Show sublevels list is now active; it should show 2 (if not,choose 2). The result is shown in Figure 204.
3) In the Level list, choose 3. In the Number list, choose 1, 2, 3, ....
The Show sublevels list should show 3 (if not, choose 3). The
result is shown in Figure 205.

Free eBook Edition

Chapter 6 Introduction to Styles

217

Figure 202: Default settings on the Outline Numbering dialog box.

Figure 203: Specifying numbering of Level 1 headings.

Figure 204: Specifying numbering of Level 2 headings.

218

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 205: Specifying numbering of Level 3 headings.
These choices produce the layout shown in Figure 206.

Figure 206: Results of numbering choices for headings

Setting up the indentation of headings
Whether or not the headings are numbered, you may want to change
some of their formatting. For example, you may want the second-level
and third-level headings to be indented from the margin. For numberedheadings, you may also want the second line of long headings to line
up with the first word of the heading, not the number. For thesechanges, use the Position page of the Outline Numbering dialog box.

Note

The Position page for documents created in OOo3 is slightly
different from the Position page for documents created inearlier versions of OOo that are opened in OOo3. Thisdifference is provided for backwards compatibility.

Positioning in new OOo3.x documents
Figure 207 shows the Position page as it appears for documents
created in OOo3.x.

Free eBook Edition

Chapter 6 Introduction to Styles

219

Figure 207: Setting up the position of level 1 headings
1) In the Level list on the left, choose 2. Change the values for
Numbering followed by... at and Aligned at, as shown in Figure208. You may want to use a different value. This indents theentire heading but does not affect the way long headings wrap
around (see Figure 209).

Figure 208: Indenting Level 2 headings

Figure 209: Result of changes to indentation of Level 2 headings
2) To change the wrapping behavior of long headings, change Indent
at to a larger value, as shown in Figure 210. The result is shownin Figure 211.

220

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 210: Wrapping long headings

Figure 211: Result of changing Indent at value
3) In the Level list, choose 3. Change the values for Numbering
followed by... at, Aligned at, and Indent at, as shown in Figure212. The final result is shown in Figure 201.

Figure 212: Indenting level 3 headings

Positioning in older documents opened in OOo3.x
Figures 213, 214, 215, and 216 show the Position page as it appears
for documents created in earlier versions of OOo and opened in
OOo3.x.

Free eBook Edition

Chapter 6 Introduction to Styles

221

Figure 213: Setting up level 1 headings

Figure 214: Indenting Level 2 headings

Figure 215: Changing the Width of numbering value towrap long headings

222

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 216: Indenting Level 3 headings

Free eBook Edition

Chapter 6 Introduction to Styles

223

7

Chapter
Working with Styles

Free eBook Edition

Introduction
Chapter 6 (Introduction to Styles) described the basics of how to use,
apply, and manage styles. This chapter gives a more detailed
description of how to create or modify a style, using the many options
available on the various pages of the Style dialog box. You will learn
how these options affect the appearance of the style and how to usethem efficiently. Examples and hints are also provided.
The Style dialog boxes share many of the same pages as the manual
formatting dialog boxes, so you can also use this chapter to help you
apply manual formatting (though you do not need that if you use
styles).

Creating custom (new) styles
In addition to using the predefined styles provided by OOo, you can
add new custom (user-defined) styles. In Chapter 6, two methods were
given for creating a new style: the drag-and-drop approach and the
New Style from Selection icon in the Styles and Formatting window.
These methods are very convenient because it is possible toimmediately check the visual effects that the style produces before
creating it. However, they may require you to access several different
menus, and you have a somewhat reduced amount of control on style(particularly when it comes to organizing them). The method describedin this chapter, therefore, concerns only the use of the Style dialog box.

The Style dialog box
Open the Styles and Formatting window. Select first the category ofstyle you want to create by clicking on the appropriate icon in the top
part of the Styles and Formatting window. For example, select the third
icon from the left if you want to create a new frame style.
Right-click on the main window and select New from the pop-up menu.
If you right-click on an existing style, the new style will be linked to thestyle you clicked on. If you right-click on an empty area, then the initial
settings of the style are copied from the Default style of thecorresponding category.
The dialog box that is displayed depends on the type of style you
selected. Many of the pages are the same as those that are displayedwhen manual formatting is applied. Therefore, if you are familiar withmanual formatting, you will find that you already know how to use

Free eBook Edition

Chapter 7 Working with Styles

225most of the options. The dialog box used to create a new style and to
modify an existing one is exactly the same.
Tip

An exception to the above rule is conditional styles, which havea different dialog box. See “Working with conditional
paragraph styles” on page 241.

The Organizer page
When creating a new style, the first page you need to set up is theOrganizer. This page is common to all style categories. Therefore, it isdescribed only once.

Figure 217: The Organizer page displayed when a newstyle is created
Depending on the style you are creating, you will find the following
information on this page:• Name: present on all the categories—use this field to give a nameto the style you are creating.
• AutoUpdate: only present for paragraph and frame styles. If it ischecked, then Writer will apply any modification made manuallyto a paragraph formatted with that style to the style itself.
Caution226

If you are in the habit of manually overriding styles in yourdocument, be sure that AutoUpdate is not enabled, or you
will suddenly find whole sections of your document
reformatted unexpectedly.

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Next Style: only available for paragraph and page styles. Use it

to specify which style will be applied to the next element. It is
customary, for example, to have a left page style followed by aright page, a first page followed by a left page, a heading followedby body text, and so on. You will see in the example later how thisproperty is used. Predefined paragraph styles for lists or bullets
also make large use of the Next Style property.
• Linked with: available for paragraph, character, and framestyles; it determines the position of the style in the hierarchy.
When creating a new style and linking it to an existing style, all
the starting properties of the style are copied from the linked style.
Refer to “Understanding linked styles” for further information on
how linked styles work.
• Category: available for all styles; use it to associate the new stylewith one of the categories. Note that you cannot change thecategory of the predefined styles. Setting this field is useful whenfiltering the contents of the Styles and Formatting window.
• Contains section: the lower part of the Organizer page shows asummary of the properties of the style.

Understanding linked styles
When creating a new paragraph or a new
character style, you may use an existing style asa starting point for its settings. In this sense,
OOo links the styles together.
When styles are linked, a change in the parent
style affects every style linked to it. You caneasily visualize the connections between styles
by switching to the Hierarchical view in the
Styles and Formatting window filter.
For example, every Heading style (such as
Heading 1, Heading 2) is linked with a stylecalled Heading. This relationship is illustrated
in Figure 218.

Figure 218:
Hierarchical view oflinked styles

Free eBook Edition

Chapter 7 Working with Styles

227

Linking styles is a very powerful method to create “families” of styles
and allows you to change their properties simultaneously. For example,
if you decide that all the headings should be blue (such as in thisguide), you only need to change the font color of the parent style toachieve the desired result. Note however, that changes made to aparameter of the parent style do not override changes previously madeto the same parameter in the child styles. For example, if you changed
the Heading 2 font color to green, a change of the font color of the
Heading style (the parent style) to red will not affect the Heading 2
font color.
You can easily check which properties are specific to a style by looking
at the Contains section of the Organizer page. In case you want toreset the properties of a child style to that of the parent style, click theStandard button located at the bottom of each Paragraph andCharacter style dialog page.
Note

You cannot define a hierarchical style structure for Page,
Frame and List styles.

Creating a linked style
To create a linked style, you can either specify the parent style (the“linked with” style) in the Organizer page of the Style dialog box, or
you can start creating a new style by right-clicking in the Styles andFormatting window on the style to be linked with and selecting New
from the drop-down menu.

Example: Changing a property of a parent styleSuppose that you want to change the fontof not only Heading 1 or Heading 2, but
all headings. The easiest way to do that is
to take advantage of linking.
Open the Styles and Formatting window(press F11) and select Heading.
Open the Paragraph Style dialog box for
the Heading style (right-click > Modify)
and select the Font tab. Select a font andclick OK (Figure 220).
Figure 219: Select Heading
style

228

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 220: Select the heading fontNow, the fonts of all the heading styles (Heading 1 through Heading10) are changed in a single operation. Figure 221 shows to the left adocument using the headings 1, 2 and 3 and on the right the same
document after changes have been made to the Heading style.

Figure 221: Effects of changing the Heading style fontWorking with paragraph styles
Although this section describes most of the parameters scattered over
the twelve tabbed pages shown in Figure 220, you do not need toconfigure 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 thelinking properties of styles or when basing the new style on one whichis already similar.

Free eBook Edition

Chapter 7 Working with Styles

229

Settings on the Indents & Spacing pageIn 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 theapplied settings.

Figure 222: Settings on the Indents and Spacing pageof 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 ofmeasurement between the left margin of the page and theleftmost 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 ofmeasurement between the right margin of the page and therightmost 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 anegative value makes the first line start to the left of theparagraph area.
230

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Automatic: check this box to allow Writer to automaticallycontrol the indentation of the first line. The value is calculated byWriter on the basis of the font size and other parameters.
Use the Spacing section of the page to determine the amount ofvertical space above and below the paragraph. It is customary toinclude some “space above” in heading styles so that they areseparated from the text body of the previous section without the needto insert empty paragraphs. Spacing between paragraphs is also
normal in certain types of documents. The body text style of this guideis configured to leave some space between consecutive paragraphs.
The spacing between paragraphs does not affect the spacing betweenlines, which is instead controlled using the drop-down box in the Linespacing section. You can select one of the following values:• Single: the default setting—applies a single line spacing to theparagraph. 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 dropdown list where you can enter a percentage value. 100% means asingle 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 ofthe 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).
See Figure 223.
• Fixed: this choice activates the edit box next to the drop-down
list, where you can enter the exact value of the line spacing.

Tip

When using different font sizes in the same paragraph, the line
spacing will be uneven, as Writer automatically calculates the
optimal value. To obtain evenly spaced lines, select Fixed or At
least in the drop-down list and a value that is sufficient tocreate a spacing between the lines sufficient to account for thelargest font size used.

The last parameter that can be set in this page is Register-true. If you
have activated the Register-true for the page style in use (refer to“General settings for the page style” on page 251) then the Reference
style and all the styles hierarchically dependent on it will have theFree eBook Edition

Chapter 7 Working with Styles

231

Register-True box selected, you may want however to activate thevertical grid also for other styles (or not apply it to styles dependent on
the reference style) and this is where this can be done.

Settings on the Alignment pageUse the Alignment page to modify the horizontal alignment of the text,
choosing between Left, Right, Center, and Justified. The results ofthe 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 thelast line to the left, but you can choose to align it to the center or tojustify it also (meaning that the words on the last line will be spaced inorder 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 sothat it occupies the full length of the line.
The alignment page is also used to control the Text to Text verticalalignment—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 Figure 223
for a graphical representation of these reference points.

Figure 223: Typographic measurements (from Wikipedia.org)

Text flow options for paragraph styles
The page of the dialog box controlling the text flow options is shown in
Figure 224. 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 ofcharacters to be left on a line before inserting a hyphen.

232

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Characters at line begin: controls the minimum number ofcharacters that can be placed at the beginning of a new line
following a hyphen.
• Maximum number of consecutive hyphens: controls the number ofconsecutive lines that terminate with a hyphen.
If you prefer Writer to automatically control the hyphenation, selectthe Automatically option.

Figure 224: The options on the Text Flow page of theParagraph dialog box
In the Breaks section, you can require a paragraph to start on a newpage or column, as well as specify the position of the break, the style ofthe new page, and the new page number. A typical use for this option isto ensure that the first page of a new chapter always starts on a new(usually right-hand) page.
To always start a style on a new page, choose the following settings on
the Text Flow page of the Paragraph Style dialog box:
1) In the Breaks section, select Insert. Make sure that Type is set toPage 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. Click OK.

Free eBook Edition

Chapter 7 Working with Styles

233

Note

If you want the first page of a new chapter to always start on aright (recto) page, make sure that the page style for the firstchapter page is set for the right page only by making thisselection in the Layout settings field on the Page page of the
Page Style dialog box.

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, theentire paragraph moves to the top of the next page.
• Keep with next paragraph is appropriate for headings or thelead-in sentence to a list, to ensure that it is not the lastparagraph on a page.
• Orphan control and Widow control. Widows and orphans are
typographic terms. An orphan is the first line of a paragraphalone at the bottom of a page or column. A widow is the last lineof a paragraph that appears alone at the top of the next page orcolumn. Use these options to allow paragraphs to split acrosspages 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 styleThree pages of the Paragraph Style dialog box are dedicated tosettings controlling the appearance of the font, namely, the Font, Font
Effects, and Position pages. The use of the first two pages should bestraightforward. Many of the options used when creating a characterstyle are discussed in “Creating a new character style” on page 245.
Options that can be used when creating a paragraph style aredescribed here.

Specifying a relative font size
If you are creating a style based on another style (linked style), you canspecify 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 arecommonly used for Web pages.
For example, the paragraph style Heading 1 is based on the paragraphstyle Heading. The font size of the paragraph style Heading is 14pt,
and the font size of paragraph style Heading 1 is specified as 115%.

234

Free eBook Edition

OpenOffice.org 3.x Writer Guide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 amountfollowed by the symbol % (see Figure 225). Similarly, you can enter aplus 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”.

Figure 225: 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 forspell checking, thesaurus, hyphenation, the decimal and thousandsdelimiter 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 thewhole document. On the Font page of the Paragraph Style dialog box,
languages with installed dictionaries are marked in the Language listby a small ABC icon (Figure 226). 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 tocreate two paragraph styles that differ only in the language option. If
you then want to change some of the other properties of the paragraphstyle, 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 moreconvenient to use a character style.

Free eBook Edition

Chapter 7 Working with Styles

235

Figure 226: Selecting a language for a paragraph style

Options for positioning text
The Position page of the Paragraph Style dialog box collects all theoptions 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 andsubscripts. However, you will normally apply superscript andsubscripts 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.

Figure 227: The position page of the Paragraph Style(default options)236

Free eBook Edition

OpenOffice.org 3.x Writer Guide

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

Figure 228: A table with rotated headings
The Scale Width box controls the percentage of the font width bywhich to compress or stretch the rotated text horizontally.
Chapter 4 (Formatting Pages) describes how to create portrait headersand footers on landscape pages by rotating characters. You canachieve 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-existingtable.
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 savethe new style.

Figure 229: Rotating a paragraph 90 degrees
3) Select the heading row of the table and apply the new style. Any
text in the cells of the heading row is now rotated.

Free eBook Edition

Chapter 7 Working with Styles

2374) If the headings are aligned to the top of the cells, you may want tochange the alignment to the bottom of the cells, as shown in
Figure 228. To do this, click the Bottom button on the Table
toolbar or select Format> Alignment > Bottom from the mainmenu.

Spacing options
Use the Spacing section of the Position page 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 toenter the value in points by which you want to expand or condense thetext.
The Pair Kerning option (selectedby default) increases or decreases
the amount of space between certain
pairs of letters to improve theoverall appearance of the text.
Kerning automatically adjusts the
Figure 230: Kerning disabledcharacter spacing for specific letter(left) and enabled (right).
combinations. Kerning is only
available for certain font types and, for printed documents, only works
if your printer supports it.

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 withthe added advantages of being simpler to manage and quicker to apply.

Tip

If you need to use tabs, and you will be sending a document toother people, do not use the default tab stops. If the recipientsof the document have defined default tab stops that are
different from the ones you are using, the paragraph may lookvery different on their machines. Instead, define the tab stops
explicitly in the paragraph or the paragraph style; then you
can be sure that everyone will see the same layout.

To define tab stops in your paragraph style, use the page shown in
Figure 231. Here you can choose the type of tab: left, right, centered,or decimal; the character to be used as a decimal point; and the fillcharacter—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
238

Free eBook Edition

OpenOffice.org 3.x Writer Guide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 apage number in a table of contents or underscore character whencreating 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 andclicking 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 anddelete the old one using the buttons on the right-hand side of the page.

Figure 231: Specifying tab stops for a paragraph style
Note that it is not possible to define tabulations that exceed the pagemargin. In the rare cases where it may be needed, use a borderlesstable instead.

Using the Outline & Numbering pageUse the Outline & Numbering page if you want to number theparagraph, for example if this style is used for a heading or list item.
Beginning with OpenOffice.org 3.1, you can assign an outline level toany paragraph style. This feature enables you to create a table ofcontents that includes those headings along with the headings using
styles listed in Tools > Outline Numbering. For example, you mightuse a different sequence of styles for annexes (appendixes), but you
want the annex headings and subheadings to appear in the TOC at thesame levels as the chapter headings and subheadings.

Free eBook Edition

Chapter 7 Working with Styles

239

To assign an outline level to a paragraph style, go to the Outline &Numbering page for the style, and select the required outline level.
Click OK to save this change.

Figure 232: Specifying an outline level on the Outline &Numbering page for a paragraph style
This page should be used in combination with list styles when you needto associate a certain paragraph style with a list style. Refer to“Combining list and paragraph styles” on page 264 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 fora first paragraph style), then you can predefine the properties in thepage shown in Figure 233. Checking the box to display drop caps alsoenables the subsequent options where you can fine tune theappearance, such as the number of lines occupied, the number ofcharacters to enlarge (if you want the whole first word, check thecorresponding box), and the space between the drop caps and the text.

Figure 233: Options for adding a drop cap to the paragraph style
Drop caps use the same font and have the same properties of the restof the paragraph; however, you can easily modify their appearance by
creating a specific character style and using it. For example, you may
240

Free eBook Edition

OpenOffice.org 3.x Writer Guide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 dropdown menu.

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 cancustomize the background and border of the paragraph areas using thecorresponding pages of the paragraph style dialog box. In addition tohighlighting, borders are also often used to separate header and footer
areas from the main text area (such as in this guide) as well as
decorative elements in some heading styles.
The two pages are fairly intuitive. You may want to pay attention to thefollowing points when working with the Background page:• In case you do not find the desired color in the list of predefinedones, you can define your own by selecting Tools > Options >OpenOffice.org > 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 canbe found in the Impress Guide.
• The background is applied only to the paragraph area. If you havedefined an indented paragraph, the space between the paragraphand the margin does not have the paragraph’s background color.
On the Borders page, the following points are worth considering:• Watch out for the effects that the spacing between borders andparagraph 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.

Working with conditional paragraph styles
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

Free eBook Edition

Chapter 7 Working with Styles

241

MyTextBody to be black by default but turn white when inside a framewith a blue background.
Probably the most common use for conditional formatting is withsingle-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 thenumber formatting whenever you press the Tab key to create asubordinate heading.
The only trouble with single-style outlining is that all levels look thesame. 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 canassign the levels of the outline numbering style to other paragraphstyles. Then, when you press the Tab key while using the paragraphstyle, each level of the outline takes on different formatting, making
single-style outlining even more convenient than it is on its own.

Figure 234: Condition page for paragraph styles
Note

Caution242

Predefined styles (other than Text body) such as Default,
Heading 1, and Heading 2 cannot be set to be conditional.
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 thewindow closes, the Condition tab no longer appears in thewindow.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

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 dialogbox) and select the style you want for this condition in the righthand 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.

Working with character styles
Character styles complement paragraph styles and are applied togroups of characters, rather than whole paragraphs. They are mainly
used when you want to change the appearance or attributes of parts ofa paragraph without affecting other parts. Examples of effects that canbe obtained by means of character styles are bold or italic typeface orcolored words.
Two of the character styles used in this document are:• Keystrokes use the custom OOoKeyStroke style. For example:
to set Writer to full screen, press Control+Shift+J.
• Menu paths use the custom OOoMenuPath style. For example:
to turn field shadings on or off, choose View > Field Shadings.

Free eBook Edition

Chapter 7 Working with Styles

243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 andformatting hyperlinks. When inserting words in different language orwords you do not want the spell checker to detect as mistakes (forexample procedure names in some programming language), characterstyles are quite useful because you can define the language to be
applied in the character-style properties.

Why use character styles?
Beginning Writer users often wonder, “Why use character styles?” or“How is this different from clicking the bold icon to change the font
typeface?” The following real-life event illustrates the difference.
Jean is a technical writer from Australia. She learned thevalue of character styles after her publisher told her tounbold menu paths in her 200-page book. Jean had notused character styles. She had to edit all 200 pages byhand, with some help from Find & Replace. This was
the last time Jean failed to used character styles.
Character styles do not 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 areapplied consistently.
• Focus on content“Was I supposed to bold keystrokes? How about menus?”
A writer should not have to remember the answers to thesequestions. Typesetting details distract you from the real content
of your work. A properly named custom character style (such as
OOoKeyStroke or OOoMenuPath) will remove this burden from
you.

244

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Creating a new character style
This section illustrates the use of the style dialog box for creating a
new character style.
The pages used to configure the character style have already been
seen in the previous section on paragraph styles. Therefore, once you
are familiar with creating paragraph styles, it will only take a few
minutes to create a character style.
• Use the Organizer to set up the hierarchical level of the new
character style (if needed) and to give it a name.
• Use the Font page to determine the font, typeface, and size foryour character style. As with paragraph styles, you can specify
the size as a percentage rather than providing the absolute value.
For example, 150% means that when the character style isapplied to a 10pt font size, the new font size will be 15pt, while if
applied to a 14pt font size, the new size will be 21pt. You can also
specify the Language of the text to which a certain characterstyle is applied, so you can insert words in a different language
and have them spell checked using the correct dictionary.
• In the Font Effects page, you can set up attributes such as fontcolor, underlining, relief, or other effects. If you frequently use
hidden text, for example, it is very convenient to define acharacter style where the Hidden option is marked. This way you
only need a few mouse clicks to hide text. Relief effects may beappropriate for a drop cap or to give more emphasis to thechapter number or other parts of the title (as it is the case of thisguide).
• You can use the Position page to create a subscript in case you
are not satisfied with the default one or even a sub-subscript
which may be useful for certain scientific publications. In thesame page, you can create rotated, condensed, or expanded text.

Note

When rotating a group of characters, you also need to specify
whether the rotated text should fit in the line or if, instead, it isallowed to expand above and below the line. This property only
becomes active for character styles.

• Finish creating a character style by assigning a background, if sodesired. Applying a background to a character style yields thesame effect as using the highlighting tool on the standard toolbar.

Free eBook Edition

Chapter 7 Working with Styles

245

Migrating to character styles
For people accustomed 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-clicking and choosing Default Formatting removes any
text formatting (both manual and character styles).
• Realize that clicking the Bold icon in the toolbar is not easierthan double-clicking on a character style that is preset for bolding
the font typeface.
• Leave the Styles and Formatting window open to make characterstyles easy to access.

Working with frame styles
Frames are often used as containers for text or graphics. To provide
consistency in the appearance of frames used for similar purposes, it isa good idea to define styles for frames. For example, you might wantphotographs to be enclosed in a frame with a drop-shadowed border,line drawings in a frame with a plain border, marginal notes in a frame
without a border but with a shaded background, and so on.
Writer provides several predefined frame styles, which you can modify
as needed; and you can define new frame styles. The technique fordefining and applying frame styles is similar to that for other styles.

Tip

There is considerable overlap between the uses of frames andof sections for some page layout purposes. You may find it
useful to take a look at Chapter 4 (Formatting Pages) for
information about the use of frames and sections.

How frame styles work
When an object is added to Writer, it is automatically enclosed in aframe of a predetermined type. The frame sets how the object is placedon the page, as well as how it interacts with other elements in the
document. You can edit the frame by modifying the frame style it uses
or by using a manual override when a frame is added to the document.

246

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Because frames and objects are used together, it sometimes is easy toforget they are separate elements. In some cases, such as charts, you
can edit the frame and object separately, so the distinction is worth
remembering.
Unlike other elements that use styles, frames can be defined only
partly by their style because their use can vary so much. Several
elements of frames, such as the anchor and protected elements, need
to be defined manually for individual frames.
You can format a frame manually when you select Insert > Frame.
The dialog box that opens contains all the settings available whenframe styles are set up, as well as some only available when the frame
is inserted. As with other styles, the most efficient way to format
frames is in the Styles and Formatting window.

Planning the styles
If you are using a mix of graphics, you may want to define two related
styles, one with a border line for graphics with white backgrounds andone without a border for all other backgrounds. You also may want todesign one or more frames for text only.
Otherwise, the default frame styles (listed in Table 3) cover most users’
needs. The only significant addition that many users might need is one
or more styles for text frames.
Table 3. Various frame styles and their uses
Style

Comments and Use

FormulaThe frame style used for formulas. The default includes
AutoSize, which adjusts the size of the frame to theformula.

Frame

The default frame style.

Graphics

The default style for graphics. The defaults include
autosizing to fit the graphic, no text wrap, and a thinborder around the frame. These are reasonable defaults,
except for the border. Unless the background of thegraphic is white and the document’s background also iswhite, the border usually is unnecessary.

LabelsThe default style for use with File > New > Labels. It
seems to be used by OpenOffice.org automatically and is
not intended for users at all.

Free eBook Edition

Chapter 7 Working with Styles

247

StyleComments and Use

Marginalia

A style for placing a frame beside the left margin. As thename suggests, the Marginalia style is intended forcomments added in the margin of text. The style also isuseful for creating sideheads—headings against the left
margin, which often are used in technical documentation.
To set up sideheads, create body-text paragraph styles with
two inches or more indentation from the left. Then, place
the cursor at the start of a body-text paragraph, add theframe, and apply the Marginalia style.

OLE

The default style for OLE objects and floating frames. The
default places the frame at the top and center of a body oftext.

WatermarkThe default style for a watermark, a graphic placed as the
background to a body of text. The default is a Throughwrap, with text passing over the frame and anything in it.
The graphic should be faint enough that text still isreadable over top of it.

Creating new frame styles
You can access frame settings by selecting New or Modify in the
Styles and Formatting window for a frame style.
Frame settings are available from the following tabbed pages:• Type page: sets the size and position of the frame. One of themost useful options here is AutoSize, which automatically adjusts
the frame to the object it contains. If the frame style is one usedautomatically, then this option should be selected.
• Options page: sets whether the contents of the frame are printed
and able to be edited in a read-only document. The tab also sets
the text direction, which is useful if you are using the frame forcontents in a language that uses right-to-left text direction.
• Wrap page: sets how text is positioned in relation to the frame
and how close text comes to a frame. If you want the frame
contents to stand out from the paragraphs around it, set the wrap
to None. This probably is the single most important tab forframes.
• Background page: sets the background color or graphic. This tab
is useful mostly for text frames in complex page layouts, in whicha text frame has an appearance different from the generalbackground of the page.

248

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Border page: sets the line around the frame, if any. Many

beginning designers make the mistake of adding a border toevery frame. However, when a colored background distinctly
marks the division between the frame’s contents and the rest of
the page, borders are unnecessary.
• Columns page: this tab can be ignored unless the frame is being
used for text. The page is the same that is used to set up a pagestyle, and its parameters are described in the section “Columns
page” on page 253.
• Macro page: sets a macro to use with the frame in order totrigger some action when the user interacts with the frame. These
options are useful only in an on-line Writer or HTML document.

Working with page styles
Page styles control page properties (margins, page size, header andfooters, among others). However, unlike paragraphs, which can havedirectly applied properties, pages only have a page style and no
directly applied properties.
Christian is a lawyer from California, USA. For his
letters, the first page has his letterhead, and subsequentpages only identify the recipient, the date, and the page
number. Christian does this using page styles. He alsouses page styles to comply with the spacing
requirements (such as margins) for legal briefs in
California State courts.
This section describes how to create a new page style, explains themeaning of some of the options in the Page style dialog box, andillustrates their usage.

Creating a new page style
Unlike other styles, page styles can be created or modified only byusing the Styles and Formatting window. Open the Styles andFormatting window and click the Page Styles icon . Right-click
anywhere in the main window and select New.
The Page Style dialog box consists of the eight pages shown in
Figure 235.

Free eBook Edition

Chapter 7 Working with Styles

249

Figure 235: The tabbed pages for the Page Style dialog box

The next style property
As for the other styles, use the Next style property (described in “The
Organizer page” on page 226) to specify the style for the subsequentelement of the category of style you are working on. This property isparticularly important for a page style, as the following example
demonstrates.

Setting up a title page
Consider a common scenario: you want the document to have a title
page that 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 predefined First Page page style thatcomes with OOo, and for the rest of the document, we can use theDefault page style.
Figure 236 shows the required flow of page styles. On the Organizer
page of the Default page style, leave the Next Style property set to
Default. On the Organizer page of the First Page style, make surethat the Next Style property is set to Default.

Figure 236: Flow of page styles

250

Free eBook Edition

OpenOffice.org 3.x Writer Guide

General settings for the page style
The Page page of the Page Style dialog box is where you can control
the general settings of the page. The page shown in Figure 237
consists of three sections, plus a preview area in the top right corner.
In the Paper format section, you can specify the size of the paperchoosing from one of the many predefined formats. Selecting “user”,
you can use the Width and Height fields to define your own paper size.
If using a predefined format, select the orientation of the paper
between portrait and landscape. If your printer has more than one tray,
you can specify the tray from which to print pages in the new pagestyle.
In the Margins section, specify the size of the margins in yourpreferred unit of measurement. If you select Mirrored margins in the
Page layout settings, the left margin becomes the Inner margin, while
the right margin becomes the Outer margin.

Figure 237: The Page page for the Page Style dialog box
In the Layout settings section, choose the desired Page layout from thefour available options. Decide whether the page style being defined
applies to both left and right pages (default) or if instead it should beapplied only to one or the other types. Some considerations:• If you plan to bind the printed pages using this style like a book,select a mirrored layout. Use the Format drop-down menu todetermine the page numbering style to apply to this page style.

Free eBook Edition

Chapter 7 Working with Styles

251• A common practice in page layouts is to have asymmetrical pagemargins—both for left and right margins and for top and bottom
margins. There are various schemes for accomplishing this. The
most common of them follow these two general rules for printed
page layouts: (a) The outer margin (right margin on a right-handpage) would have a wider margin than an inner margin (leftmargin on a right-hand page); (b) The bottom margin would belarger than a top margin. The rationale for an asymmetrical pagelayout is allowing more space for readers to place their hands
while holding the books or other printed documents. About.com
describes some page layouts on their Web site: Perfect
Proportions Using Page Margins in Desktop Publishing.
• If you want the first page of a new chapter to always start on aright (recto) page, make sure that the page style for the firstchapter page is set for the right page only by making thisselection in the Layout settings field. The typical procedure forthe rest of a chapter is to define a single “mirrored” page style forboth left and right pages. A mirrored page can have different
headers and footers. If done this way, every chapter will use two
page styles.
• You can choose to define separate page styles for left and rightpages, if you want the pages to be very different in appearance(for example, different margins or headers and footers only onright pages but not on left pages; imagine a book with a full-page
photograph on the left pages and text on the right pages). In thatcase, make sure that the Next Style field for the first page style isthen set for a left-only page, which, in turn, is then set to befollowed by a right-only page style. If done this way, every chapter
will use three page styles. A hypothetical case might have thesepage-style names: First page, Left, and Right.
If you check the Register-true box, Writer will create a vertical gridon the page with a spacing between grid points that depends on theselected Reference Style. The vertical grid makes sure that text
printed on adjacent columns, opposite pages, or even both sides of thesame sheet of paper, is aligned—making it easier to read as well as
being more pleasant to see.

Background and Border pages
Use the Background page to apply a background or the Border page
to draw a border around text area of the page. You can choose between
a solid color or a graphic image for the background and several stylesof line for the borders. Note that the page area affected by these252

Free eBook Edition

OpenOffice.org 3.x Writer Guidechanges does not include the area outside the margins. If you plan toprint on colored paper and want to have a feel of the final result you
will obtain or want to use a light color for the font, rather thanchanging the background,then go to Tools > Options >Openoffice.org and in the Appearance section, change the Document
background color.

Header and Footer pages
You can associate a different header or footer to each page style. This
property makes it very easy to have different headers on left and rightpages, to avoid headers on pages at the start of a new chapter, and soon.
Setting up the header and footer pages is straightforward. The
instructions here refer to the header, but the footer page has the same
options. Activate the input boxes by selecting Header on, then specify
the left margin, right margin, and spacing to the main text area. For
the height of the header area, you can either select the AutoFit
height box, which will make Writer adapt the size to the contents, or
specify the height manually. Clicking More opens a new dialog box,
where you can set the borders and background of the header area.
If you deselect the Same content left/right box, you can specify adifferent header for left or right pages, even if you use a single stylefor both. Figure 238 shows an example.

Figure 238: Different content on left and right pages

Columns pageUse this page to create the desired column layout for the page style.
The page is subdivided into three sections: Settings, Width andSpacing and Separator Line. The Settings section contains thumbnails
of predefined columns settings you can select, as well as a text box
where you can enter the desired number of columns if you need tocreate a customized one.
After you select more than one column, the Width and Spacing section
becomes active. If you are not satisfied with the predefined settings(equally spaced columns), deselect the AutoWidth option and enterFree eBook Edition

Chapter 7 Working with Styles

253the parameters manually. When you work with multiple columns per
page, you can also fine tune the position and size of a separator line
between the columns.

Footnote pageUse this page to adjust the appearance of the footnotes. Keeping thedefault setting Not larger than page area, the footnotes area iscalculated automatically on the basis of the number of footnotes. If you
prefer to control manually the maximum space that footnotes can take,select the Maximum footnote height option and enter the value inthe preferred unit of measurement. Use the second section of the pageto customize the separator between the footnotes and the main area.

Example: A book chapter sequence of pages
Book chapters typically start on a right-hand page, with the first pageof the chapter having a different layout from the rest of the pages. The
other pages in the chapter are “mirrored” for double-sided printing.
For example, page numbers in the header or footer may be positionedon the outside edge of pages and a wider margin (allowing for binding)may be placed on the inside edge.
Table 4 shows the properties of two page styles (Right Page andDefault) set up for a typical book chapter’s sequence of pages.
Table 4. Properties of customized page styles for book chapter
Page Style

Desired effect

Property: setting

Right Page

First page always on theright (an odd-numbered
page)

Page > Page layout > Onlyright

No header or footer

Header > Header >Header on: Not selected

Top margin of page larger
than on other pages

Page > Margins > Top:
6.00cmMirrored margins

Page > Page layout:
Mirrored

Header with page number on
the top outside of the pageand chapter title in the top
middle center of the page

Header > Header on:
Selected
Header > Header > Same
content left/right: Not
selected

Default

254

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 239 illustrates the transitions from the Right Page to Default
page styles, with the change of header between left and right pages
shown by the # symbol.

Figure 239: Right Page and then the Default pagestyle with different headers for alternate pages.
Step 1. Set up the Right Page style.
1) On the Styles and Formatting window, click the Page Styles icon
(fourth from left) to display a list of page styles.
2) Right-click on Right Page and select Modify from the pop-up
menu.
3) On the Organizer page of the Page Style: Right Page dialog box,
change Next Style to Default.

Figure 240: Specifying the next style after the first page of a chapter4) On the Page page, specify a larger left margin for binding, and alarger top margin to move the chapter title down the page.

Free eBook Edition

Chapter 7 Working with Styles

255

Figure 241: Setting page margins and layout for the Right Page style5) On the Header and Footer pages, be sure the Header on andFooter on options are not selected. Click OK to save yourchanges.
6) On the Styles and Formatting window, in the list of page styles,
right-click on Default and select Modify from the pop-up menu.
7) On the Organizer page of the Page Style: Default dialog box, be
sure Next Style is set to Default.
Step 2. Set up the Default page style.
1) On the Page page of the Page Style: Default dialog box (Figure242), select Mirrored for Page layout and set the Inner andOuter margins to the same width as the Left and Right margins,
respectively, on the Right Page style.
2) On the Header page of the Page Style: Default dialog box (Figure243), select the Header on option and deselect the Same
content left/right option. Click OK to save your changes.

256Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 242: Setting page margins and layout for the Default
page style

Figure 243: Setting up the header properties for the Default
page style
Step 3. Set up the Heading 1 paragraph style to start on a newright-hand page.
1) In the Styles and Formatting window, on the Paragraph Styles
page, right-click on Heading 1 and select Modify.
2) On the Text Flow page of the Paragraph Style dialog box (Figure244), in the Breaks section, select Insert, With Page Style, andRight Page. Click OK to save your changes.

Figure 244: Setting a paragraph style to start on a page of a
selected style

Free eBook Edition

Chapter 7 Working with Styles

257

Step 4. Start a new chapter.
Apply the Heading 1 paragraph style to the first paragraph, which willbe the title of the chapter.
Note

By default, the Heading 1 paragraph style is assigned to
Outline Level 1. The assignment of paragraph styles to outline
levels is done through Tools > Outline Numbering.

Step 5. Set up the page headers.
1) On a left page, put the cursor in the header and insert a page
number field on the left (Insert > Fields > Page Number).
2) Press Tab to put the cursor in the middle and insert a Chapter
reference:
Press Control+F2 (or choose Insert > Fields > Other from themenu bar) to display the Fields dialog box (Figure 245).
On the Document page, for Type, select Chapter and for Format,
select Chapter name. Make sure that Layer is set to 1 and thenclick Insert.
3) On a right page, put the cursor in the header, press the Tab key,insert a Chapter reference, press Tab again, and insert a page
number field.
4) If you need to adjust the tab stops for the header, modify the
Header paragraph style. Do not manually adjust the tab stops.

Figure 245: Inserting a chapter title into the header of a page258

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Working with list styles
List styles (also called numbering styles) work together with paragraphstyles. They define indentation, alignment, and the numbering or bullet
characters used for list items. You can define many list styles, from
simple bulleted lists to complex multi-level (nested) lists.
As with other styles, the main reasons for using list styles are
consistency and speeding up your work. Although you can create
simple lists quickly by clicking the Numbering On/Off or Bullets
On/Off icons on the Formatting toolbar, and create quite complex
nested lists using the icons on the Bullets and Numbering toolbar, theappearance of the resulting lists may not be what you want—and you
might want to have more than one style of list. You can use the Bullets
and Numbering choice on the Format menu to manually format theappearance of some or all of the lists, but if you later need to change
their appearance, you will have a lot of manual work to do.

Note

OOo uses the terms “numbering style” and “list style”
inconsistently, but they are the same thing. For example, thetooltip in the Styles and Formatting window says “List Styles”,
but its style dialog box says “Numbering Style”.

Defining the appearance of a nested list
A nested list is a numbered or bulleted list with subordinate (usuallyindented) numbered or bulleted lists. Rather than just a list of
numbered items (1,2,3...), a nested list may have item 1, then indented
items numbered a,b,c or i,ii,iii or some other numbering method before
the main number 2. With numbering styles, you can achieve any
combination of numbering formats you want. A nested list may evencombine numbered items with bulleted items.
There is no difference between defining a nested list style or a simple
list, although nested lists require more work. An example of a nested
list is given in Chapter 3 (Working with Text). In that case, the list was
built using one of the predefined outline schemes as a starting point,
while in this section we follow a more general approach so that the list
can fully suit your needs.

Free eBook Edition

Chapter 7 Working with Styles

259

Creating a new list style
The dialog box to create a new list style consists of six pages, inaddition to the usual Organizer page discussed in “The Organizerpage” on page 226.

Bullets, Numbering Styles, and Graphics pages
The Bullets, Numbering Style, and Graphics pages contain predefinedformatting for list item symbols (bullets or numbers). To use one ofthem for your style, click on the image. A thick border indicates theselection. The bullets on the Bullets tab are font characters; those on
the Graphics tab are graphics.
If you choose a graphics bullet, you can select the Link Graphics
option to create a link to the graphic object rather than embedding itin the document. If you decide to link the graphic, keep in mind thatthe bullet will not be displayed when the document is opened on adifferent computer (unless the same graphic file is located in the same
location on both computers) or if the graphic file used is moved to adifferent location on the computer.

Outline pageUse the Outline page to select from eight predefined nested lists. You
can also select one and use it as a starting point for your own style,customizing the list using the Position page and the Options page, as
described below.

Position pageUse the Position page (Figure 246) to fine tune the indentation andspacing of the the list item symbol and the text of the list item. This
page is particularly effective when used in combination with the
Options page.
You can adjust the following settings for each individual level or all at
once (to make them all the same). It is generally easier to adjust thesettings in the order given below, instead of the order on the dialog
box. That is, start from the overall indentation for the list elements,
then fix the position of the symbols, and finally adjust the alignment of
the symbols.
• Numbering followed by: the character to follow the numbering
symbol (plus any characters—for example a punctuation mark—chosen on the Options page to appear after the number). Choose

260Free eBook Edition

OpenOffice.org 3.x Writer Guidebetween a tab stop, a space, or nothing. If you select the tab stop,
you can specify the position of the tab.
• Indent at: how much space is reserved for the numbering
symbol, measured from the left page margin. The alignment of
the first line of the list is also affected by any tab you may have
set to follow the numbering.
• Aligned at: the position of the numbering symbol, measured fromthe left margin of the page.
• Numbering alignment: how the numbering (including any text
before or after as set in the Options page) will be aligned. The
Aligned at value determines the symbol alignment.

Figure 246: Position settings for a List style
Note

When defining an indentation different from 0, the position of
the tabulation is not considered.

Tip

In normal circumstances, setting the Numbering followed bydistance to be equal to the Indent at distance works well. See
Figure 247 for a graphic representation of the effects of theabove parameters.

Free eBook Edition

Chapter 7 Working with Styles

261

Figure 247: A numbered list of CD tracks highlighting
the various elements
Position page for earlier versions of OOo
If your document was created with an earlier version of OOo, or if the
document was saved for compatibility reasons using the ODF fileformat version 1.1 or earlier, the position dialog will appear as in
Figure 248.

Figure 248: The Position page for documents created withearlier versions of OOo
In this case you can adjust the following settings:• Indent: the indentation of the number or bullet area, measured
from the left margin of the paragraph linked to the numbering
style. In other words, if the paragraph style already has anindentation, when the list style is applied the indentations areadded together.

262

Free eBook Edition

OpenOffice.org 3.x Writer Guide

For any level other than Level 1, the Relative option causes theindentation to be measured from the start of the previous level
rather than from the page margin.
• Width of numbering: how much space is used by the numbering
symbol. Writer reserves this space, even if only part of it is used.
• Minimum spacing numbering <-> text: the spacing between
the right edge of the numbering symbol and the text. If thespacing to text is not sufficient, Writer will honor this setting by
expanding the numbering area. Setting the minimum spacing
between numbering and text is very useful when right-aligning
the numbering or when there is much text before or after thenumbering.
• Numbering alignment: how the numbering (including any text
before or after) will be aligned.

Tip

To fully appreciate how the Numbering alignment works, try tocreate a numbered list with more than ten elements and makesure that enough room has been made for numbers with two or
more digits. You may also wish to right-align numbers 10 orgreater, as in Figure 232 on page 240.

Options pageUse the Options page to define the style of the outline levels.

Figure 249: The Options page for a list style

Free eBook Edition

Chapter 7 Working with Styles

263

The options available on this page depend on the type of marker
selected for the list. First, on the left side, select the level you want tomodify. To modify all ten levels at once, select 1 – 10 as the level. If
you started from a predefined outline, some of the levels will alreadyhave settings.
Depending on the numbering style selected in the Numbering box(bullet, graphic, numbering), some of the following options become
available on the page:• Before: any text to appear before the number (for example,
Step).
• After: any text to appear after the number (for example, apunctuation mark).
• Color: the color for the list marker (number or bullet character).
• Relative size: the size of the number relative to the size of thecharacters in the paragraph of the list.
• Start at: the first value of the list (for example, you might want
the list to start at 4 instead of 1).
• Character Style: the style to be used for the number or bullet.
• Character button: click to select the character for the bullet.
• Graphics selection button: opens a list of available graphics(Gallery) or allows the selection of a file on the hard disk to be
used as the list marker.
• Width and Height: the dimensions of the graphic marker.
• Alignment: the alignment of the graphic object.
• Keep ratio option: fixes the ratio between the width and theheight of the graphic marker.
The right-hand side of the dialog box shows a preview of themodifications made.
To revert to the default values, click the Reset button in the bottom
right corner. Finally, if you wish to use consecutive numbers regardlessof the outline level, check the Consecutive numbering box at thebottom of the page.

Combining list and paragraph styles
When applying a list style, the underlying paragraph style remains
unchanged. If your list must also have a certain font size, indentations,and so on, you might expect to first apply a paragraph style and then alist style (or vice versa). However, you can embed a list style in a

264

Free eBook Edition

OpenOffice.org 3.x Writer Guideparagraph style using the Numbering page of the Paragraph Style
dialog box, and then apply only the paragraph style to the list.
This section gives an example of combining list and paragraph styles.
1) Create a list style you want to use for the paragraph. For
example: MyNumberedList.
2) Create a new paragraph style.
3) On the Organizer page of the Paragraph Style dialog box:d) Give the new paragraph style a name, say
NumberedParagraph.
e) For the Next Style, choose NumberedParagraph (this will
make the following paragraph also be in this style, until you
choose a different style).
f) In Linked with, choose None.
g) Leave Custom Styles, in the Category field.
4) Set up this paragraph style to your liking. Because theindentation is controlled by the List style, to avoid undesiredinteractions do not change the indent settings on the Indents &Spacing page. (You might want to change the spacing above andbelow the paragraph.)5) On the Outline & Numbering page, choose the
MyNumberedList style created in step 1.
6) Click OK to save this style.
To have full control, it is common practice to define three baseparagraph styles for lists: List Start for the first element of the list, List
Continue for the subsequent elements of the list, and List End for thelast element of the list. You should also define a paragraph style to be
used for unnumbered list items (one for each nested level you intend touse) as well as an introductory style for the paragraph preceding thestart of the list (to allow for keeping the introductory paragraph withthe first list item, or for specifying spacing before the first list item thatis different from the spacing between other paragraphs).

Example: Creating a simple list style
In this example, we will create a numbered list that is used to number
the songs on a CD. The numbers are right aligned, and some space isleft between the number and the title of the track.
As we want to reuse the same numbered list for other CDs, we willdefine a new list style and then apply it to the tracks list.

Free eBook Edition

Chapter 7 Working with Styles

265Creating the CDTracks numbered list
As for the previous example, start by clicking the List Styles icon (fifthfrom the left) in the Styles and Formatting window. Then right-click
anywhere in the list box and choose New.
The Numbering style dialog box is displayed. For the CDTracks style,we need to customize fields in the Organizer, the Options, and the
Position pages.
Style fields

Description

Name

Enter CDTrack

Category

Custom styles will be OK for us.

Modify the options of the Options page as follows:
1) In the Level box, choose 1.
2) In the Numbering list, choose 1, 2, 3, ....
3) Leave the Before and After boxes unchanged, or delete anythingthat is in them.
4) Leave the Character Style field as None.
5) Make sure Start at is set to 1.
6) Show sublevels should be grayed out. Do not select Consecutive
numbering.
As discussed above, the numbering list will adopt settings of theunderlying paragraph style. If you want to use a special font, size orcolor for the numbering, you can create a character style and apply itin the Options page.
If you want the word Track to appear before the number, just add it to
the Before field in the Options dialog box. Do not forget to add a spacecharacter to separate the word from the number.
Set up the final parameters of the CDTracks list style in the Position
page.
1) In the Level box, choose 1.
2) For Numbering followed by, choose tab stop and set it at 4.0cm.
3) For Numbering alignment, choose Right.
4) For Aligned at choose 1.5cm. (this refers to the alignment of thenumbers)5) For Indent at choose 4.0cm. (This sets the indentation of thewhole list.) Click OK to finish.

266

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Applying the list style
Now that the list style is available, it can be quickly applied to any listin the document:
1) If starting a new list, before pressing Enter to start a new line,
double-click on the desired list style name in the Styles andFormatting window.
2) If you already have a list, select it and then double-click on thedesired list style name in the Styles and Formatting window.

Note

Remember that applying a list style does not affect thecharacteristics of the underlying paragraph; therefore you may
want to check if you are satisfied with the paragraph style
before applying the list style.

If you have more than one list in a document, the second andsubsequent lists with the same style continue their numbering from theprevious list. To restart at 1, place the cursor anywhere in theparagraph you want numbered 1, right-click, and choose Restart
numbering.
To stop using numbering, press the Numbering On/Off icon on theStandard toolbar. The final result is illustrated in Figure 232.

Free eBook Edition

Chapter 7 Working with Styles

267

8

Chapter
Working with Graphics

Free eBook Edition

Graphics (images) in Writer
When you create a text document using OpenOffice.org (OOo) Writer,
you may want to include some illustrations. Illustrations (graphics) areadded to documents for a wide variety of reasons: from supporting thedescription provided in the text—as used in this Guide—to providing an
immediate visual representation of the contents, as is often found in a
newspaper.
Graphics in Writer are of three basic types:• Image files, such as photos, drawings, and scanned images• Diagrams created using OOo’s drawing tools• Charts created using OOo’s Chart facility
This chapter covers images and diagrams.
More detailed descriptions on working with drawing tools can be foundin the Draw Guide and Impress Guide. Instructions on how to create
charts are given in the Calc Guide.

Creating and editing images
You might create images (also called ‘pictures’ in OpenOffice.org)
using a graphics program, scan them, or download them from theInternet (make sure you have permission to use them), or use photos
taken with a digital camera. Writer can import various vector (linedrawing) and raster (bitmap) file formats. The most common are GIF,
JPG, PNG, and BMP. See the Help for a full list.
Some things to consider when choosing or creating pictures include
image quality and whether the picture will be printed in color or black
and white (grayscale).
To edit photos and other bitmap images, use a bitmap editor. To edit
line drawings, use a vector drawing program. You do not need to buy
expensive programs. Open-source (and usually no-cost) tools such as
Gimp (bitmap editor) and Inkscape (vector drawing program) are
excellent. For many graphics, OOo Draw is sufficient. These and manyother programs work on Windows, Macintosh OS X, and Linux.
For best results:• Create images that have the exact dimensions required for the

document, or use an appropriate graphics package to scale
photographs and large drawings to the required dimensions. Do
not scale images with Writer, even though Writer has tools for

Free eBook Edition

Chapter 8 Working with Graphics269

doing this, because the results might not be as clear as you would
like.
• Do any other required image manipulation (brightness andcontrast, color balance, cropping, conversion to grayscale, and soon) in a graphics package, not in Writer, even though Writer has
the tools to do a lot of these things too.
• If the document is meant for screen use only, there is no need touse high resolution images of 300 or more dpi (dots per inch).
Most computer monitors work at between 72 and 96 dpi, reducing
the resolution (and the file size) has no negative impact on what isdisplayed but does make Writer more responsive.

Preparing images for black-and-white printing
If color images are to be printed in grayscale, check that any adjacentcolors have good contrast and print dark enough. Test by printing on a
black-and-white printer using a grayscale setting. Better still: change
the “mode” of the image to grayscale, either in a photo editor or inWriter itself (see “Graphics mode” on page 276).
For example, the following diagram looks good in color. The circle isdark red and the square is dark blue. In grayscale, the difference
between the two is not so clear. A third element in the diagram is ayellow arrow, which is almost invisible in grayscale.

Original drawing in color

Drawing printed in grayscale

Changing the colors of the circle and the arrow improves the contrast
and visibility of the resulting grayscale image.

Original drawing in color

270

Drawing printed in grayscaleFree eBook Edition

OpenOffice.org 3.x Writer GuideIf the document will be available in black-and-white print only, a better
result can often be obtained by choosing grayscale fills, not color fills—
and you don’t have to guess and test to see if you’ve made good
choices.

Adding images to a document
Images can be added to a document in several ways: by inserting animage file, directly from a graphics program or a scanner, or from theOOo Gallery.

Inserting an image file
When the image is in a file stored on the computer, you can insert it
into an OOo document using either of the following methods.

Drag and drop1) Open a file browser window and locate the image you want toinsert.
2) Drag the image into the Writer document and drop it where youwant it to appear. A faint vertical line marks where the image will
be dropped.
This method embeds (saves a copy of) the image file in the Writer
document. To link the file instead of embedding it, hold down theControl+Shift keys while dragging the image.

Insert Picture dialog
1) Click in the OOo document where you want the image to appear.
2) Choose Insert > Picture > From File from the menu bar.
3) On the Insert Picture dialog, navigate to the file to be inserted,
select it, and click Open.
At the bottom of the dialog are two options, Preview and Link. SelectPreview to view a thumbnail of the selected image on the right, so you
can verify that you have the correct file. See below for the use of Link.

Free eBook Edition

Chapter 8 Working with Graphics

271

Figure 250: Insert picture dialog

Linking an image file
If the Link option in the Insert picture dialog is selected, OOo createsa link to the file containing the image instead of saving a copy of theimage in the document. The result is that the image is displayed in the
document, but when the document is saved, it contains only areference to the image file—not the image itself. The document and theimage remain as two separate files, and they are merged together only
when you open the document again.
Linking an image has two advantages and one disadvantage:• Advantage – Linking can reduce the size of the document when it
is saved, because the image file itself is not included. File size isusually not a problem on a modern computer with a reasonableamount of memory, unless the document includes many large
graphics files; OOo can handle quite large files.
• Advantage – You can modify the image file separately withoutchanging the document because the link to the file remains valid,
and the modified image will appear when you next open the
document. This can be a big advantage if you (or someone else,
perhaps a graphic artist) is updating images.
• Disadvantage – If you send the document to someone else, ormove it to a different computer, you must also send the image
files, or the receiver will not be able to see the linked images. You
need to keep track of the location of the images and make sure
the recipient knows where to put them on another machine, so
the document can find them. For example, you might keep images
272

Free eBook Edition

OpenOffice.org 3.x Writer Guide

in a subfolder named Images (under the folder containing the
document); the recipient of the file needs to put the images in a
subfolder with the same name (under the folder containing the
document).

Note

When inserting the same image several times in the document
it would appear beneficial to create links; however, this is notnecessary as OOo embeds in the document only one copy of
the image file.

Embedding linked images
If you originally linked the images, you can easily embed one or moreof them later if you wish. To do so:1) Open the document in OpenOffice.org and choose Edit > Links.
2) The Edit Links dialog (Figure 251) shows all the linked files. In
the Source file list, select the files you want to change from linked
to embedded.
3) Click the Break Link button.
4) Save the document.
Note

Going the other way, from embedded to linked, is not so easy—
you must delete and reinsert each image, one at a time,
selecting the Link option when you do so.

Figure 251: The Edit Links dialog

Free eBook Edition

Chapter 8 Working with Graphics

273

Inserting an image from the clipboard
Using the clipboard, you can copy images into an OOo document fromanother OOo document and from other programs. To do this:1) Open both the source document and the target document.
2) In the source document, select the image to be copied.
3) Move the mouse pointer over the selected image and press
Control+C to copy the image to the clipboard.
4) Switch to the target document.
5) Click to place the cursor where the graphic is to be inserted.
6) Press Control+V to insert the image.
CautionIf the application from which the graphic was copied is closed
before the graphic is pasted into the target, the image stored on
the clipboard could be lost.

Inserting an image using a scanner
If a scanner is connected to your computer, OOo can call the scanningapplication and inserted the scanned item into the OOo document as
an image. To start this procedure, click where you want the graphic to
be inserted and select Insert > Picture > Scan > Select Source.
Although this practice is quick and easy, it is unlikely to result in ahigh-quality image of the correct size. You may get better results byscanned material into a graphics program and cleaning it up there
before inserting the resulting image into OOo.

Inserting an image from the Gallery
The Gallery provides a convenient way to group reusable objects suchas graphics and sounds that you can insert into your documents. The
Gallery is available in all components of OOo. It does not come withmany graphics, but you can add your own pictures or find extensions
containing more graphics. The Gallery is explained in more detail in
Chapter 11 (Graphics, the Gallery, and Fontwork) in the Getting
Started guide. For more about extensions, see Chapter 17(Customizing Writer) in this book.

274

Free eBook Edition

OpenOffice.org 3.x Writer Guide

This section explains the basics of inserting a Gallery image into a
Writer document:
1) To open the Gallery, click on the Gallery icon
(located in theright side of the Standard toolbar) or choose Tools > Gallery
from the menu bar.
2) Navigate through the Gallery to find the desired picture.
3) To insert the picture, click and drag it from the Gallery into theWriter document. You can also right-click on the picture andchoose Insert > Copy.
Figure 252 shows an example of an image dragged from the Gallery.

Figure 252. Inserting an image from the Gallery
By default, the Gallery is docked above the Writer workspace. To
expand the Gallery, position the pointer over the line that divides itfrom the top of the workspace. When the pointer changes to parallellines with arrows, click and drag downward. The workspace resizes in
response.
To expand the Gallery without affecting the workspace, undock it so it
floats over the workspace. To do so, hold down the Control key anddouble-click on the upper part of the Gallery next to the View icons.
Double-click in the same area while holding down the Control key todock it again (restore it to its position over the workspace).

Free eBook Edition

Chapter 8 Working with Graphics

275When the Gallery is docked, to hide it and view the full Writer
workspace, click the Hide/Show button in the middle of the thin bar
separating the Gallery from the workspace.
To close the Gallery, choose Tools > Gallery to uncheck the Gallery
entry, or click on the Gallery icon again.

Modifying an image
When you insert a new image, you may need to modify it to suit the
document. The placement of the picture relative to the text is
discussed in “Positioning graphics within the text” on page 286. Thissection describes the use of the Picture toolbar, resizing, cropping, anda workaround to rotate a picture.
Writer provides many tools for working with images. These tools are
sufficient for most people’s everyday requirements, However, forprofessional results it is generally better to use an image manipulation
program such as GIMP to modify images (for example, to crop, resize,
rotate, and change color values) and then insert the result into OOo.
GIMP is an open-source graphics program that can be downloaded
from http://www.gimp.org/downloads/.

Using the Picture toolbar
When you insert an image or select one already present in the
document, the Picture toolbar appears. You can set it to always bepresent (View > Toolbars > Picture). Picture control buttons fromthe Picture toolbar can also be added to the Standard Toolbar. See
Chapter 17 (Customizing Writer) for more information.
This toolbar can be either floating or docked. Figure 253 shows what
the Picture toolbar looks like when it is floating.
Two other toolbars can be opened from this one: the Graphic Filter
toolbar, which can be torn off and placed elsewhere on the window,
and the Color toolbar, which opens as a separate floating toolbar.
From these three toolbars, you can apply small corrections to thegraphic or obtain special effects.

Graphics mode
You can change color images to grayscale by selecting the image andthen selecting Grayscale from the Graphics mode list

276

Free eBook Edition.

OpenOffice.org 3.x Writer Guide

Flip vertically or horizontally
To flip an image vertically or horizontally, select the image, and thenclick either the relevant icon.

Filters
Table 5provides a short description of the available filters, however thebest way to understand them is to see them in action. Feel free toexperiment with the different filters and filters settings, rememberingthat you can undo all the changes by pressing Ctrl+Z or
Alt+Backspace or by selecting Edit > Undo.
1 From File
2 Filter
3 Graphics mode
4 Color
5 Transparency
9
6 Flip Horizontally
19
7 Flip Vertically20
1018
8 Graphics Properties
11
9 Invert
21
17
10 Smooth
1222
11 Solarization
13 14 1516
12 Aging
23
13 Charcoal Sketch
24
14 Relief
15 Mosaic
25
16 Posterize
17 Pop Art
Note: Graphics mode (3) can be Default, Grayscale,
18 Sharpen
Black/White, or Watermark.
19 Remove Noise
20 Red21 Green
22 Blue
Figure 253. Picture toolbar plus tear-off Graphic 23 Brightness
24 Contrast
Filter toolbar and floating Color toolbar
25 Gamma
1

2

3

4

5

6

7

8

Color
Use this toolbar to modify the individual RGB color components of theimage (red, green, blue) as well as the brightness, contrast, andgamma of the image. If the result is not satisfactory, you can press
Control+Z to restore the default values.

Free eBook Edition

Chapter 8 Working with Graphics

277

Table 5: Graphic filters and their effects
Icon

Name

EffectInvertInverts the color values of a color image or thebrightness values of a grayscale image.

SmoothSoftens the contrast of an image.

SharpenIncreases the contrast of an image.

Remove noise

Removes single pixels from an image.

Solarization

Mimics the effects of too much light in a picture.
A further dialog box opens to adjust theparameters.

Aging

Simulates the effects of time on a picture. Can beapplied several times. A further dialog box opens
to adjust the aging level.

Posterize

Makes a picture appear like a painting by
reducing the number of colors used.

Pop ArtModifies the picture dramatically.

Charcoal

Displays the image as a charcoal sketch.

Relief

A dialog box is displayed to adjust the lightsource that will create the shadow and, hence,
the relief effect.

MosaicJoins groups of pixels into a single area of one
color.

Transparency
Modify the percentage value in the Transparency box
on thePicture toolbar to make the image more transparent. This isparticularly useful when creating a watermark or when wrapping theimage in the background.

Using the Formatting toolbar and Picture dialog
When an image is selected, you can customize some aspects of its
appearance using the tools available on the Formatting toolbar (shownin Figure 258) as well as in the dialog that is shown by right-clicking
on the image and selecting Picture (see Figure 254). You can, forexample, create a border around the image, selecting style and color;

278

Free eBook Edition

OpenOffice.org 3.x Writer Guide

or you can (in the Borders page of the Picture dialog) add a shadow to
the image.

Cropping images
When you are only interested in a section of the image for the purposeof your document, you may wish to crop (cut off) parts of it. The userinterface offered in Writer for cropping an image is not very friendly, so
it may be a better choice to use a graphics package.
Note

If you crop an image in Writer, the picture itself is not changed.
If you export the document to HTML, the original image isexported, not the cropped image.

To start cropping the image, right-click on it and select Picture fromthe pop-up menu. In the Picture dialog box, select the Crop page.

Figure 254: The options available when cropping a picture
In the Crop page, you can control the following parameters:
Keep scale / Keep image size
When Keep scale is selected (default), cropping the image does notchange the scale of the picture.
When Keep image size is selected, cropping produces enlargement(for positive cropping values), shrinking (for negative cropping
values), or distortion of the image so that the image size remains
constant.

Free eBook Edition

Chapter 8 Working with Graphics

279

Left, Right, Top, and Bottom
The image is cropped by the amount entered in these boxes. For
example, a value of 3cm in the Left box cuts 3 cm from the left sideof the picture.
• When Keep scale is selected, the size of the image also changes,
so in this example the width will be reduced by 3 cm.
• When Keep image size is selected, the remaining part of theimage is enlarged (when you enter positive values for cropping)or shrunk (when you enter negative values for cropping) so thatthe width and height of the image remains unchanged.
Width and Height
The Width and Height fields under either Scale or Image sizechange as you enter values in the Left, Right, Top, and Bottom
fields. Use the thumbnail next to these fields to determine thecorrect amount by which to crop.

Resizing an image
The inserted image might not fit perfectly into the document if it is too
big or too small. In these cases you can use Writer to resize the image.
1) Click the picture, if necessary, to show the green resizing handles.
2) Position the pointer over one of the green resizing handles. The
pointer changes shape giving a graphical representation of thedirection of the resizing.
3) Click and drag to resize the picture.
4) Release the mouse button when satisfied with the new size.
The corner handles resize both the width and the height of the graphic
object simultaneously, while the other four handles only resize one
dimension at a time.
Tip

To retain the original proportions of the graphic, Shift+click
one of the corner handles, then drag. Be sure to release themouse button before releasing the Shift key.

Be aware that re-sizing a bit-mapped (raster) image will adversely
affect the resolution, causing some degree of blurring. It is better toexternally size your picture correctly before insertion into yourpresentation, if possible.
Figure 255 shows three examples of an image inserted into adocument and resized.

280

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 255. Three examples of resized images, plus
the original image
For more accurate resizing, use either the Crop page of the Picture
dialog box (Figure 254) or, for images, the Type page of the Picture
dialog box. On the Crop page you can either adjust the following
settings or use the settings in the Crop section as described on page279.
• Scale Width and Height: specify in percentages the scaling of
the picture. The size of the image changes accordingly. For ascaled resizing, both values should be identical.
• Image size: specify the size of the image in your preferred unit ofmeasurement. The image enlarges or shrinks accordingly.
• Original size button: when clicked, restores the image to its
original size.
In the Type page of the Picture dialog box, select the Relative option
to toggle between percentage and actual dimension. For a scaled
resizing, select the Keep ratio option. As for the Crop page, clicking
on the Original Size button restores the original image size.

Free eBook Edition

Chapter 8 Working with Graphics

281

Rotating a picture
Writer does not provide a tool for rotating a picture; however, there isa simple workaround:1) Open a new Draw or Impress document (File > New > Drawing
or File > New > Presentation).
2) Insert the image you want to rotate. You can use any of themechanisms described in “Adding images to a document” on page271, although there are some slight variations in the position of
the menu entries and icons.
3) Select the image, then in the Drawing toolbar (shown by default
at the bottom of the window in Impress and Draw), select the
Rotate iconfrom the Effects tear-off toolbar.
4) Rotate the image as desired. Use the red handles at the corners of
the picture and move the mouse in the direction you wish torotate. By default the picture rotates around its center (indicatedby a black crosshair), but you can change the pivot point bymoving the black crosshair to the desired rotation center.
Tip

To restrict the rotation angle to multiples of 15 degrees keep
the Shift key pressed while rotating the image.

5) Select the rotated picture by pressing Ctrl+A, then copy theimage to the clipboard with Ctrl+C.
6) Finish by going back to the location of the Writer document
where the image is to be inserted and pressing Ctrl+V.

Other settings
The Picture dialog box (Figure 254) consists of eight pages. The Crop
page was described on page 279, while the use of the Type and the
Wrap pages is explained in “Positioning graphics within the text” onpage 286. The other pages serve the following purposes:• Options: use this page to give the picture a descriptive name (asyou want it to appear in the Navigator), display alternative text
when the mouse hovers over the picture, and protect some of thepicture settings from accidental changes. You can also preventthe picture from being printed by deselecting the corresponding
option.
• Borders: use this page to create borders around the picture. The
Borders dialog box is the same as the one used for defining tableor paragraph borders. You can also add a shadow to the image if
so desired.
282

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Background: use this page to change the background color of

the picture. This setting produces the desired results only forimages with a transparent color.
• Hyperlink: use this page to associate a hyperlink to the picture.
you can also create an image map so that only certain areas of thepicture respond to a mouse click by opening the associated URI(Uniform Resource Identifier) in the default browser. Moreinformation on image maps can be found in the Impress Guide.
• Picture: use this page to flip the picture as well as to display theoriginal location of the file in case the image is linked rather thanembedded.
• Macro: allows you to associate a macro to the picture. You canchoose among the predefined macros or write your own.

Deleting a picture
To delete a picture:1) Click on the picture, to show the green resizing handles.
2) Press Delete.

Using Writer’s drawing tools
You can use Writer’s drawing tools to create graphics, such as simple
diagrams using rectangles, circles, lines, text, and other predefined
shapes. You can also group several drawing objects to make sure they
maintain their relative position and proportion.
You can place the drawing objects directly on a page in your document,or you can insert them into a frame.
You can also use the drawing tools to annotate photographs, screen
captures, or other illustrations produced by other programs, but this is
not recommended because:• You cannot include images in a group with drawing objects, sothey may get out of alignment in your document.
• If you convert a Writer document to another format, such asHTML, the drawing objects and the graphics will not remain
associated; they are saved separately.
In general, if you need to create complex drawings, it is recommended
to use OpenOffice.org Draw, which includes many more features suchas layers, styles, and so on.

Free eBook Edition

Chapter 8 Working with Graphics

283

Creating drawing objects
To begin using the drawing tools, display the Drawing toolbar, by
clicking View > Toolbars > Drawing.
If you are planning to use the drawing tools repeatedly, you can tear off
this toolbar and move it to a convenient place on the window.

1 Select
2 Line3 Rectangle
4 Ellipse

5 Freeform Line
6 Text7 Callouts
8 Basic Shapes

9 Symbol Shapes
10 Block arrows
11 Flowcharts
12 Callouts

13 Stars
14 Points
15 Fontwork Gallery
16 From File
17 Extrusion On/Off

Figure 256. The Drawing toolbar
To use a drawing tool:
1) Click in the document where you want the drawing to beanchored. You can change the anchor later, if necessary.
2) Select the tool from the Drawing toolbar. The mouse pointerchanges to a drawing-functions pointer.
3) Move the cross-hair pointer to the place in the document where
you want the graphic to appear and then click-and-drag to create
the drawing object. Release the mouse button. The selecteddrawing function remains active, so you can draw another objectof the same type.
4) To cancel the selected drawing function, press the Esc key orclick on the Select icon (the arrow) on the Drawing toolbar.
5) You can now change the properties (fill color, line type andweight, anchoring, and others) of the drawing object using either
the Drawing Object Properties toolbar (Figure 257) or the choices
and dialog boxes reached by right-clicking on the drawing object.

Set or change properties for drawing objects
To set the properties for a drawing object before you draw it:1) On the Drawing toolbar (Figure 256), click the Select tool.
2) On the Drawing Object Properties toolbar (Figure 257), click on
the icon for each property and select the value you want for thatproperty.

284

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) For more control, or to define new attributes, you can click on the
Area or Line icons on the toolbar to display detailed dialog boxes.
The default you set applies to the current document and session. It is
not retained when you close the document or close Writer, and it does
not apply to any other document you open. The defaults apply to all thedrawing objects except text objects.

1 Line5 Line Color

9 To Foreground

13 Alignment

2 Arrow Style

6 Area10 To Background

14 Change Anchor

3 Line Style

7 Area Style / Filling 11 Bring to Front

15 Ungroup

4 Line Width

8 Rotate

16 Group

12 Send to Back

Figure 257. Drawing Object Properties toolbar
To change the properties for an existing drawing object:
1) Select the object.
2) Continue as described above.
You can also specify the position and size, rotation, and slant andcorner radius properties of the drawing object:
1) Right-click on the drawing object and then click Position and Sizefrom the pop-up menu. The Position and Size dialog box isdisplayed.
2) Choose any properties, as required.

Resizing a drawing object
The same considerations for resizing an image apply also to resizing an
object. Select the object, click on one of the eight handles around it
and drag it to its new position. For a scaled resizing, select one of thecorner handles and keep the Shift key pressed while dragging thehandle to its new position.
For more sophisticated control of the size of the object, select Format> Object > Position and Size from the menu bar. Use the Position
and Size dialog box to set the width and height independently. If the
Keep ratio option is selected, then the two dimensions change so thatthe proportion is maintained, allowing for a scaled resizing.

Free eBook Edition

Chapter 8 Working with Graphics

285

Grouping drawing objects
To group drawing objects:
1) Select one object, then hold down the Shift key and select theothers you want to include in the group. The bounding box
expands to include all the selected objects.
2) With the objects selected, hover the mouse pointer over one ofthe objects and choose Format > Group > Group from the menu
bar or right-click and choose Group > Group from the pop-up
menu.
Note

You cannot include an embedded or linked graphic in a groupwith drawing objects.

Positioning graphics within the text
When you add a graphic to a text document, you need to choose how toposition it with respect to the text and other graphics. The positioningof graphics is often rather time-consuming and may be very frustrating
for both inexperienced and experienced users. As Writer is a word
processor rather than a desktop publishing program, there are some
limitations to the flexibility in positioning images and it takes time to
get things exactly as you would like them.
Positioning of a graphic is controlled by four settings:• Arrangement refers to the placement of a graphic on an
imaginary vertical axis. Arrangement controls how graphics arestacked upon each other or relative to the text.
• Alignment refers to the vertical or horizontal placement of agraphic in relation to the chosen anchor point.
• Anchoring refers to the reference point for the graphics. This
point could be the page, or frame where the object is, aparagraph, or even a character. An image always has an anchor
point.
• Text wrapping refers to the relation of graphics to thesurrounding text, which may wrap around the graphic on one orboth sides, be overprinted behind or in front of the graphic, or
treat the graphic as a separate paragraph or character.

286

Free eBook Edition

OpenOffice.org 3.x Writer Guide

The settings can be accessed in a number of ways, depending on thenature of the graphics:
1) From the Format menu, where you can find Alignment,
Arrange, Wrap, and Anchor (both for images and drawing
objects).
2) From the pop-up menu displayed when you right-click on thegraphic.
3) From the Object toolbar shown in Figure 258.
4) For images, from the Type and Wrapping pages of the Picture
dialog box. Note that you cannot control the arrangement using
the dialog box. To open the Picture dialog box, click on the image
to select it and then choose Format > Picture or right-click on
the graphic and choose Picture on the pop-up menu.
5) For drawing objects, from the Position and Size page of the
Position and Size dialog box. To open the Position and Size dialog
box, click on the drawing object to select it and then choose
Format > Object > Position and Size or right-click on thegraphic and choose Position and Size on the pop-up menu. Notethat you can only control the alignment and anchoring.

1 Apply Style

6 Center Horizontal

11 Borders

16 Bring to Front

2 Wrap Off

7 Align Right

12 Line Style

17 Send to Back

3 Page Wrap

8 Top

13 Line Color (of theborder)18 Change Anchor

4 Wrap Through9 Center

14 Background Color

19 Link Frames

5 Align Left

10 Bottom

15 Frame Properties

20 Unlink Frames

Figure 258. Object toolbar (graphical control of positioning for images)

Arranging graphics
Arranging a graphic object means to determine its vertical position
relative to other graphic objects or text. Arranging is only relevant
when objects are overlapping. You can choose between four settings,
plus a special setting for drawing objects:
Bring to Front
Places the graphic on top of any other graphics or text.

Free eBook Edition

Chapter 8 Working with Graphics

287

Bring Forward
Brings the graphic one level up in the stack (z-axis). Depending on
the number of overlapping objects, you may need to apply thisoption several times to obtain the desired result.
Send Backward
The opposite of Bring Forward; sends the selected graphic one level
down in the object stack.
Send to Back
Sends the selected graphic to the bottom of the stack, so that othergraphics and text cover it.
To Background / To Foreground
Only available for drawing objects; moves the drawing object behindor in front of the text respectively.

Anchoring graphics
You can anchor graphics as a character or to a page, paragraph, orcharacter. You can also place graphics in a frame and anchor the frame
to a page, paragraph, or character. Which method you choose depends
on what you are trying to achieve.
Here are the ways you can anchor graphics or drawing objects:
To Page
The graphic keeps the same position in relation to the page margins.
It does not move as you add or delete text or other graphics. Thismethod is useful when the graphic does not need to be visuallyassociated with a particular piece of text. It is often used when
producing newsletters or other documents that are very layout
intensive, or for placing logos in letterheads.
CautionIf you plan to use a document within a master document, do
not anchor graphics To Page because the graphics will
disappear from the master document. See Chapter 13(Working with Master Documents) for more information.

To Paragraph
The graphic is associated with a paragraph and moves with theparagraph. It may be placed in the margin or another location. Thismethod is useful as an alternative to a table for placing icons besideparagraphs.

288

Free eBook Edition

OpenOffice.org 3.x Writer Guide

To Character
The graphic is associated with a character but is not in the text
sequence. It moves with the paragraph but may be placed in themargin or another location. This method is similar to anchoring to aparagraph but cannot be used with drawing objects.
As Character
The graphic is placed in the document like any other character and,
therefore, affects the height of the text line and the line break. The
graphic moves with the paragraph as you add or delete text before
the paragraph. This method is useful for keeping screenshots insequence in a procedure (by anchoring them as a character in ablank paragraph) or for adding a small (inline) icon in sequence in a
sentence.
To Frame
If the graphic has been placed in a frame, you can anchor thegraphic in a fixed position inside the frame. The frame can then be
anchored to the page, a paragraph, or a character, as required.

Aligning graphics
Once you have established the anchor point of the graphic, you candecide the position of the graphic relative to this anchor: this is calledaligning the graphics. Choose from six options: three for aligning thegraphic horizontally (left, center, right) and three for aligning thegraphic vertically (top, center, bottom). Horizontal alignment is notavailable for images anchored as character.
For finer control of the alignment, use the Position options on the Typepage of the Picture dialog box, shown in Figure 259.

Figure 259: Fine tuning the alignment
For both the horizontal and vertical position, start by picking thereference point in the right hand side drop down menu, then select in
the first drop down menu among Left, Right or Center. If you selectthe value From left (or From top for the vertical positioning) you canspecify the amount in your selected unit of measurement. In theexample in Figure 259, the upper-left corner of the image will beFree eBook Edition

Chapter 8 Working with Graphics

289

placed at 3 cm from the left margin of the page horizontally and on the
top margin vertically.

Wrapping text around graphics
The Wrap setting determines the relation between the text and thegraphic. Several possibilities are provided:
No Wrap
With this option the text is placed above and below the image but
not around it. This is the wrapping type used for most of the figuresin this guide.
Page Wrap or Optimal Page Wrap
The text flows around the image. Moving the image around the pagecauses the text to be rearranged to fill the space to the left and rightof it. Optimal Page Wrap prevents text from being placed to theside of the image if the spacing between the image and the margin
is less than 2 cm.
Wrap ThroughSuperimposes the image on the text. That is, the image is above thetext. This option must be used in conjunction with the imagetransparency setting in order to make the text under the picture
visible.
In Background
Similar to Wrap Through, but the image is placed below the text sothere may be no need to change the transparency to make the text
visible.
Note

The No Wrap option found in the pop-up menu of a picture isequivalent to the Wrap Off menu item in the Format > Wrapmenu.

The wrap format is normally selected after the anchoring and thealignment of the picture have been decided. To set the position of animage to the the desired wrap format, follow these steps:
1) Select a graphic by clicking on it.
2) Right-click to display the pop-up menu and move the mousepointer to Wrap to display the available wrap formats.
Alternatively you can select Format > Wrap from the mainmenu.
3) Select the desired wrap format.

290

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Note

When anchoring a graphic as character, you can only adjust
the distance between the image and the text, but no wrapping
option is displayed.

To fine tune the wrapping options, open the Picture dialog box andselect the Wrap page. For images you can open this dialog box byselecting Format > Picture from the main menu or right-click andselect Picture from the pop-up menu. For drawing objects, you canaccess the Wrap page by selecting Format > Wrap > Edit in themain menu or right-click and select Wrap > Edit from the pop-up
menu.

Figure 260: The advanced wrap format options
This page is divided into three sections. In the top part you can selectamong the wrap types mentioned above, plus two additional wrap
formats that prevent the text from filling the area to the left (After) or
to the right (Before) of the picture. Use the Spacing section of thepage to adjust the spacing between the image and the text. The
contents of the Options section of the page may change depending on
the selected wrap format.
First paragraph
Check this box if you want OOo to start a new paragraph after theimage even if it could still wrap around the image.
In background
This option becomes available if Through Wrap is selected; itmoves the image in the background.

Free eBook Edition

Chapter 8 Working with Graphics

291

ContourWraps the text around a custom contour rather than around theedge of the picture. This option is only available for Page or Optimal
Page Wrap.
Outside only
Forces the text to wrap on the outside of the image, even if thecontour contains open areas within the shape.

Editing the contour
This option is only available for image wrapping. If you select wrapping
around a drawing object, OOo automatically creates a contour. You canaccess the Contour Editor by selecting Format > Wrap > Edit
Contour or from the right-click menu
The dialog box of Figure 261 opens with the image loaded in the main
window. Use the tools to draw the region of the image you do not want
to be covered by the text—such area will be shaded.
Some familiarity with drawing tools is required to create complex
contours; however, in most circumstances there is no need for highaccuracy. Figure 261 shows the actual contour used for “Example 2:
simple contour wrapping in action” and as you can see the shape of theline around the edge of the sphere is far from perfect.
When you are done, click on the Apply button to save the contour. If
you are not satisfied with the result, you can select the contour line
and press the Delete key to restart. You can also undo the previous
steps or you can select the Edit Points button and adjust the contour
shape point by point.
For simple images, the AutoContour button does a decent job. If thecontour has to be drawn around an area with the same or a similarcolor, you can select this region using the eyedropper. Select this tool,
then click on a point in the image having the desired color. OOoautomatically selects all the points which have the same or a similarcolor. The similarity level can be changed by modifying the value in thetolerance box (100% = perfect match).
Note

292

While all the positioning techniques discussed in this section
apply equally to frames, contour wrapping is not possible.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 261: The Contour Editor in action

Example 1: page wrapping
Figure 262 shows an example of page wrapping in action.

Image anchor
Spacing image to text

Margin to image distance
Figure 262: Example of image with Page Wrap formatting

Free eBook Edition

Chapter 8 Working with Graphics

293

The process to obtain this is the following:1) Insert the image into the document, then anchor it to the firstparagraph. To move the anchor, select the image and move it until
the anchor symbol is at the beginning of the paragraph. Do notworry about the position as that will be fixed in the next step.
2) Align the image so that the left margin of the image is in line withthe paragraph indentation. This can be done with the mouse or
using the advanced settings. In the example, the image is placed
1 cm from the left margin.
3) Change the wrap to Page Wrap. It starts out OK; however, there is
still too little space between the image and the text. To correct it,
access the Wrap page of the Picture dialog box and set the gap
between the image and text to 0.2 cm in the Right and Bottom
boxes.
4) The last touch is to change the position so that the image is below
the first line of the paragraph. Again, you can use the mouse to
drag the image or use the advanced settings, which require a bitof trial and error. The line height used in this guide—0.75 cm
from the top margin of the paragraph—is a good value.

Example 2: simple contour wrapping in action
In this example we again apply page wrapping as in example 1,enabling this time the contour option. We will work on an image and on
a drawing object as the contour option works slightly differently in thetwo cases.
The example of Figure 263 has been built following the steps below,
which you can use to practice.
1) Create some text (a very quick way to do that is to use the dummy
text AutoText. That is, type DT and then press the F3 key).
2) Insert an image of your choice and anchor it to the firstparagraph. Adjust the alignment as desired then change the wrap
type to Page Wrap.
3) Right-click on the picture to select the option Wrap > Contour,
then right-click again and select Wrap > Edit Contour from the
pop-up menu.
4) Use the technique discussed in “Editing the contour” on page 292
to create a custom contour and click Apply. If needed, adjust the
spacing between the edge of the image and the text.
5) Insert an AutoShape of your choice (a rotated triangle in theexample) and proceed as in step 2 above.

294

Free eBook Edition

OpenOffice.org 3.x Writer Guide

6) Enable the contour wrap by selecting Format > Wrap >Contour from the main menu. As discussed previously, OOoautomatically generates the contour. You may need to adjust the
distance between the drawing object and the text.

Figure 263: Image and drawing object with contour wrapping

Example 3: Wrap Through and In Background
This example shows how to use an image as a watermark by wrapping
it through the text and adjusting the transparency. This is not the best
way to create watermarks and it is presented here only for its
illustration purposes. If you need to create a watermark, it is best to
use a Fontworks object wrapped in the background.
The Wrap Through option inserts an image overlapping the text which
as a result will be hidden. To make the text appear, change thetransparency of the picture; although the words under the image
become visible, they may be difficult to read and will appear lighter
than the rest of the text.
To reproduce the example of Figure 264 create some dummy text, theninsert the image of your choice. Anchor the image (to the page in theexample) and select the wrap through option from the Format > Wrapmenu or right-clicking on the image and selecting Wrap > Wrap
Through from the pop-up menu. Move the image into the desired
position. The Picture toolbar should be displayed when the image isFree eBook Edition

Chapter 8 Working with Graphics295

selected. Change the transparency to a suitable value (in the example
this is 40%) so that the text can be read. In the example, a shadow
effect is applied to the text (Format > Character then select Shadow
in the Font Effects page).

Figure 264: Transparent image added over the text
You can obtain a better result if you set a graphic’s wrap to In
Background. In this case all the text will be clearly readable, withcharacters that have the same intensity as long as the background is
not too dark. Also in this case you may want to adjust the transparencyof the image.

Adding captions to graphics
You can add captions to graphics in three ways: automatically, by using
the Caption dialog box, or manually.

Adding captions automatically
You can set up OOo to add captions automatically whenever you insert
a graphic, a table, or other objects into a document. You can choose
which objects are captioned automatically, what the sequence name isfor each caption (for example, “Table” or “Illustration”), and theposition of the caption.
To set up automatic captions:
1) Click Tools > Options. On the Options dialog box, click on the +sign next to OpenOffice.org Writer to show a list of options.

296

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) Select AutoCaption. Now you can see several choices at theright of the dialog box for adding captions automatically.
3) Choose which objects you want to be automatically captioned andspecify the characteristics of the captions.
For more information, see “AutoCaption options” in Chapter 2 (Setting
up Writer).
When you insert a graphic, if automatic captioning is enabled, thegraphic is placed in a frame along with a caption containing the default
sequence name for graphics―Illustration. Position the cursor in thecaption area and type the text for the caption. You can change thesequence name by selecting one from the drop-down Category list.

Note

You can specify where to place an automatic caption for any
object except a picture; picture captions can only be
automatically placed below the picture. If you need a caption
above the picture (for example, for data plots in scientificpublications), you must add the captions manually, as
described in “Adding captions manually” on page 299.

Tip

A common sequence name—Figure—is not one of the names
provided: <None>, Drawing, Illustration, Table, and Text.
If you want the name “Figure” or any other custom name foryour graphics, do the following:1) Open the Options – OpenOffice.org Writer –AutoCaption dialog box, as described above.
2) In the Add captions automatically when inserting section,
select OpenOffice.org Writer Picture. This activates the
Caption area in the dialog box for pictures (graphics).
3) Under the Category drop-down list, enter the name thatyou want added (say, Figure), by overwriting any sequencename in the list. (Overwriting a term does not delete itfrom the drop-down list.) You can also set some options forthe number style and for a separator between the nameand the number, if desired. Click OK to save the changes.

Using the Caption dialog box
To add captions using the Caption dialog box:
1) Insert the graphic, then select it and click Insert > Caption.
2) Under Properties on the Caption dialog box (Figure 20), makeyour selections for the Category, Numbering, and Separator fields(Illustration, Arabic (1 2 3), and a colon (:), respectively, for theFree eBook Edition

Chapter 8 Working with Graphics

297

example in Figure 265 and type your caption text in the Caption
text box at the top. Whatever text you enter for the caption
appears in the box at the bottom, after the sequence name,number, and separator.
3) Click OK. The graphic and its caption are placed in a frame, as
shown in Figure 266.
Tip

In the Category box, you can type any name you want, forexample, Figure. OOo will create a numbering sequence usingthat name.

Figure 265. Defining the caption for an illustration

Illustration 1. An example

Figure 266. An example of a graphic and its caption contained in aframe. The outer box shows the edge of the frame; this border isnormally set to be invisible.

Overriding the default positioning of captions
The default positioning for picture captions is Below, and that position
cannot be changed using the Caption dialog. However, you canoverride the positioning manually, as follows:
1) Follow the instructions in “Using the Caption dialog box” on page297 to create the caption.

298

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) Right-click on the picture (not the frame surrounding picture andcaption) and make sure that Anchor > To paragraph isselected.
3) Left-click on the picture and drag it below the caption.
Tip

You may wish to adjust the spacing above and below thecaption text, to fine-tune the appearance of the picture and its
caption.

Adding captions manually
If you need to save as *.doc files or export in other formats, you may
find that captions applied as described above (either automatically or
using the Caption dialog box) are lost during the export. To avoid
export problems, or as another way to put captions above pictures or
below them (the usual case), you can add a caption manually, in eitherof two ways:• Place the graphic and its caption in separate paragraphs.
• Use a table.

Place the graphic and its caption in separate paragraphs
Insert the graphic and anchor it to its paragraph as a character. Press
Enter to create a new paragraph for the caption.
1) In the caption paragraph, type, for example, Figure and add aspace.
2) To insert the figure number automatically, click Insert > Fields> Other (Control + F2) and select the Variables tab.
3) Select Number range in the Type list. Select Figure in the
Selection list and choose, for example, Arabic (1 2 3) in theFormat drop-down list. Click the Insert button.
4) A number will appear after the word “Figure” in the caption. Now,
type the text of the caption.

Free eBook Edition

Chapter 8 Working with Graphics

299

Tips

If you are manually adding captions to a lot of figures using
this method, you might want to make an AutoText entry
containing, for example, Figure and a space, the figurenumber field, and an optional separator and a space after it.
To ensure the picture and its caption stay together on thepage: if the picture is going above the caption, define the text
flow of the Figure paragraph style as Keep with next
paragraph and the next style as Caption. Conversely, if thecaption is going above, define the Caption paragraph style as
Keep with next paragraph and the next style as Figure.

Use a table
Create a one-column, two-row table. Place the picture in one row andtype the caption in the other row—or use two or more rows for thecaption and other text. This method can be especially useful for
pictures with numbered legends, such as Figure 258 in this chapter.

Creating an image map
An image map defines areas of an image (called hotspots) withhyperlinks to web addresses, other files on the computer, or parts ofthe same document. Hotspots are the graphic equivalent of text
hyperlinks (described in Chapter 12). Clicking on a hotspot causes OOo
to open the linked page in the appropriate program (for example, thedefault browser for an HTML page; OOo Calc for a .ODS file; a PDF
viewer for a PDF file). You can create hotspots of various shapes andinclude several hotspots in the same image.
To use the image map editor:
1) In your OOo document, select the picture where you want todefine the hotspots.
2) Choose Edit > ImageMap from the menu bar. The ImageMap
Editor (Figure 267) opens.
3) Use the tools and fields in the dialog (described on the next page)
to define the hotspots and links necessary.
4) Click the Apply icon

to apply the settings.

5) When done, click the Save icon
to save the imagemap to a file,then click the X in the upper right corner to close the dialog.

300

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 267: The dialog to create or edit an image map
The main part of the dialog shows the image on which the hotspots aredefined. A hotspot is identified by a line indicating its shape.
The toolbar at the top of the dialog contains the following tools:• Apply button: click this button to apply the changes.
• Load, Save, and Select icons.
• Tools for drawing a hotspot shape: these tools work in exactly thesame way as the corresponding tools in the Drawing toolbar.
• Edit, Move, Insert, Delete Points: advanced editing tools tomanipulate the shape of a polygon hotspot. Select the Edit Points
tool to activate the other tools.
• Active icon: toggles the status of a selected hotspot between
active and inactive.
• Macro: associates a macro with the hotspot instead of justassociating an hyperlink.
• Properties: sets the hyperlink properties and adds the Nameattribute to the hyperlink.
Below the toolbar, specify for the selected hotspot:• Address: the address pointed by the hyperlink. You can also point
to an anchor in a document; to do this, write the address in thisformat: file:///<path>/document_name#anchor_name

Free eBook Edition

Chapter 8 Working with Graphics

301• Text: type the text that you want to be displayed when the mousepointer is moved over the hotspot.
• Frame: where the target of the hyperlink will open: pick among_blank (opens in a new browser window), _self (opens in theactive browser window), _top or _parent.
Tip

The value _self for the target frame will work just fine in the vast
majority of occasions. It is therefore not recommended to use
the other choices unless absolutely necessary.

Adding an image to the Gallery
You may wish to add to the Gallery any images that you use frequently,
for example, a company logo. You can then very easily insert thesegraphics into a document later.
To add images to the Gallery, proceed as follows:
1) Open the Gallery.
2) Select the theme where you want to add images, or you cancreate a new theme. Note that you can add images only to “My
Theme” or to any other theme that you have created; these areindicated by a green icon in the list of themes. You cannot add
images to the built-in themes, indicated by an icon of anothercolor.
To create a new theme:a) Click the New Theme button above the list box of Themes.
The Properties of New Theme dialog box opens, which issimilar to the one shown in Figure 250.
b) Select the General tab (not shown) and type a name for the
new theme in the text box.
c) Select the Files tab, skip step 3, and continue with step 4.
3) Right-click on the desired theme and select Properties in the
pop-up menu. This displays a window from which to select thefiles to be added.

302

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 268. Gallery properties dialog box4) On the Files page, click the Find Files button. The Select path
dialog box opens.
5) You can enter the path for the file’s directory in the Path text box,
or you can navigate to locate the file’s directory. Use the File typedrop-down list to help limit the search.
6) Click the Select button to start the search. A list of graphic files
is then displayed in the window. You can use the File type filter
again to further limit the search.
7) Select the files to add. To select more than one file, hold theControl key down while you click on each file.
8) Finally, click Add.
9) When you have finished working with the Gallery, you can click on
its iconto close it.

NoteThis procedure assumes that the graphic files for the themes
already exist. You may need to import some graphics or tocreate your own onto your computer if the existing files are
insufficient.

Note

Similar to the file search function on various operating
systems, Find Files searches for graphic files in any
subfolders of the directory selected in step 5.

Free eBook Edition

Chapter 8 Working with Graphics

303

9

Chapter
Working with Tables

Free eBook Edition

Introduction
Tables are a useful way to organize and present large amounts of
information, for example:• Technical, financial, or statistical reports.
• Product catalogs showing descriptions, prices, characteristics,
and photographs of products.
• Bills or invoices.
• Lists of names with address, age, profession, and otherinformation.
Tables can often be used as an alternative to spreadsheets to organize
materials. A well-designed table can help readers understand better
what you are saying. While you would normally use tables for text or
numbers, you could put other objects, such as pictures, in cells.
Tables can also be used as a page-layout tool to position text in areas ofa document instead of using several Tab characters. For example, thedescriptions under Figure 281 were created in a table with invisible
borders. Another, perhaps better example would be in headers andfooters to support independent positioning of different elements, suchas page number, document title etc. This use of tables is described in
Chapter 4 (Formatting Pages).

Creating a table
Before you insert a table into a document, it helps to have an idea ofthe visual result you want to obtain as well as an estimate of thenumber of rows and columns required. Every parameter can bechanged at a later stage; however, thinking ahead can save a large
amount of time as changes to fully formatted tables often require asignificant effort.

Inserting a new table
To insert a new table, position the cursor where you want the table toappear, then use any of the following methods to open the Insert Table
dialog box (shown in Figure 269):• From the main menu, choose Table > Insert > Table.
• Press Control+F12.
• From the Standard toolbar, click the Table icon

Free eBook Edition

Chapter 9 Working with Tables

305

Figure 269: Inserting a new table using the Insert Table
dialog box
Here you can specify the properties for the new table.
Under Name, you can enter a different name than the OOo-generated
default for the table. This might come in handy when using theNavigator to quickly jump to a table.
Under Size, specify the initial number of columns and rows for the newtable. You can change the size of the table later, if necessary.
Under Options, set up the initial table characteristics. Selecting theoptions in this section of the dialog produces the following results:• Heading — Defines the first row(s) in the table as headings. The
default Table Heading paragraph style is applied to the headingrows and thus makes the text centered, bold, and italic. You can
edit the OOo-predefined Table Heading paragraph style in the
Styles and Formatting window to change these default settings.
When splitting a table into two tables, the Heading row(s) arecopied in the second table.
• Repeat heading — Repeats the heading row(s) of the table at the
top of subsequent pages if the table spans more than one page.
The first ... rows —Specifies the number of rows to be repeated.
Default is 1.
• Don’t split table — Prevents the table from spanning more than
one page. This can be useful if the table starts near the end of apage, and would look better if it were completely located on thefollowing page. If the table becomes longer than would fit on one
page, you will need to either deselect this option or manually split
the table.
306

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Border — Surrounds each cell of the table with a border. Thisborder can be modified or deleted later.
The AutoFormat button opens a dialog box from which you can selectone of the many predefined table layouts. See “Automatic formatting oftables” on page 328 for more information.
After making your choices, click OK. Writer creates a table as wide as
the text area (from the left page margin to the right page margin), withall columns the same width and all rows the same height. You can thenadjust the columns and rows later to suit your needs.

Tip

To directly insert a table with the default properties, click on thelittle arrow next to the Table icon on the Standard toolbar. A
graphic appears where you can choose the table’s size (rows andcolumns). To create the table, click on the cell that you want to
be on the last row of the last column. Holding down the mousebutton over the Table icon will also display the graphic.

Creating nested tables
You can create tables within tables, nested to a depth only limited byimagination and practicality. Figure 270 demonstrates a simple, twolevel example.
To achieve this, simply click in a cell of an existing table and use any ofthe methods mentioned in “Inserting a new table” above.

Figure 270: Nested table example. The
shaded table is nested in a cell of the larger
table.

Using AutoCorrect to create a table
You can also create a table by typing a series of hyphens (-) or tabs
separated by plus signs. Use the plus signs to indicate column dividers,
while hyphens and tabs are used to indicate the width of a column.
For example, this character sequence:+-----------------+---------------+------+

Free eBook Edition

Chapter 9 Working with Tables

307creates a table like this:

Note

CautionThis function can be disabled or enabled in Tools > AutoCorrect.
On the Options tab, deselect or select Create table.
When using tabs instead of a table to line up your data, always
make sure that you know how wide they are set and rememberthat default tabs may be different when the document isdisplayed on a different computer or even when copying thesame data in a new document.

Create a table from formatted text
It is possible to create a table starting from plain text by means of theTable > Convert > Text toTable menu. In order forthis command to work
effectively, the starting textneeds to have clear
demarcation between what
will become the columns of
the table. Paragraph marks
indicate the end of a row.

Figure 271: Dialog box to configure thetext to table conversion

To convert text to a table,
start by selecting the text
you want to convert andchoose Table > Convert >Text to Table to open the
dialog shown in Figure 271.

In the top part of the dialog, select the symbol that separates thecolumns. This would normally be a tab, but it could be a semicolon orcomma if you are importing a CSV file. The other options in this dialog
are the same as those in the dialog used to insert a table shown in
Figure 269.

ExampleIn this example we will convert the following text into a table.
Row 1 Column 1; Row 1 Column 2; Row 1 Column 3
Row 2 Column 1; Row 2 Column 2; Row 2 Column 3

308

Free eBook Edition

OpenOffice.org 3.x Writer GuideIn this case, the separator between elements is a semicolon. By
selecting the text and applying the conversion, we obtain the following
result.
Row 1 Column 1

Row 1 Column 2

Row 1 Column 3

Row 2 Column 1

Row 2 Column 2

Row 2 Column 3

Note that, unlike when creating a table with other mechanisms, theconversion from text to table preserves the paragraph style applied tothe original text.
You can also use the Convert menu to perform the opposite operation;that is, to transform a table into plain text. This may be useful when
you want to export the table contents into a different program.
To transform a table into text, place the cursor anywhere in the table,choose Table > Convert > Table to Text in the main menu, pick the
preferred row separator, and click OK to finish.

Formatting the table layout
Formatting a table is, generally speaking, a two-step process:formatting of the table layout (the subject of this section) andformatting of the table text (the subject of the next section).
Formatting the layout normally involves one or more of the following
operations: adjusting the size of the table and its position on the page,
adding or removing rows or columns, merging and splitting individual
cells, changing borders and background.

Default parameters
If you create a table using the Insert Table dialog box or the Table iconon the Standard toolbar and activate the Heading option, thefollowing defaults are set:
• The cells in the heading row (or rows) use the Table Heading
paragraph style. In the default template, the text is centered and
set with a bold and italic font.
• The remaining cells use the Table Contents paragraph style,which, in the default template, is identical to the Default
paragraph style.
• The default table occupies all the space from margin to margin(text area).
• The default table has thin black borders around each cell (grid).

Free eBook Edition

Chapter 9 Working with Tables

309

Resizing and positioning the table
Using the default settings, any newly created table will occupy theentire width of the text area. This is sometimes what you want, or you
may prefer a smaller table. To quickly resize a table, first move themouse to either the left or right edge. When the cursor changes shape
into a double arrow, drag the border to the new position. This
operation only changes the size of the first or last column; it does notchange the alignment of the table on the page.
If you need more precise control over the size and position of the tableon the page, open the Table Format dialog box by choosing Table >Table Properties or by right-clicking anywhere in the table andchoosing Table from the pop-up menu. Select the first page of the
dialog box (Table), shown in Figure 272.

Figure 272: The Table page of the Table Format dialog box
On this page you can set the alignment of the table, choosing among
the following options:• Automatic: the default setting for a table.
• Left: aligns the table with the left margin.
• Right: aligns the table with the right margin.
• From Left: lets you specify under Spacing exactly how far fromthe left margin the table is placed.
• Center: aligns the table in the middle between the left and rightmargins. If the table width is greater than the margin, the table
will extend outside of the margins.
• Manual: lets you specify the distances from both left and rightmargins under Spacing.

310

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Selecting an alignment option other than Automatic activates the
Width field in the Properties section, where you can enter the desired
size of the table. Select Relative to see the width as percentage of thetext area.
In the Spacing section, use the Above and the Below boxes to modify
the separation between the text and the table. When the size of thetable is less than the size of the text area, OOo will insert some values
in the Left and Right boxes. You can only change both values if you
select Manual alignment and you can change the Left box value only
when you select the From Left alignment. Note that the sum of thetable width, and the values in the Left and Right boxes, needs to equal
the width of the text area.

Resizing rows and columns
You can adjust the height of rows and the width of columns in a tablein several ways.
• Move the mouse next to the edge of the cell and when a doubleheaded arrow appears, click and hold the left mouse button, dragthe border to the desired position, and release the mouse button.
• On the horizontal ruler, column dividers are marked by a pair ofthin gray lines; the vertical ruler indicates row dividers in thesame way. You can resize a row or column by holding the mousebutton down on the appropriate divider and dragging it to thedesired location.
• Use the keyboard as described below.
Selecting Table > Autofit from the main menu also offers someresizing options:• The Optimal Column Width or Optimal Row Height options
make the selected columns or rows as narrow as possible whilestill fitting their contents.
• Selected columns and rows can be distributed evenly to quickly
bring them back to all being the same width or height.
For greater control over the width of each column, use the Columns
page of the Table Format dialog box (see Figure 273).

Free eBook Edition

Chapter 9 Working with Tables

311

Figure 273: Table Format dialog box: Columns page
Right-click on the table and choose Table from the pop-up menu or
choose Table > Table Properties from the menu bar. On the Table
Format dialog box, select the Columns tab.
• Adapt table width: If a table already stretches to the pagemargins, it cannot stretch any wider and the Adapt table width
option is not available. If the table is narrower, increasing thewidth of a column will increase the width of the whole table.
If the table width already extends pasts the margins with the
Adapt table width option checked, attempting to change a column
width will automatically decrease that column’s size so that thetable will now shrink to the page margins while keeping any othercolumn sizes intact.
• Adjust columns proportionally results in all columns changing
their widths by the same percentage when one is changed. For
example, if you reduce by half the size of a column, all the othercolumns sizes will be halved.
• Remaining space shows how much further the table can expand
before hitting the limit of the margins. This value cannot beedited and will not be negative in the event that the table width isalready larger than the space between the left and right margins.
• Under Column width, each individual column can be adjusted. If
you have more than six columns, use the arrows at the right andleft to view them all.
Rather than start from the Table Format dialog box, it is often more
efficient to make rough adjustments to a new table using the mouse,
and then fine tune the layout using the Columns page in conjunction
with the Table page of the Table Format dialog box.

312

Free eBook Edition

OpenOffice.org 3.x Writer GuideIt is also possible to resize a table using only the keyboard. This is on
occasions easier than using the mouse.
1) Place the cursor on the cell whose size you want to change.
2) Press and hold the Alt key while using the arrow keys to change
the size.
To adjust the resizing parameters and behavior for keyboard handling,choose Tools > Options > OpenOffice.org Writer > Table.
Use the Row and Column values in the Move cells section to determine
the amount of change produced by a single keystroke while resizing. In
the Behavior of rows/columns section you can choose one of thefollowing three strategies when resizing:• Fixed: select this if you want the resizing to only affect theadjacent cell, and not the entire table. The width of the table does
not change when resizing its cells.
• Fixed, proportional: when resizing a cell with this option selected,
all the other cells are also resized proportionally, Also in this casethe width of the table remains constant.
• Variable: this is the default value. Resizing a cell affects the tablesize. For example, when you widen a cell, the width of the table
increases.

Inserting rows and columns
To insert any number of rows or columns:
1) Place the cursor in the row or column where you want to add newrows or columns and right-click.
2) On the pop-up menu, choose Row > Insert or Column > Insert.
This will display a dialog box where you can select the number ofrows or columns to add, and whether they appear before or after
the selected one.
3) Set Amount to the number of rows or columns to insert, andPosition to Before or After.
4) Click OK to close the dialog box.

Note

Clicking on the Insert Row icon on the Table toolbar inserts one
row below the selected one. Clicking on the Insert Column iconon the Table toolbar inserts a column after (to the right of) the
selected one.
Regardless of how they are inserted, new rows or columns havethe same formatting as the row or column where the cursor waswhen the insert command was issued.

Free eBook Edition

Chapter 9 Working with Tables

313

You can also quickly insert a row or a column using only the keyboard:
1) Place the cursor in the row or column next to the row or column
you want to insert.
2) Press Alt+Insert to activate keyboard handling.
3) Use the arrow keys as desired to add a row or column:
Left to insert a new column to the left of the cell where the cursor
is located.
Right to insert a new column to the right of the cell where thecursor is.
Down to insert a new row below the cell where the cursor is.
Up to insert a new row above the cell where the cursor is.
The above keyboard technique can also be used to delete rows orcolumns by substituting the Alt+Insert keystroke combination in Step
2 with Alt+Delete.

Merging and splitting cells
To merge a group of cells into one cell:
1) Select the cells to merge.
2) Right-click and choose Cell > Merge on the pop-up menu, orchoose Table > Merge Cells from the menu bar.
To split a cell into multiple cells:1) Position the cursor inside the cell.
2) Right-click and choose Cell > Split on the pop-up menu, orchoose Table > Split Cells from the menu bar.
3) Select how to split the cell. A cell can be split either horizontally(create more rows) or vertically (create more columns), and you
can specify the total number of cells to create.
It is generally a good rule to merge and split cells after completingother layout formatting. This is because some operations such as
deleting a column or a row may produce a result difficult to predict
when applied to a table with merged or split cells.

Specifying table borders
On the Table Format dialog box, select the Borders tab (Figure 274).
Here you can set borders for a whole table or groups of cells within atable. In addition, a shadow can be set for the whole table.

314Free eBook Edition

OpenOffice.org 3.x Writer GuideBorders have three components: where they go, what they look like,and how much space is left around them.
• Line arrangement specifies where the borders go. If a group ofcells is selected, the border will be applied only to those cells. You
can specify individually the style of the border for the outsideedges of the selected cells as well as for the the cell divisions.
Writer provides five default arrangements but you can just as
easily click on the line you want to customize in the User-definedarea to get exactly what you want. When multiple cells are
selected, the User-defined area allows you to select the edges ofthe selection as well as the cell dividers. By clicking at theintersection of the lines, you can modify multiple borders
simultaneously. For example, in Figure 274 the right edge andhorizontal separators are modified with a single operation.

Note

When the selected cells have different styles of border the Userdefined area shows the border as a gray line. You can click on
the gray line to choose a new border style (first click), leave theborder as it is (second click) or delete the border (third click).

Figure 274: Table Format dialog box: Borders page
• Line specifies what the border looks like: the style and color.

There are a number of different styles and colors to choose from.
The Line Style and Color will apply to those borders highlighted

Free eBook Edition

Chapter 9 Working with Tables

315

by a pair of black arrows in the User-defined map on the left handside of the dialog box.
• Spacing to contents specifies how much space to leave between
the border and the cell contents. Spaces can be specified to theleft, right, above, and below. Check Synchronize to have thesame spacing for all four sides. This spacing is like a padding andit is not factored in when calculating the text measurements.
• Shadow style properties always apply to the whole table. A
shadow has three components: where it is, how far from the table
it is cast, and what color it is.
• If Merge adjacent line styles is checked, two cells sharing acommon border will have their borders merged, rather than beingside by side.

Tip

To reset everything if you are having problems with borders,
right-click in the table and choose Table or choose Table >Table Properties from the menu bar. On the Borders tab,select the Set No Borders icon under Line arrangement:
Default (the box on the left).

Selecting background colors and graphics
A table background can greatly improve the readability of the data,visually highlight important parts of the table (such as the heading or a
specific cell), or just make the table more appealing. You can choose
between two types of background when formatting the table: solid
color or graphic. The background can be applied to the whole table, toa single cell, or to a row. The background selected for a cell will be infront of the row background which in turn will hide the tablebackground.
The row background option is quite handy when you want to create
alternate color rows or assign a different background to the heading of
the table. The tables in this guide adopt this technique.
To set the background for a cell, row, or table:
1) Place the cursor anywhere inside the cell, row or table you want
to work with. If you want to apply a background to a group ofcells, select the group.
2) Right-click and choose Table from the pop-up menu, or choose
Table > Table Properties from the main menu.
3) In the Table Format dialog box, select the Background tab(Figure 275).
316

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4) In the For section, chose whether to apply the settings to cell,row, or table.
•
If you choose Cell, changes apply only to the selected cells, orthe cell where the cursor currently resides. Even whenselecting a group of cells, the background settings are applied
to each cell individually.
•
If you choose Row, changes affect the entire row where thecursor resides.
•
If you choose Table, changes will set the background for theentire table, regardless of the cursor position or selected cells.

Figure 275: Table Format dialog: inserting a graphic
background5) In the As section, choose whether the background is a color or agraphic.
To apply a color, select the color and click OK. Remember thatyou can add custom colors by choosing Tools > Options >Colors.
To apply a graphic:a) First select the graphic from your computer’s file system with
the Browse button. (Writer supports a large number ofgraphics formats.)

Free eBook Edition

Chapter 9 Working with Tables

317b) You can use the Link option to link the graphic file. If it islinked, changes to the graphic (for example, if you edit it in adifferent software package) are reflected in your document.
However, you also need to keep the linked graphic file withthe document file. If, for example, you email the document
without the graphic file, the graphic will no longer be visible.
c) Under Type, select the type of placement for the graphic.
•
If you choose Position, you can select in the position map
where the graphic will be displayed in the selected area.
•
If you choose Area, the graphic is stretched to fill thewhole area.
•
If Tile, the graphic is tiled (repeated horizontally andvertically) to fill the area.
d) If the Preview option is checked, the graphic displays in thepane on the right.
e) To apply the graphic, click OK.
Figure 276 shows an example of a table set with a background image,and the first row background colored. As you can see, the row
background covers the table background.

Figure 276: Example of table with different row
and table backgrounds

Displaying or hiding table boundaries
A table boundary is a set of pale (usually gray) lines around the cells
when viewed on-screen in OOo. These boundaries are not printed; their
only function is to help you see where the table cells are.
To display the table the same way on the screen as on the printed
page, with no boundary lines, right-click on the table and choose Table
Boundaries from the pop-up menu. Repeat this to have the boundaries
appear again.

318

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Note

Turning boundaries off does not hide the borders that the table
may have.

Tip

You can also turn table boundaries on and off through Tools >Options > OpenOffice.org > Appearance. On that page, you
can display or hide boundaries around text, pages headers andfooters, figures, and other parts of a document.

Formatting the table text
Once the table layout is satisfactory, you can move on to formatting thetext in the individual cells. You can apply manual formatting as withany other paragraph in the text, but it is highly recommended, for thesake of consistency and ease of maintenance, that you define your own
paragraph and character styles.
Besides the paragraph and character styles, there are other aspects toconsider when placing text in a table cell; such as text flow, alignmentand orientation.
You can format each cell independently of other cells, or you cansimultaneously format a group of cells by selecting them before
applying the desired formatting.

Specifying text flow
On the Text Flow page of the Table Format dialog box (Figure 277), youcan:• Insert a page or column break either before or after the table.
Use the Text Flow: Break option, combined with the Page orColumn and the Before or After buttons.
If you insert a page break before the table (that is, start the table
on a new page), you can also change the page style that will gowith it by checking the With Page Style box and selecting a newpage style. As with any page break, you can also reset the page
numbers using the Page number box.
• Keep a table on one page by deselecting the Allow table to split
across pages and columns option. If this item is deselected, thenext item is not active.
• Keep each row on one page by deselecting the Allow row tobreak across pages and columns option.

Free eBook Edition

Chapter 9 Working with Tables

319

• Use the Keep with next paragraph option to keep the table andan immediately following paragraph together if you insert a page
break.
• Use the Repeat heading option, and its associated numbers box,
to select the number of table heading rows that will be repeatedon each page. A complicated table may need two or three headingrows to be easily read and understood.
• Use the Text direction list to select the direction for the text in thecells. The most common setting is Left to right for Western
languages.
Note

The phrase Use superordinate object settings means “use theformatting settings from the paragraph before the table”.

Figure 277: Table Format dialog box: Text Flow page
• Select the vertical alignment of the text in the table or theselected cells; the choices are to align with the top of the cell, thecenter of the cell, or the bottom of the cell. This alignment is inaddition to the Left-Right alignment options available on the Table
page of the Table Format dialog box.

Note

320

A table heading row can not span two pages, but any other row
can. A one-row table (often used for page layout purposes), if set
up with the default of including a heading, will not break acrosspages. The cure is to make sure the table is defined without aheading row.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Vertical alignment
By default, text entered into a table is aligned to the top-left of the cell.
You can change the default for the entire table, as described above, orfor individually selected cells.
To vertically align the text in specific cells:• Place the cursor in the cell you wish to change, or click and dragto select multiple cells.
• Right-click in the selected area and choose Cell > Center, Top,or Bottom in the pop-up menu to vertically align the text asdesired.

Number formats
The number format can be set for a whole table or group of cells. For
example, cells can be set to display in a particular currency, to fourdecimal places, or in a particular date format.
Number recognition specifies that numbers in a text table arerecognized and formatted as numbers. If number recognition is
selected, numbers are automatically bottom-right aligned. Number
recognition option can be enabled under Tools > Options >OpenOffice.org Writer > Table.
Select the cells to format, then right-click and choose Number
Format from the pop-up menu. The Number Format dialog box opens
for you to set options for various categories of numerical data.
• In the Category list, select the category you want, such as
currency, date, or text.
• In the Format list, choose a format for the category you justselected.
• For some categories, such as date, you may wish to change thelanguage using the Language list while for other numericalcategories the Options section of the dialog box allows you tocustomize the appearance.

Tip

You will notice that OOo displays the formatting code for the
category and format selected in Format Code section at thebottom of the dialog box. For example, if you select a dateformat such as 31 Dec 1999 the corresponding code is D MMM
YYYY. Advanced users can easily customize this formatting code
as well as create new user-defined codes.

Free eBook Edition

Chapter 9 Working with Tables

321

Rotating text in a table cell
You can rotate text in a table cell by 90 or 270 degrees. Text rotation isuseful when you have long headings for narrow columns.
• Select the text to be rotated and then choose Format >Character.
• On the Position page, in the Rotation / scaling section, choose therotation angle and click OK.
Figure 278 shows a sample table with rotated headings.

Figure 278: A table with rotated headings

Note

Text rotation within table cells can also be achieved with the useof paragraph styles, discussed in greater detail in Chapter 7(Working with Styles).

Data entry and manipulation in tables
Moving between cells
Within a table, you can use the mouse, the cursor keys, or the Tab key
to move between cells.
The cursor keys move to the next cell only if there is no text in the way.
For example, pressing the right cursor key will move the cursor to theright within the text in the current cell, then to the next cell.
The Tab key moves directly to the next cell and, if the cursor is in thelast cell in the table, creates a new row. Pressing Shift+Tab moves the
cursor back a cell.
322

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Tip

To enter a Tab character as part of the text of the cell, press theControl and Tab keys at the same time.

Sorting data in a table
Just as in a spreadsheet, Writer allows data in a table to be sorted. Up
to three levels of sorting can be specified (for example, sort first by age
numerically, then alphabetically by name within each age).
To sort data in a table:• Select the table (or part of the table) to be sorted.
• From the menu bar, choose Table > Sort. In the Sort dialog box:–
Decide whether you want to sort in the direction of rows orcolumns. The default sorting direction is by rows, which
results in sorting the data in a column.
–
Select up to three keys to sort on, in the correct order.
–
For each key, select which column or row to sort on, whether
the sort is Numeric or Alphanumeric and whether it isAscending or Descending.
–
Click OK to perform the sort.

Note

You have to select all cells that might be affected by the sorting.
For example, if you select only the cells of one column, the sortaffects that column only, while the others remain unchanged. Insuch a case, you risk mixing the data of the rows.

Using spreadsheet functions in a table
In a table in a Writer document, you can use some of the mathematical
functions that are normally implemented by OpenOffice.org Calc. For
many simple functions, Writer tables can be used as basic
spreadsheets.
Just as in a spreadsheet, each table cell is identified by a letter (for thecolumn) and a number (for the row). For example, cell C4 is the cell inthe third column from the left and fourth row from the top. When the
cursor is in a cell, this cell reference is displayed on the status bar.

Tip

Basic spreadsheet functions in tables are much the same as in
OpenOffice.org Calc. The main difference is that cell references
are formatted differently. Cell A2 (first column, second row) is
referred to in Calc as A2 (or $A$2 for an absolute reference). In
Writer tables, it is referred to as <A2>.

Free eBook Edition

Chapter 9 Working with Tables

323

For example, suppose you had two numbers in cells <B1> and <C2>
and wanted to display the sum of the two in cell <A1>, as shown in
Figure 279.

Figure 279: Using spreadsheet functions in a table
Do the following:
1) Click in cell <A1> and press the = key. The Formula bar appears
automatically, near the top of the screen. In the leftmost side of
the bar, you can see the coordinates of the selected cell.
2) Click in cell <B1>. The identifiers of this cell are automaticallydisplayed in the Formula bar and inserted into cell <A1>.
3) Press the + key.
4) Click on cell <C2>. You can see the final formula = <B1>+<C2>
displayed both in the selected cell and in the Object bar.
5) Press the Enter key or click the green tick (checkmark) on the
Formula Bar.

Tip

To display the list of the mathematical functions that you can use
in a table:
1) Display the Formula toolbar by pressing F2 or by selecting a
blank cell and pressing the = key.
2) Click and hold the Formula f(x) icon.

In our example, this gives the result 9 in the top left cell. For
contiguous cells, you can simply select the cells in the row, column, or
the rectangle of rows and columns. Thus, for example, to add a columnof numbers, do this:1) Type an equals sign = in an empty cell.
2) Select the cells to be added together—in this case the cells from
A2 to A5. The formula should be something like =<A2:A5>.
324

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) Press the Enter key or click the green tick (checkmark) on the
Formula Bar.
4) The answer appears in the cell you have selected.
When using a function, you can enter the cells manually or by selecting
them. Thus, to add up the four numbers that we added above (A2, A3,
A4, A5), do this:1) Type an equals sign = in an empty cell.
2) Type sum or select it from the function list f(x).
3) Select the cells to be added together. The formula should besomething like =sum<A2:A5>.
4) Press the Enter key or click the green tick (checkmark) on the
Formula Bar.
5) The answer appears in the cell you have selected.
Caution

Unlike Calc, when inserting or deleting rows or columns of thetable, formulas are not updated automatically. If you plan to use
complex formulas you should consider embedding a Calc
spreadsheet in your Writer document.

Additional table operations
Adding a caption
You can easily add a caption to any table. Writer will keep track of all
your captioned tables, automatically number them, and update any
links to them.
To add a caption to a table:
1) Place the cursor in the table.
2) Right-click and choose Caption from the pop-up menu.
Alternatively, the Insert > Caption menu option becomes
available whenever your cursor is inside a table cell.
3) Enter the text for your caption, your category selection, thenumbering style, separator, and position (above or below thetable).
4) Click OK.

Free eBook Edition

Chapter 9 Working with Tables

325

Note

Once the category, numbering style and separator are
established in the Caption dialog box, you can edit them in the
document if you choose. However, doing so may damage theautomatic numbering and reference links. If you need toestablish the numbering and reference link for the caption, you
can choose to leave your caption blank in the Caption dialog box
and add it later.

Writer supplies five different category labels for captions: <None>,
Drawing, Table, Illustration, and Text.
You can also create your own category labels, formatting, andseparators. For example, you might want your tables to be labeled as
Fantasia, formatted with roman numerals, and using a period (‘.’) as aseparator, as follows:
Fantasia I. Interesting data
Fantasia II. More interesting data
Fantasia III. Yet more interesting data
To accomplish this:1) Open the Caption dialog box following the instructions above.
2) In the Category field, select the text and type the word Fantasia.
3) In the Numbering drop-down, select the Roman (I II III) option.
4) In the Separator field, select the text and type a period (.)
followed by a space.
Note

OOo will use exactly what you type into the Category and
Separator fields, so be sure to include any additional spaces orpunctuation you want to see in your caption.

Additional options for numbering captions by chapter are available
under the Options button in the Captions dialog box. Some of thesesettings which refer to the outline level will only have an effect if you
are using outline level paragraph styles on the chapter headings withinyour document. See Chapter 7 (Working With Styles) for information.
By adding chapter numbers to your captions, OOo will restart thecaption numbering for each chapter it encounters. For example, if thelast figure caption you create in chapter 1 is Figure 1.15, and the next
figure caption you create is in chapter 2, the numbering will start over
at Figure 2.1.
Options available to chapter numbering for captions include thefollowing:

326

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Use Level to specify the outline levels that triggers a restart of

•
•

•

•

the numbering as well as how many levels of outline numbering
are shown before the table number. An example may be useful.
Suppose your document uses Heading 1 style for chapters andHeading 2 style for sub-headings, and that this is how you set up
your outline numbering. If you want all the tables in a chapter(that is, between two Heading 1 paragraphs) to be numberedsequentially independently of the sub heading they are under,
select 1 as Level. If instead you want to restart the numbering at
each sub-heading select level 2.
Use the Separator field to establish the separator between thechapter number and figure number.
Use Character style to set a character style for the caption. Thisis useful if the separator of your choice is not a symbol included in
the default font type of your document or if you want the caption
to have a special color, size and so on.
The Apply border and shadow option does not apply to tablecaptions. OOo normally wraps the objects you can add a caption
to in a frame, but not for tables.
Use Caption order to specify whether you want the category or
numbering to appear first in the caption.

All of the features described above can also be set up to automatically
apply to any new tables you create in your document.
To automatically caption all your tables:
1) Place the cursor in a table.
2) Right-click and choose Caption > AutoCaption from the pop-up
menu.
3) Select OpenOffice.org Writer Table and select the settings you
want and click OK. This dialog box is covered in more detail in
Chapter 2 (Setting up Writer).
When AutoCaption is enabled for tables, any new tables will be
captioned according to your selections in the AutoCaption dialog box;
however, you will need to add the specific text for each caption onto
the table manually.

Cross-referencing a table
You can insert a cross-reference to a captioned table. Clicking on the
cross-reference takes the reader directly to the table.
1) Position the cursor where you want the cross reference.
2) Choose Insert > Cross-reference from the main menu.

Free eBook Edition

Chapter 9 Working with Tables

327

3) Set the Type to Table. A list of captioned tables will be shown in
the Selection panel; select the one you want to reference.
4) In the Format pane, choose how the cross reference will appear.
•
Page creates a reference of the page number that the caption
appears on.
•
Chapter places a reference to the chapter number in which
the caption appears. This will only produce an empty space
unless you have setup your chapter headings with outline
level paragraph styles.
•
Reference inserts the entire caption's category, number andcaption text as a reference.
•
Above/Below inserts “above” or “below” depending onwhether the table appears above or below the cross-reference.
•
As Page Style creates a reference of the page number thatthe caption appears on using the page style format.
•
Category and Number creates a cross-reference with only
the caption's category and number; for example, Table 1 forthe first table.
•
Caption Text creates the reference using the caption text,
leaving off the category and number.
•
Numbering inserts only the number of the caption.
5) Click Insert to add the cross-reference and click Close to exit the
dialog box.

Automatic formatting of tables
Using AutoFormat, you can apply an elaborate format to your tablewith just a few clicks. AutoFormat is somewhat similar to paragraphstyles and will enable you to obtain consistent looking tables acrossyour document. You can also create your own table formats and savethem as another AutoFormat option.
To apply an AutoFormat, place the cursor anywhere in the table andchoose Table > AutoFormat. This opens the dialog box shown in
Figure 280.
Select from the list on the left the Format most suitable for your table
and click OK to apply it. Clicking the More button opens anothersection of the dialog box where you can rename the selected tableformat scheme as well as decide which parts of the predefinedformatting you want to apply to your table. You can selectively apply
the number format, the font, the alignment, the border, or the pattern.

328

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 280: The table AutoFormat dialog
To create your own AutoFormat, proceed as follows:
1) Create a table and manually format it as you wish, including
borders, spacing of text from the top and bottom borders, fonts to
be used in the table heading and data cells, and backgroundcolors.
2) Position the cursor anywhere in the table and then click Table >AutoFormat.
3) On the AutoFormat dialog box (Figure 280), click Add and givethe table format a name in the Add AutoFormat dialog box andclick OK.
4) The newly named AutoFormat now appears as an available
format. Click OK to close the AutoFormat dialog box.

Tip

This technique does not include table and column widths in thetable format. To insert a table with predefined full formatting,save it as AutoText. See “Using AutoText” in Chapter 3 (Working
with Text) for instructions.

Creating a heading row in an existing table
To create a heading row in an existing table that does not have one,you need to apply an AutoFormat that does have a heading defined.
(Here is where having some personalized table formats could come invery handy.) Place the cursor anywhere in the table and then click
Table > AutoFormat. Choose a format. Click OK. Use the Morebutton and deselect the formatting options you do not want to apply toyour table.

Free eBook Edition

Chapter 9 Working with Tables329

Merging and splitting tables
One table can be split into two tables, and two tables can be merged
into a single table. Tables are split only horizontally (the rows above
the split point are put into one table, and the rows below into another).
To split a table:
1) Place the cursor in a cell which will be in the top row of thesecond table after the split (the table splits immediately above thecursor).
2) Right-click and choose Split Table in the pop-up menu. You canalso use Table > Split Table from the menu bar.
3) A Split Table dialog box pops up. You can select No heading oran alternative formatting for the heading—the top row(s) of the
new table.
4) Click OK. The table is then split into two tables separated by ablank paragraph.
Note

If cells in one table include formulas using data from the othertable, those cells will contain an error message: **Expression isfaulty**.

To merge two tables:1) Delete the blank paragraph between the tables. You must use theDelete key (not the Backspace key) to do this.
2) Select a cell in the second table.
3) Right-click and choose Merge Tables in the pop-up menu. You
can also use Table > Merge Table from the menu bar.
Tip

To see clearly where the paragraphs are and to delete themeasily, choose View > Nonprinting Characters (Ctrl+F10) or
click the ¶ button in the Standard toolbar.

Deleting a table
To delete a table:
1) Click anywhere in the table.
2) Choose Table > Delete > Table from the main menu.
Or:1) Select from the end of the paragraph before the table to the startof the paragraph after the table.
2) Press the Delete or the Backspace key.
330

Free eBook Edition

OpenOffice.org 3.x Writer GuideNote

The second method also merges the paragraph after the tablewith the paragraph before the table, which may not be what you
want.

Copying a table
To copy a table from one part of the document and paste it into anotherpart:1) Click anywhere in the table.
2) From the main menu choose Table > Select > Table.
3) Press Control+C or click the Copy icon on the Standard toolbar.
4) Move the cursor to the target position and click on it to fix theinsertion point.
5) Press Control+V or click the Paste icon in the Standard toolbar.

Moving a table
To move a table from one part of a document to another part:
1) Click anywhere in the table.
2) From the main menu, choose Table > Select > Table.
3) Press Control+X or click the Cut icon in the Standard toolbar.
(This step removes the contents of the cells but leaves the empty
cells, which must be removed in step 6.)
4) Move the cursor to the target position and click on it to fix theinsertion point.
5) Press Control+V or click the Paste icon in the Standard toolbar.
(This pastes the cells and their contents and formatting.)
6) Return to the original table, click somewhere in it and thenchoose Table > Delete > Table from the main menu.

Inserting a paragraph before or after a table
To insert a paragraph before a table, position the cursor before any
text or other contents in the first (upper left-hand) cell and press
Alt+Enter. To insert a paragraph after a table, position the cursor after
any text in the last (lower right-hand) cell and press Alt+Enter.

Free eBook Edition

Chapter 9 Working with Tables

331

Using tables as a page layout tool
Tables may be used as a page layout tool to position text in a document
instead of using tabs or spaces. For example, the Tip below isformatted as a table.
For more information and tips about using tables in page layout, see
Chapter 4 (Formatting Pages).

Tip

When inserting a table used for layout, you may wish to deselectthe Heading and Border options (see Inserting a new table on
page 305).
To remove the borders from an existing table, right-click on thetable, choose Table from the pop-up menu, select the Borders
tab (see Figure 274 on page 315), and select the icon for noborders.

The Table menu and toolbar
All of the table commands described in this chapter are conveniently
located in the main menu under the Table item and on the Table
toolbar, shown in Figure 281.
Table 6 describes the effects of using these icons. When you create atable or select an existing table, the Table toolbar may be displayed
automatically, or you can manually display it by clicking View >Toolbars > Table. The toolbar can float over the main Writer window(as shown in Figure 281), or it can be docked along any edge of themain window. See Chapter 1 (Introducing Writer) for more about
docking and floating toolbars, and how to hide and display specifictools on a toolbar.

332

Free eBook Edition

OpenOffice.org 3.x Writer Guide

1 Table

9 Top

17 Select Column

2 Line Style

10 Center (vertical)

18 Select Row

3 Line Color (border) 11 Bottom

19 AutoFormat

4 Borders

12 Insert Row

20 Table Properties

5 Background Color

13 Insert Column

21 Sort

6 Merge Cells

14 Delete Row

22 Sum

7 Split Cells

15 Delete Column

8 Optimize

16 Select Table

Figure 281: Table toolbar
Table 6: Functions of the icons on the Table toolbar
Name

Description

Table

Opens the Insert Table dialog box where you can set up andinsert a table into the document, name the table for use
with the Navigator, and set some other options. If you press
the small black triangle pointing down next to the icon, you
can use the mouse to drag to select the number of rows
and columns to include in the table.

Line Style

Opens the Border Style window where you can modify theborder line style.

Line Color(border)

Opens the Border Color window where you can modify theborder color.

Borders

Opens the Borders window where you can select which
sides of the table or of the selected cells will have a border.

Background
Color

Opens the Background toolbar where you can select thebackground color of the table or of the selected cells.

Merge
Cells

Combines the selected cells into a single cell. Refer to
Merging and splitting cells on page 314 for an example ofusing this button.

Free eBook Edition

Chapter 9 Working with Tables

333

Name

Description

Split Cells

Opens the Split Cell dialog box where you can define how
to split a cell. Refer to Merging and splitting cells on page314 for an example of using this button.

Optimize

Opens the a drop down menu with four options you can use
to let OOo optimize the distribution of the columns or rows
or optimize the row height or column width.

Top

Press this button to align the contents of the selected cells
to the top of the cell.

Center(vertical)

Press this button to align the contents of the selected cells
to the vertical center of the cell.

BottomPress this button to align the contents of the selected cells
to the bottom of the cell.

Insert Row

Inserts a row below the selected row.

InsertColumnInserts a column after the selected column.

Delete Row

Deletes the selected row(s) from the table.

DeleteColumnDeletes the selected column(s) from the table.

SelectTable

Selects the entire table.

SelectColumnSelects the column in which the cursor is positioned.

Select Row

Selects the row in which the cursor is positioned.

AutoFormat

Opens the AutoFormat dialog box where you can selectamong several predefined formatting sets. Each set ischaracterized by its own fonts, shading, and borders styles.
You can also select AutoFormat from the Insert Table
dialog box.

Table
Properties

Opens the Table Format dialog box where you can control
all the properties of the table, for example name,alignment, spacing, column width, borders, andbackground.

Sort

Opens the Sort dialog box where you can specify the sortcriteria for the selected cells.

Sum

Activates the Sum function. Refer to “Using spreadsheetfunctions in a table” on page 323 for an example of using
this function.

334

Free eBook Edition

OpenOffice.org 3.x Writer Guide

10

Chapter
Working with TemplatesFree eBook Edition

Introduction
A template is a model that you use to create other documents. For
example, you can create a template for business reports that has yourcompany’s logo on the first page. New documents created from thistemplate will all have your company’s logo on the first page.
Templates can contain anything that regular documents can contain,such as text, graphics, a set of styles, and user-specific setup
information such as measurement units, language, the default printer,and toolbar and menu customization.
All documents in OpenOffice.org (OOo) are based on templates. If you
do not specify a template when you start a new Writer document, thedocument is based on the default template for text documents. If you
have not specified a default template, Writer uses the blank template
for text documents that is installed with OOo. See “Setting a default
template” on page 342 for more information.

Using a template to create a document
To use a template to create a document:
1) From the main menu, choose File > New > Templates andDocuments. The Templates and Documents dialog box opens.
(See Figure 282.)
2) In the box on the left, click the Templates icon if it is not alreadyselected. A list of template folders appears in the center box.
3) Double-click the folder that contains the template that you want
to use. A list of all the templates contained in that folder appears
in the center box.
4) Select the template that you want to use. You can preview theselected template or view the template’s properties:•
To preview the template, click the Preview icon. A preview of
the template appears in the box on the right.
•
To view the template’s properties, click the Document
Properties icon. The template’s properties appear in the box
on the right.
5) Click Open. The Templates and Documents dialog box closes anda new document based on the selected template opens in Writer.
You can then edit and save the new document just as you would
any other document.

336

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Document
Properties

Preview

Figure 282. Templates and Documents dialog box

Creating a template
You can create your own templates in two ways: from a document, andusing a wizard.

Creating a template from a document
To create a template from a document:
1) Open a new or existing document you want to make into a
template.
2) Add the content and styles that you want.
3) From the main menu, choose File > Templates > Save. The
Templates dialog box opens (see Figure 283).
4) In the New template field, type a name for the new template.
5) In the Categories list, select the category to which you want toassign the template. The category is simply the template folder inwhich you want to save the template. For example, to save thetemplate in the “My Templates” folder, click the My Templates
category.

Free eBook Edition

Chapter 10 Working with Templates337

To learn more about template folders, see “Organizing templates”
on page 345.
6) Click OK to save the new template.

Figure 283. Saving a new template
Any settings that can be added to or modified in a document can besaved in a template. For example, below are some of the settings(although not a full list) that can be included in a Writer document andthen saved as a template for later use:
• Printer settings: which printer, single-sided or double-sided
printing, paper size, and so on.
• Styles to be used, including character, page, frame, numbering,and paragraph styles.
• Format and settings regarding indexes, tables, bibliographies,
table of contents.
Templates can also contain predefined text, saving you from having totype it every time you create a new document. For example, a letter
template may contain your name, address and salutation.
You can also save menu and toolbar customizations in templates; see
Chapter 14 (Customizing OpenOffice.org) for more information.

Creating a template using a wizard
You can use wizards to create Writer templates for letters, faxes, andagendas.
For example, the Fax Wizard steps you through the following choices:• Type of fax (business or personal)• Document elements like the date, subject line (business fax),
salutation, and complimentary close
338

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Options for sender and recipient information (business fax)
• Text to include in the footer (business fax)

To create a template using a wizard:
1) From the main menu, choose File > Wizards > [type of template
required].

Figure 284: Creating a template using a wizard
2) Follow the instructions on the pages of the wizard. This process isslightly different for each type of template, but the format issimilar for all of them.
3) In the last section of the wizard, you can specify the name andlocation for saving the template. The default location is your user
templates directory, but you can choose a different location if you
prefer.
4) Finally, you have the option of creating a new document from yourtemplate immediately, or manually changing the template. For
future documents, you can re-use the template created by the
wizard, just as you would use any other template.

Editing a template
You can edit a template’s styles and content, and then, if you wish, you
can reapply the template’s styles to documents that were created fromthat template. (Note that you can only reapply styles. You cannot
reapply content, except for content in headers and footers.)

Free eBook Edition

Chapter 10 Working with Templates339

To edit a template:1) From the main menu, choose File > Templates > Organize. The
Template Management dialog box opens.

Figure 285. Template management dialog box2) In the box on the left, double-click the folder containing thetemplate that you want to edit. A list of all the templates
contained in that folder appears underneath the folder name.
3) Select the template that you want to edit.
4) Click the Commands button and choose Edit from the dropdown menu.
5) Edit the template just as you would any other document. To saveyour changes, choose File > Save from the main menu.

Updating a document from a changed template
The next time that you open a document that was created from thechanged template, the following message appears.

Figure 286. Update styles message
Click Yes to apply the template’s changed styles to the document. Click
No if you do not want to apply the template’s changed styles to the
document (but see Caution notice below).
340

Free eBook Edition

OpenOffice.org 3.x Writer GuideCaution

Note

If you choose No in the message box shown in Figure 285, thatmessage will not appear again the next time you open the
document after changing the template it is based on. You will not
get another chance to update the styles from the template,although you can use the macro given in the Note below to reenable this feature.
You can also use the Template Changer extension (see page 344)
to reactivate the template.
To re-enable updating from a template:1) Use Tools > Macros > Organize Macros >OpenOffice.org Basic. Select the document from the list,
click the +, and select Standard. If Standard has a + besideit, click that and select a module.
2) Name the macro. For example, you could call it
FixDocument. If the Edit button is active, click it. If the Edit
button is not active, click New, type a module name in the
pop-up dialog, and click OK.
3) In the Basic window, enter the following:
Sub FixDocV3' set UpdateFromTemplate
oDocSettings = ThisComponent.createInstance( _"com.sun.star.document.Settings" )oDocSettings.UpdateFromTemplate = True
End Sub 'FixDocV3
4) Click the Run BASIC icon, then close the Basic window.
5) Save the document.
Next time when you open this document you will have theupdate from template feature back.

Adding templates with Extension Manager
The Extension Manager provides an easy way to install collections oftemplates, graphics, macros, or other add-ins that have been“packaged” into files with a .OXT extension. See Chapter 17(Customizing Writer) for more about the Extension Manager.
This Web page lists many of the available extensions:
http://extensions.services.openoffice.org/.

Free eBook Edition

Chapter 10 Working with Templates341

To install an extension, follow these steps:
1) Download the extension package and save it anywhere on yourcomputer.
2) In Writer, select Tools > Extension Manager from the menu bar.
In the Extension Manager dialog box, click Add.
3) A file browser window opens. Find and select the package oftemplates you want to install and click Open.The package begins
installing. You may be asked to accept a license agreement.
4) When the package installation is complete, the templates areavailable for use through File > New > Templates andDocuments and the extension is listed in the Extension Manager.

Figure 287: Newly-added package of templates

Setting a default template
If you create a document by choosing File > New > Text Documentfrom the main menu, Writer creates the document from the Default
template for text documents. You can, however, set a custom template
to be the default. You can reset the default later if you choose.

Setting a custom template as the default
You can set any template to be the default, as long as it is in one of thefolders displayed in the Template Management window. If necessary,342

Free eBook Edition

OpenOffice.org 3.x Writer Guide

you can add the template to a folder as described in “Importing atemplate” on page 346.
To set a custom template as the default:
1) From the main menu, choose File > Templates > Organize. The
Template Management dialog box (Figure 284) opens.
2) In the box on the left, select the folder that contains the templatethat you want to set as the default, then select the template.
3) Click the Commands button and choose Set as Default
Template from the drop-down menu.
The next time that you create a document by choosing File > New >Text Document, the document will be created from this template.
Although many important settings can be changed in the Options
dialog (see Chapter 2), for example default fonts and page size, moreadvanced settings (such as page margins) can only be changed byreplacing the default template with a new one.

Resetting Writer’s Default template as the default
To re-enable Writer’s Default template as the default:
1) In the Template Management dialog box (Figure 284), select any
folder in the box on the left.
2) Click the Commands button and choose Reset Default
Template > Text Document from the drop-down menu.
The next time that you create a document by choosing File > New >Text Document, the document will be created from Writer’s Default
template.

Associating a document with a different
template
At times you might want to associate a document with a different
template, or perhaps you’re working with a document that did not startfrom a template.
One of the major advantages of using templates is the ease of updatingstyles in more than one document, as described in Chapter 7 (Working
with Styles). If you update styles by loading a new set of styles from adifferent template (as described in Chapter 7), the document has no
association with the template from which the styles were loaded—so
you cannot use this method. What you need to do is associate thedocument with the different template.

Free eBook Edition

Chapter 10 Working with Templates

343

You can do this in two ways. In both cases, for best results the namesof styles should be the same in the existing document and the newtemplate. If they are not, you will need to use Search and Replace toreplace old styles with new ones. See Chapter 3 (Working with Text)
for more about replacing styles using Search and Replace.
Method 1
This method includes any graphics and wording (such as legal notices)that exists in the new template, as well as including styles. If you don’t
want this material, you need to delete it.
1) Use File > New > Templates and Documents. Choose thetemplate you want. A new file is created from the template. If thetemplate has unwanted text or graphics in it, delete them fromthis new file.
2) Open the document you want to change. (It opens in a new
window.) Press Control+A to select everything in the document.
Paste into the blank document created in step 1.
3) Update the table of contents, if there is one. Save the file.
Method 2
This method does not include any graphics or text from the newtemplate, except material in headers and footers; it simply includes
styles from the new template and establishes an association between
the template and the document.
1) Download the Template Changer extension fromhttp://extensions.services.openoffice.org/ and install it as
described on page 341.
2) Close and reopen OpenOffice.org. Now the File > Templatesmenu has two new choices: Assign Template (current document)
and Assign Template (folder).
3) Open the document whose template you want to change. Choose
File > Templates > Assign Template (current document).
4) In the Select Template window, find and select the required
template and click Open.
5) Save the document. If you now look in File > Properties, you will
see the new template listed at the bottom of the General page.

344

Free eBook Edition

OpenOffice.org 3.x Writer GuideOrganizing templates
Writer can only use templates that are in OOo template folders. You
can, however, create new OOo template folders and use them toorganize your templates. For example, you might have one template
folder for report templates and another for letter templates. You canalso import and export templates.
To begin, choose File > Templates > Organize from the main menu.
The Template Management dialog box (Figure 284) opens.
Note

All the actions made by the Commands button in the Template
Management dialog box can be made as well by simply rightclicking on the templates or the folders.

Creating a template folder
To create a template folder:1) In the Template Management dialog box, select any folder.
2) Click the Commands button and choose New from the dropdown menu. A new folder called Untitled appears.
3) Type a name for the new folder, and then press Enter. Writersaves the folder with the name that you entered.

Deleting a template folder
You cannot delete template folders supplied with OOo or installedusing the Extension Manager; you can only delete template folders thatyou have created. (If you have administrator privileges, you can delete
any folder.)To delete a template folder:1) In the Template Management dialog box, select the folder thatyou want to delete.
2) Click the Commands button and choose Delete from the dropdown menu. A message box appears and asks you to confirm thedeletion. Click Yes.

Moving a template
To move a template from one template folder to another template
folder:1) In the Template Management dialog box, double-click the folderthat contains the template that you want to move. A list of all theFree eBook Edition

Chapter 10 Working with Templates345

templates contained in that folder appears underneath the folder
name.
2) Click the template that you want to move and drag it to thedesired folder. If you do not have the authority to delete templates
from the source folder, this action copies the template instead ofmoving it.

Deleting a template
You cannot delete templates supplied with OOo or installed using the
Extension Manager; you can only delete templates that you havecreated. (If you have administrator privileges, you can delete any
template.)
To delete a template:1) In the Template Management dialog box, double-click the folderthat contains the template that you want to delete. A list of all thetemplates contained in that folder appears underneath the folder
name.
2) Click the template that you want to delete.
3) Click the Commands button and choose Delete from the dropdown menu. A message box appears and asks you to confirm thedeletion. Click Yes.

Importing a template
If the template that you want to use is in a different location, you must
import it into an OOo template folder.
To import a template into a template folder:1) In the Template Management dialog box, select the folder into
which you want to import the template.
2) Click the Commands button and choose Import Template fromthe drop-down menu. A standard file browser window opens.
3) Find and select the template that you want to import, and thenclick Open. The file browser window closes and the templateappears in the selected folder.
4) If you want, type a new name for the template, and then press
Enter.

346

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Exporting a template
To export a template from a template folder to another location:1) In the Template Management dialog box, double-click the folderthat contains the template that you want to export. A list of all thetemplates contained in that folder appears underneath the folder
name.
2) Select the template that you want to export.
3) Click the Commands button and choose Export Template fromthe drop-down menu. The Save As window opens.
4) Find the folder into which you want to export the template andclick Save.

Free eBook Edition

Chapter 10 Working with Templates

347

11

Chapter
Using Mail Merge
Form letters, mailing labels, and envelopes

Free eBook Edition

What is mail merge?
OpenOffice.org (OOo) Writer provides very useful features to create
and print:• Multiple copies of a document to send to a list of different
recipients (form letters)• Mailing labels• Envelopes
All these facilities, though different in application, are based aroundthe concept of a registered “data source”, from which is derived thevariable address information necessary to their function.
This chapter describes the entire process. The steps include:
1) How to create and register a data source.
2) How to create and print form letters, mailing labels, andenvelopes.
3) Optionally, how to save the output in an editable file instead ofprinting it directly.

Creating the data source
A data source is a database containing the name and address records(and optionally other information) from which a mailing list may bederived. Although you can create and print mailing labels andenvelopes without using a data source, in most cases using one is thebest approach. This chapter assumes that you are using a data source.
OOo can access a wide variety of data sources, including spreadsheets,

text files and databases such as MySQL, Adabas, and ODBC. If theinformation to be used in the mail merge is currently in a format that
OOo cannot access directly, you need to convert it, for example byexporting it to a comma-separated values (CSV) file.
For the following example we use a spreadsheet with the following
column (field) headers: Title, First name, Last name, Address,
State/County, Country, Post Code, Sex, Points. A sample data source isshown in Figure 288.

Free eBook Edition

Chapter 11 Using Mail Merge

349

Figure 288: Spreadsheet data source

Registering a data source
For a data source to be directly accessible from within a Writer
document, it must first be registered as described below. You only needto do this once; after that, the data source is available to all documents
in OpenOffice.org.
1) From within any Openoffice.org document, or from the
OpenOffice.org Welcome screen, choose File > Wizards >Address Data Source.

Figure 289: Starting the Address Data
Source wizard
2) The choices on the first page of the wizard vary with youroperating system. Select the appropriate type of external address
book. In this example, it is Other external data source. Click
Next.
350

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 290: Select type of external address book3) On the next page of the Wizard, click the Settings button.

Figure 291: Starting the Settings part of the Wizard
4) In the Data Source Properties page, select the Database type. In
our example, it is Spreadsheet. Click Next.

Free eBook Edition

Figure 292: Selecting the database type
Chapter 11 Using Mail Merge

351

5) In the next dialog box, click Browse and navigate to the
spreadsheet that contains the address information. Select the
spreadsheet and click Open to return to this dialog box. At thistime you may wish to test that the connection has been correctly
established by clicking on the Test Connection button (notshown in illustration).

Figure 293: Selecting the spreadsheet document
6) Click Finish.
7) On the following page, click Next. Because this is a spreadsheet,
do not click Field Assignment.

Figure 294: Because this is a spreadsheet, do not click Field
Assignment.

352

Free eBook Edition

OpenOffice.org 3.x Writer Guide

8) Name the file in the Location field. The default is...\Addresses.odb; but you may replace Addresses with anothername if you wish. You may also change the name in the “Address
book name” field. In our example, the name “Points” was used for
both.

Figure 295: Name the .odb file and the address book.
9) Click Finish. The data source is now registered.

Creating a form letter
Example: Sending a letter to your customer base
A mail order company organized a campaign to assign
credit points to their customers according to thequantity of goods they buy during one year.
At the end of the year, they want to send a letter to eachcustomer to show the total of credit points collected.

Free eBook Edition

Chapter 11 Using Mail Merge

353

You can create a form letter manually, which is the simplest and mostcomprehensive method and is described here, or you can use the Mail
Merge wizard as described in “Using the Mail Merge Wizard to create
a form letter” starting on page 368. If you elect to use the wizard, payclose attention to its current limitations, as identified within its
description.
1) Create a new text document: File > New > Text Document, or
open a pre-existing form letter with File > Open.
2) Display the registered data sources: View > Data sources (orpress F4).
3) Find the data source that you wish to use for the form letter, in
this case Points. Expand the Points and Tables folders, andselect Sheet1. The address data file is displayed.

Figure 296: Selecting the data source.
4) Now create or modify the form letter by typing in the text,
punctuation, line breaks, and so on that will be present in all of
the letters.
To add the mail-merge fields where needed (such as names andaddresses), click in the field heading and drag it to theappropriate point in the letter. (See Figure 297).
Note that address lines should be in individual paragraphs, notseparated by line breaks as might seem preferable. The reason
for this will be made clear in the next step.

354

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 297: Dragging fields to the body of the form letter.
5) Continue until you have composed the entire document. (SeeFigure 298 for an example.) At this time you may wish to consider
suppressing any blank lines that may appear in the resulting
letters. If not, skip ahead to Step 7.

Figure 298: The completed form letter.

Free eBook Edition

Chapter 11 Using Mail Merge

3556) To suppress blank lines:a) Click at the end of the first paragraph to be suppressed andthen choose Insert > Fields > Other.
b) Select the Functions tab and then click on Hidden
Paragraph in the Type column.
c) Now click in the Condition box and enter the details of thecondition that defines a blank address field. It has the generalform of:![Database.Table.Database field]
where the ‘!’ (NOT) character indicates the negative case andthe square brackets indicate the condition.
For example, in our Points database the condition to test if theCompany field is empty would be:![Points.Sheet1.Company] as illustrated in Figure 299.

Figure 299: Hidden paragraph insertion
To test for multiple conditions use the operators AND and/or
OR between the conditional statements, for example:![Points.Sheet1.Title]AND![Points.Sheet1.Last Name]d) Click Insert, but do not close the dialog box until you haveamended all the lines that should be suppressed.

356

Free eBook Edition

OpenOffice.org 3.x Writer Guide

The document is now ready to be printed.
1) Choose File > Print and respond with Yes in the message box.

Figure 300: Confirmation message for merging
database fields
2) In the Mail Merge dialog box, you can choose to print all records
or selected records. To select records to be printed, use
Ctrl+click to select individual records. To select a block ofrecords, select the first record in the block, scroll to the lastrecord in the block, and Shift+click on the last record.

Figure 301: The Mail Merge dialog box3) Click OK to send the letters directly to the printer.
If you prefer to save the letters to a file, perhaps to allow
proofreading or some later formatting, select File in the output
section of the Mail Merge dialog box, instead of using the default
Printer selection. This changes the dialog box to display the Savemerged document section, where Save as single document is
pre-selected. You can choose to save each letter as a single,
individual document, if preferred.
In this case, clicking OK brings up the Save as dialog box. Enter afile name for the saved letters. They will be saved consecutively inthe single document, or numbered consecutively in individual files
if saved as single documents.

Free eBook Edition

Chapter 11 Using Mail Merge

3574) If you have not saved the original, prototype form letter document(template) previously, then you should do so now. Having a form
letter template could greatly simplify the creation of other form
letters in the future and is highly recommended.

Printing mailing labels
Before beginning this process, note the brand and type of labels you
intend to use.
To print mailing labels:
1) Choose File > New > Labels.
2) On the Options tab, ensure that the Synchronise contents
checkbox is selected.
3) On the Labels tab, select the Database and Table. Select the
Brand of labels to be used, and then select the Type of label.

Tip

If the type of label you wish to use is not on the list, use theFormat tab to define a new Brand and Type. This is beyond thescope of this document, but is relatively simple to implement, if
you know the dimensions of the label.

Figure 302: Select Database, Table, label Brand, andlabel Type.

358

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4) Click the dropdown arrow under Database field. Select the first
field to be used in the label (in this example, Title). Click the left
arrow button to move this field to the Label text area, as shownin Figure 303.

Figure 303: Move fields from Database field list to
Label text area.
5) Continue adding fields and inserting desired punctuation, spaces,
and line breaks until the label is composed. Figure 304 shows thecompleted label.

Figure 304: The completed label.

Free eBook Edition

Chapter 11 Using Mail Merge

3596) Click New Document. You now have a new, single-page
document containing a series of frames, one for each label of theselected type and filled with the data source address fields thatyou selected. Quite often some of the fields in your address data
source will be unused, leading to blank lines in your labels. If thisis not important, you can skip the next few paragraphs and go
straight to Step 7, otherwise continue as described here.
a) First ensure that the label frames are showing the fieldcontents (data source headings), rather than their underlying
field names. If this is not the case, then either press Ctrl+F9
or choose View > Field Names to toggle the view.
b) Next, ensure that you can see non-printing characters, such as
paragraph marks, line breaks and so on. If these are notalready visible, choose View > Nonprinting Charactersfrom the menu bar, or press Ctrl+F10, or click on theparagraph iconin the Standard toolbar.
You will now see that address field separation is created byline breaks , rather than paragraphs . As the suppressionof blank address fields depends on hiding paragraphs, notlines, you need to replace line breaks with paragraphs asfollows.
c) Click in the first label, at the end of the last data source
address field in the first line of the label. Press Delete toremove the new line character and then press Return (or theEnter key) to insert a paragraph marker. Repeat this action foreach line in the address.
If the line spacing in the first label is not satisfactory, you may
wish to correct this before proceeding, by modifying theparagraph style associated with the address. Unless you havechanged it, the address uses the Default style.

CautionThe objective of step c) is to replace all line breaks at the end ofdata source address fields with paragraphs. Sometimes theaddress data field may be longer than the width of the label andwill wrap to the next physical line: make sure that you are notmisled by this into deleting and replacing anything other thanline break characters.

d) Click again at the end of the first paragraph to beconditionally suppressed and then choose Insert > Fields >Other. Select the Functions tab and then click on Hidden
Paragraph in the Type column. Now click in the Conditionbox and enter the details of the condition that defines a blank

360

Free eBook Edition

OpenOffice.org 3.x Writer Guideaddress field. It has the general form of:![Database.Table.Database field]
where the ‘!’ (NOT) character indicates the negative case andthe square brackets indicate the condition.
For example, in our Points database the condition to test if theCompany field is empty would be![Points.Sheet1.Company] as illustrated in Figure 299.
To test for multiple conditions, use the operators AND and/or
OR between the conditional statements, for example:![Points.Sheet1.Title]AND![Points.Sheet1.Last Name]
Click Insert, but do not close the dialog box until all lines
have been amended.
e) Repeat for each paragraph to be conditionally suppressed,
remembering to advance the cursor to the end of the line inquestion before changing the last element of the condition andInserting the result.
The last paragraph of the label address block ends with a special
field, Next record:Database.Table (Next record:Points.Sheet1 in
our example), and the Hidden paragraph field MUST be inserted
Caution before this field. This can generally be accomplished by clicking
at the end of the paragraph and then using the Left Arrow key
once to skip back over it.
A clue that you omitted this action is the observation that somerecords have been skipped and are missing from the final output.

f)Remembering that we selected
Synchronise contents earlier,
you should now be able to see asmall window containing a buttonlabelled Synchronise Labels. Click on this button and thehidden paragraph fields are propagated to all the labels inyour document.
You now have a template suitable for future use with the samedata source and type of label. If you wish to save it, use either
File > Templates > Save as, or save it as an Open Document
Text Template (.ott) into the private template directory (folder)that you have previously defined inTools > Options > OpenOffice.org > Paths > Templates.
The labels are now ready to be printed.
1) Choose File > Print. The message shown in Figure 300 appears.
Click Yes.

Free eBook Edition

Chapter 11 Using Mail Merge

3612) In the Mail Merge dialog box (Figure 301), you can choose toprint all records or selected records. To select records to beprinted, use Ctrl+click to select individual records. To select a
block of records, select the first record in the block, scroll to thelast record in the block, and Shift+click on the last record.
3) Click OK to send the labels directly to the printer.
If you prefer to save the labels to a file, perhaps to allow somelater editing such as changing the typeface or paragraph format,
then you should select File in the output section of the Mail
Merge dialog box, rather than using the default Printer selection.
This changes the dialog box to highlight the Save merged
document section, where Save as single document is preselected.
In this case, clicking OK brings up the Save as dialog box, wherea file name can be entered for the saved labels.
If you did not save the prototype label fields document (template)in step 6f, then you are prompted to do so now by another Save as
dialog box.
In either case, whether printing or saving to file, despite there
apparently being only one page of labels, the printed or saved
output will be expanded to include all of the selected records
from the data source.

Editing a saved file of mailing labels
To edit a saved file of mailing labels, open the saved label file in thenormal way. You will be prompted as to whether you wish to update alllinks. Choose No for the following reason: The first label on the page istermed the “Master Label” and all other labels are linked to it. If you
update the links, then all labels will end up containing the same data,
which may not be what you want.
You can edit individual records in the normal way, by highlighting andchanging the font name, for example.
However, you cannot edit all labels globally (for example, to change thefont name for all records) by the technique of selecting the entire
document. To achieve this result you have to edit the paragraph styleassociated with the label records as follows:
1) Right-click any correctly spelled word in a label record. Select
Edit Paragraph Style from the pop-up menu. (Note: If you click
on a misspelled word, a different menu appears.)

362

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) Then from the Paragraph Style dialog box, you can make changes
to the font name, the font size, the indents, and other attributes.

Printing envelopes
Instead of printing mailing labels, you may wish to print directly onto
envelopes. There are two basic ways to create envelopes, one where
the envelope is embedded within a letter, generally as the first page
(Insert in the Envelope dialog box), and another where the envelope isan independent document (New Doc. in the dialog box). In each casethe addressing data may be manually entered, for example by copying
and pasting from the letter with which it is associated, or it may
originate within an address data source.
This section assumes the use of an address data source and, forconvenience, a free-standing envelope.
The production of envelopes involves two steps, setup and printing, as
described in this section.

Setting up envelopes for printing
1) Choose Insert > Envelope from the menu bar.
2) In the Envelope dialog box, select the Format tab (Figure 305),
where you can select the envelope format to use. You can thenarrange the layout of the envelope to suit your requirements,
together with the character and paragraph attributes to be usedin the Sender and Addressee areas. These attributes are accessedusing the Edit buttons to the right of the dialog box, next to theword Format.

Tip

At this stage it is not possible to vary the dimensions of theframes that will hold the Sender and Addressee information, but
once the envelope has been created this will become possible
and you may wish to make some cosmetic adjustments.

Free eBook Edition

Chapter 11 Using Mail Merge363

Figure 305: Envelope formatting dialog box3) The next step is to select the Printer tab (Figure 306), from
where you may choose the printer you intend to use, its setup—
for example, specification of the tray holding envelopes—andother printer-related options such as envelope orientation andshifting. You may need to experiment with these settings toachieve the best results with your printer.
4) You now have the choice of creating the Addressee fields bydragging and dropping from the data source headings (asdescribed in “Creating a form letter” on page 353, and inparticular in Figure 297) or using the facilities of the Envelopetab.
If you prefer dragging and dropping, than click New Doc., dragyour data source headings into the Addressee area on your newenvelope and skip to step 7), otherwise continue with steps 5
and 6.

364

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 306: Choosing printer options for an envelope
5) Select the Envelope tab (Figure 307). Verify, add, or edit the
information in the Addressee and Sender boxes (Sender is the“from” on the envelope). You can use the right-hand dropdown
lists to select the database and table from which you can accessthe Addressee information, in a similar fashion to that describedfor “Printing mailing labels”, paragraphs 3, 4 and 5 on page 358.
The similarity of the method with Figure 303 and Figure 304 will
be clear.
6) When you have finished formatting, click either the New Doc. or
Insert button to finish. As might be expected, New Doc creates
only the envelope template in a new document, whereas Insert
inserts the envelope into your current document as page 1.
If you don’t want to proceed with this envelope, click Cancel orpress the Esc key. You can also click Reset to remove yourchanges and return to the original settings extant when the dialog
box opened.

Free eBook Edition

Chapter 11 Using Mail Merge

365

Figure 307: Choosing addressee and sender
information for envelopes7) Quite often some of the fields in your address data source will beunused, leading to blank lines in your envelope Addressee area. If
this is not important, you can skip the next few paragraphs and go
straight to “Merging and printing the envelopes” on page 367,
otherwise continue as described here.
Tip

The following procedure is very similar to that used for a similar
purpose in the section on printing mailing labels. It isreproduced here for purposes of clarity.

a) First ensure that the envelope is showing the field contents(data source headings), rather than their underlying fieldnames. If this is not the case, then either press Ctrl+F9 orchoose View > Field Names to toggle the view.
b) Next, ensure that you can see non-printing characters, such as
paragraph marks, line breaks and so on. If these are notalready visible, choose View > Nonprinting Charactersfrom the menu bar, or press Ctrl+F10, or click on the large
in the Standard toolbar.
paragraph icon
You will now see that address field separation is created byline breaks , rather than paragraphs . As the suppressionof blank address fields depends on hiding paragraphs, not366Free eBook Edition

OpenOffice.org 3.x Writer Guidelines, you need to replace line breaks with paragraphs asfollows.
c) Click at the end of the last data source address field in thefirst line of the label. Press Delete to remove the new line andthen press Return (or the Enter key) to insert a paragraph.
Repeat this action for each line of the label.
If the line spacing in the Addressee area is not satisfactory,
you may wish to correct this before proceeding, by modifying
the paragraph style associated with the address. Unless you
have changed it, the address uses the Default style.
d) Click again at the end of the first paragraph to beconditionally suppressed and then choose Insert > Fields >Other. Select the Functions tab and then click on Hidden
Paragraph in the Type column. Now click in the Conditionbox and enter the details of the condition that defines a blankaddress field. It has the general form of:![Database.Table.Database field]
where the ‘!’ (NOT) character indicates the negative case andthe square brackets indicate the condition.
For example, in our Points database the condition to test if theCompany field is empty would be:![Points.Sheet1.Company] as illustrated in Figure 299.
To test for multiple conditions, use the operators AND and/or
OR between the conditional statements, for example:![Points.Sheet1.Title]AND![Points.Sheet1.Last Name]
Click Insert, but do not close the dialog box until all lines
have been amended.
e) Repeat for each paragraph to be conditionally suppressed,
remembering to advance the cursor to the end of the line inquestion before changing the last element of the condition andInserting the result.

Merging and printing the envelopes
To merge addresses and print the envelopes:
1) Choose File > Print. A message box (Figure 300) appears. ClickYes.
2) The Mail Merge dialog box (Figure 301) appears. As with form
letters and mailing labels, you can choose to print envelopes for
one, several or all address records in the database.

Free eBook Edition

Chapter 11 Using Mail Merge

3673) Make your selections and then click OK to print direct to theprinter. If you wish to check the envelopes before printing them,see Step 9 of “Creating a form letter” on page 353 for
instructions.

Using the Mail Merge Wizard to create aform letter
The manual method of creating a form letter described in “Creating aform letter” on page 353 provides the most control over the result andis therefore recommended. If you prefer to use the Mail Merge wizard,
the technique is described below.
Before starting you should note the following limitations, current inOOo 3:• In Step 4 creating the salutation only allows the sex-related Mr.
and Mrs. It makes no allowance for Miss or Ms, nor does it permit
sexless addressing such as Dr.
• Again in Step 4, the General salutation is not editable and thedefault values are somewhat limited.
• In Step 5 the layout is idiosyncratic, with paragraph marks allover the place so as to space the address block frame andsalutation. Creating a professional looking document requires
significant editing.
If the above limitations are not a hindrance to you, then open a new
document with File > New > Text Document and start the Mail
Merge wizard using Tools > Mail Merge Wizard. The wizard opens,
as shown in Figure 308.

Step 1: Select starting document
The wizard gives various options to select your starting document:• Use the current document.
• Create a new document.
• Use a template.
• Use an existing document.
For the purposes of this description we assume that you opened a newtext document. This will ensure that all the steps in the wizard are fully
explored, although with experience you may find it more practical touse a draft you prepared earlier, which will allow skipping some steps.

368

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Select Use the current document and click Next.

Figure 308: Select starting document

Step 2: Select document typeThe wizard can produce letters or, if a Java Mail connection exists,
email messages. You can see these options in Figure 309. In thisexample, we are producing a letter. Select Letter and click Next.

Figure 309: Choose document typeFree eBook Edition

Chapter 11 Using Mail Merge

369

Step 3: Insert address block
This is the most complex step in the wizard. In this step you will dothree things:
1) Tell the wizard which data source to use. The data source must be
an existing file; in this example it is the “Points” spreadsheet
created earlier.
2) Select the address block to use in the document. This means
choosing which fields appear (for example, whether the country is
included) and how they look.
3) Make sure that the fields all match correctly. This is very
important. For example, the wizard has a field called <Last
Name>. If your spreadsheet has a column called “Surname”, youneed to tell the wizard that <Last Name> and “Surname” areequivalent. This is described in “Matching the fields” on page373.

Figure 310: Insert address block

Selecting the data source (address list)
1) If the current address list, identified beneath theSelect Different Address List button in section 1, is not the one
you wish to use, click the button to open the Select Address List
dialog box (Figure 311) for choosing a data source.

370

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) If you have not already created the address list, you may click
Create to do so now. This step will allow you to create a CSV(Comma Separated Values) file with a new list of address records.
If you already have an address list, as we have in the “Points”
spreadsheet example, but which is not the one you wish to use,click Add and select the file in which it resides.
In each of the above cases a new data source will be created andregistered.

Figure 311: Select address list dialog box3) Select the address list and click OK to return to step 3 of the
wizard. For this example, the preceding steps are all you need to
do. The wizard can also exclude certain records; click Filter tochoose them.

Selecting the address block
1) In step 3 of the wizard (shown in Figure 310), look at section 2.
This is where you select the address block to appear on the letter,and define its appearance and the fields it contains. The main
page gives two examples. If neither of those is exactly what you
want, click More to see more choices, in the Select Address Blockdialog box (shown in Figure 312).
2) The Select Address Block dialog box offers six choices for theformat of the address block (scroll down to see the last two
choices). You can also optionally include or exclude the country(for example, only include the country if it is not England). The six

Free eBook Edition

Chapter 11 Using Mail Merge

371

formats provided are relatively common, but they might notexactly match your preference. If this is the case, select theaddress block that is closest to what you want and click Edit,
which opens the New Address Block dialog box.

Figure 312: Select address block3) In the New Address Block dialog box, you can add or delete
address elements using the arrow buttons on the left. To moveelements around, use the arrow buttons on the right. For
example, to add an extra space between first and last names in
Figure 313, click <Last Name> and then click the right arrow
button.

Figure 313: New address block372

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Matching the fields
Finally, it is time to match the wizard’s fields with the spreadsheet
fields, so that items like <Last Name> and “Surname” match correctly.
1) Look at section 3 of step 3 of the wizard (shown in Figure 310 on
page 370). The box at the bottom displays one record at a time,using the address block format you selected. Use the right andleft arrow buttons below that address box to step through theaddresses, checking that they display correctly. Do not assume
that all the records display correctly, just because one or two do.
Check them all if you can, or at least a good proportion.
2) If the addresses do not display correctly (and they probably will
not right away), click Match Fields.

Figure 314: Match fields dialog box
The Match Fields dialog box has three columns:•
Address Elements are the terms the wizard uses for each field,
such as <First Name> and <Last Name>.
•Use the Matches to Field column to select, for each addresselement, the field from your data source that matches it.
•
The Preview column shows what will be shown for this fieldfrom the selected address block, so you can double-check thatthe match is correct.

Free eBook Edition

Chapter 11 Using Mail Merge

3733) When you have matched all the fields, click OK to return to step 3of the wizard. Now, when you use the arrow buttons to look at all
the addresses, they should all look correct. If not, go back andchange anything you’re not happy with, before clicking Next tomove to step 4.
Note that you will not be able to continue until you have correctly
matched all the fields in your chosen address block. If you see<not available> in a field position it indicates that the field inquestion is not correctly matched.
4) Notice the option for Suppress lines with empty fields. Using
the Wizard, you do not have to create your own conditional
suppression fields.

Step 4: Create salutation
The salutation is the initial greeting, for example, Dear Mr Jones. In
step 4, select the salutation that will appear in the letter.

Figure 315: Create a salutation
You can use a different greeting for men and women. To do this, Writer
must have some way of knowing whether a person is male or female. In
our spreadsheet we had a column called Sex. In the section Address
list field indicating a female recipient, set the field name to Sex
374

Free eBook Edition

OpenOffice.org 3.x Writer Guide

and the field value to F. The male salutation is then printed for all men
and the female salutation for all women.
Note

You do not need to tell OOo who is a male, because it assumes
that all non-female records are males.

If you do not select Insert Personalized Salutation, you can use amore general salutation without referring to the recipient directly,
such as “To whom it may concern”.
As in step 3, step 4 of the wizard has a preview pane at the bottom. You
should check more than one record to ensure that other records lookthe way you expect.

Step 5: Adjust layout
In step 5, you can adjust the position of the address block andsalutation on the page. You can place the address block anywhere on
the page. The salutation is always on the left, but you can move it up
and down the page. Use the buttons shown in Figure 316 to move theelements.

Figure 316: Adjust layout

Step 6: Edit document and insert extra fields
In step 6 you have another opportunity to exclude particular recipientsfrom the mail merge.

Free eBook Edition

Chapter 11 Using Mail Merge

375

Figure 317: Edit document
You can also edit the body of the document. If you started with a blankdocument, you can write the whole letter in this step. Click Edit
Document to shrink the wizard to a small window so you can easily
edit the letter.

Figure 318: Minimized mail merge wizard
You need to perform another important task in this step. The wizard
only inserts information from the name and address fields, but you may
wish to add additional data. In our example, we want to tell each
person how many points they had accumulated during the year; that
information is in the spreadsheet.
To do this:1) Click Edit Document in step 6 of the wizard.
2) Choose Insert > Fields > Other. The Fields dialog box opens.
3) Click the Database tab.
4) On the left hand side, select Mail merge fields.
5) Under Database selection find your data source (in thisexample, it is a spreadsheet). Expand it to see the fields.

376

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 319: Insert mail merge fields dialog box6) Click the field you want to insert, then click Insert to insert thefield.
You can insert any number of fields any number of times into yourmail merge document.
7) Click Close when you are done.
Note

The Database selection lists the data source you selected instep 3. All the information you need for the letter must be
contained in that data source.

Step 7: Personalize documents
In step 7, Writer creates all your letters, one per recipient.
Clicking the Edit individual Document button here is similar to step
6. The difference is that you now edit a long file containing all of theletters, so you can make changes to a particular letter to one person.
In this step of the Mail Merge wizard, click Find to open a dialog box
that allows searches within the document, perhaps for an individual
addressee.

Free eBook Edition

Chapter 11 Using Mail Merge

377

Figure 320: Personalize document
As with step 6, when editing the document, the wizard shrinks to asmall window (Figure 318). Click on this window to expand the wizard
to its full size.

Step 8: Save, print or send
You have now completed the mail merge process. The last step is to dosomething with it. In step 8, you can save the original sample letter,save the merged document, print the letters right away or, if you
created email messages, send them.
You probably want to save the starting (prototype) document and themerged document. To do this, select Save starting document toreveal the Save starting document section containing theSave starting document button. This button will be active only if the
document has not already been saved. Clicking on this button brings
up the standard Save as dialog box. Once you have named and saved
the document you return to Step 8.

Figure 321: Step 8: Save, print or send

378

Free eBook Edition

OpenOffice.org 3.x Writer Guide

The merged document can now be saved by selection of Save merged
document. This will reveal the Save merged document settings
section, from which you can select to save either as one large filecontaining all the individual, generated letters or as a separate file foreach letter.
When you have saved the merged document, you can print the final
letters now or later; and you can still manually check and edit theletters if necessary. If you elect to print at this stage, the dialog box
shown in Figure 323 appears; it should be self-explanatory.

Figure 322: Saving a merged document

Figure 323: Printing the merged document

Free eBook Edition

Chapter 11 Using Mail Merge

379

12

ChapterTables of Contents,
Indexes, andBibliographies

Free eBook Edition

Introduction
This chapter describes how to create and maintain a table of contents(TOC), an index, and a bibliography for a text document using
OpenOffice.org Writer. To understand the instructions, you need tohave a basic familiarity with Writer and styles (see Chapters 6 and 7).
This chapter does not cover all the possible ways to use the features
available through the TOC/Index dialog boxes in Writer. Some common
usage examples are given; others will be made available from the
HowTo section of the Documentation wiki.

Tables of contents
Writer’s table of contents feature lets you build an automated table ofcontents from the headings in your document. Whenever changes are
made to the text of a heading in the body of the document or the pageon which the heading appears, those changes automatically appear in
the table of contents which it is next updated.
Before you start, make sure that the headings are styled consistently.
For example, you can use the Heading 1 style for chapter titles and the
Heading 2 and Heading 3 styles for chapter subheadings.
This section shows you how to:• Create a table of contents quickly, using the defaults.
• Customize a table of contents.
Note

You can use any style you want for the different levels to
appear in the table of contents; however, for simplicity, most of
this chapter uses the default Heading [x] styles.

Creating a table of contents quickly
Most of the time you will probably find the default table of contents tobe what you need. Inserting a default TOC is simple:
1) When you create your document, use the following paragraphstyles for different heading levels (such as chapter and section
headings): Heading 1, Heading 2, and Heading 3. These are what
will appear in your TOC. Writer can evaluate up to ten levels ofheadings.
2) Click in the document where you want the TOC to appear.
3) Choose Insert > Indexes and Tables > Indexes and Tables.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies3814) Click OK. The result will be a typical table of contents.
Some tips you may find useful:• If some of your headings do not show up in the table of contents,
check that the headings have been tagged with the correct
paragraph style. If a whole level of headings does not show up,
check the settings in Tools > Outline Numbering. See“Defining a hierarchy of headings” in Chapter 6 (Introduction to
Styles) for more information.
• The TOC appears with a gray background. This background isthere to remind you that the text is generated automatically. It is
not printed and does not appear if the document is converted to a
PDF. To turn off this gray background, go to Tools > Options >OpenOffice.org > Appearance, then scroll down to the Text
Document section and deselect the option for Index and tableshadings.
This change may leave a gray background showing behind thedots between the headings and the page numbers, because thedots are part of a tab. To turn that shading off, go to Tools >Options > OpenOffice.org Writer > Formatting Aids anddeselect the option for Tabs.
• If you cannot place the cursor in the TOC, choose Tools >Options > OpenOffice.org Writer > Formatting Aids, andthen select Enable in the Cursor in protected areas section.
If you add or delete text (so that headings move to different pages) or
you add, delete, or change headings, you need to update the table ofcontents. To do this:1) Click anywhere in the TOC.
2) Right-click and select Update Index/Table from the pop-up
menu.

Customizing a table of contents
Almost every aspect of the table of contents can be customized to suit
the style and requirements of your document. However, with theflexibility also comes some complexity and it is good to have in mind
the desired end result.
Start by clicking in the document where you want the table of contents
to apear and choose Insert > Indexes and Tables > Indexes andTables to open the Insert Index/Table dialog box.

382

Free eBook Edition

OpenOffice.org 3.x Writer Guide

You can also access this dialog box at any time by right-clicking
anywhere in an existing table of contents and choosing Modify fromthe pop-up menu.

Figure 324: Index/Table page of Insert Index/Table dialog box
The Insert Index/Table dialog box has five pages. Each of them covers
a different aspect of the TOC structure and appearance:• Use the Index/Table page to set the attributes of the TOC, mostimportantly the type of index.
• Use the Entries and Styles pages to format the entries in the TOC.
• Use the Columns page to put the TOC into more than one column.
• Use the Background page to add color or a graphic to thebackground of the TOC.
You can display a preview box, located on the left-hand side of eachpage, to show as you work how the TOC will look. (If you do not see thepreview box, select the Preview option in the lower right-hand cornerof the dialog box.) The illustrations in this chapter show the dialog box
as it appears with the preview box hidden.
After making all your changes, click OK to apply them. If you need torevert to the default settings, click the Reset button.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies

383

Index/Table pageUse the Index/Table page, pictured in Figure 324, to set the attributesof the TOC.
Changing the title
To give the table of contents a different title, type it in the Title field.
To delete the title, clear the Title field.
Setting the type of index
In computer terminology, a table of contents is one of several types ofindexes. Be sure the Type of Index is set to Table of Contents. See
Alphabetic indexes” on page 393 and “Other types of indexes” on page403 for more about creating other types of indexes.
Note

You can only change the type of index when you first create it.
Once you define an index type (for example, make a table ofcontents) you cannot change the type.

Protecting against manual changes
To prevent the TOC from being changed accidentally, select Protectedagainst manual changes. If this option is selected, the TOC can only
be changed by using the right-click menu or the Insert Table/Index
dialog box. If the option is not selected, the TOC can be changed
directly on the document page, just like other text. However, any
manual changes will be lost when you update it.
Changing the number of levels included
Writer uses 10 levels of headings when it builds the table of contents(or the number of levels used in the document, whichever is smaller).
To change the number of levels included, enter the required number inthe Evaluate up to level box. For example, the TOC in this bookincludes only the first four level heading levels.
Choosing the scope of the table of contents
The for drop-down list in the Create index/table area, allows you toselect whether the TOC will cover all the document's headings (Entire
document) or just the headings of the chapter where it is inserted.
Writer identifies a “chapter” as all the headings between two first level
outline headings (normally Heading 1).

384

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Creating a table of contents from an outline
The third section of the Index/Table page is used to determine what
Writer should use to create the TOC. The available choices (notmutually exclusive) are:
• Outline• Additional styles• Index marks
By default Writer uses the outline levels; that is, paragraphs formatted
with the paragraph styles associated with outline levels in Tools >Outline Numbering. In the default document, Heading 1 has outline
level 1, Heading 2 outline level 2 and so on up to Heading 10.
You can change the paragraph styles included in the outline as
described in “Defining a hierarchy of headings” in Chapter 6 of thisguide. You can include other paragraph styles in the TOC by assigningan outline level to those styles. To do this, modify the paragraph styledefinition: go to the Outline & Numbering page for the style, and selectthe required outline level. Click OK to save the change.

Figure 325: Specifying an outline level on the Outline &Numbering page for a paragraph styleCreating from additional styles
By selecting the Additional Styles option on the Index/Table page, you
can add more paragraph styles to the TOC. This can be useful when
you want to include in the TOC an annex (appendix). If the Outline
option is also selected, the additional styles will be included in thetable of contents together with the ones defined in the outline
numbering. However, headings included in the TOC using this feature
are not hyperlinked to the headings in the document body as areheadings assigned to outline levels.
New in3.1

As described above, you can now assign outline levels toparagraph styles. Styles with outline levels assigned are
hyperlinked in the TOC.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies385

In versions of Writer before 3.1, here is how to include paragraphs
formatted with other styles:
1) In the Create from area, deselect Outline and select instead
Additional Styles and click the (...) button to the right ofAdditional Styles. The Assign Styles dialog box opens.
2) In the Not applied column, click the style that you want to assign
to the index.
3) Use the >> button to move the selected style to the desired
outline level. For example, to have paragraphs formatted with theselected style to appear as top-level entries in the table ofcontents, click the >> button once to move the style into the 1
column. To move the style in the opposite direction, use the <<button.
4) Click OK to save your changes and return to the Index/Table tab
or click Cancel to return without saving your changes.

Figure 326: Assign Styles dialog box

Note

You can not change the outline level of a paragraph as definedin Tools > Outline Numbering using the Additional Styles
page. In fact any change made to the level of these paragraphs
will be ignored.

Creating from index marks
This selection adds any index entries that you have inserted into the
document by using Insert > Indexes and Tables > Entry. Normally
you would not use this selection for a table of contents. However, if you
do wish to use it, be sure to select Table of Contents from the dropdown list in the Insert Index Entry dialog box (see Figure 331) when
386

Free eBook Edition

OpenOffice.org 3.x Writer Guide

you are entering the index entries for use in a TOC, so that Writer candistinguish between them and any index entries intended for inclusion
in an alphabetic index.

Entries pageUse the Entries page to define and format the entries in the TOC. Eachoutline level can be styled independently from the other levels byadding and deleting elements.

Figure 327: Entries page of Insert Index/Table dialog box
Click on a number in the Level column to select the outline level
whose elements you want to format. This will display the Structureline which contains the elements included in the entries for that level.
The available elements are displayed just below the structure line andare grayed out if already included:• The E# button represents the “chapter number”, which means
the heading number, not just for chapters but also for other levelsof headings.
• The E button represents the chapter (or sub-chapter) text.
• The T button represents a tab stop.
• The # button represents the page number.
• The LS button represents the start of a hyperlink. (This button
does not appear on the default Structure line.)• The LE button represents the end of a hyperlink. (This button
does not appear on the default Structure line.)
Each white field on the Structure line represents a blank space. You
can add custom text if you desire.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies

387

Note

If the chapter number defined for your document includes theword “Chapter” before the number itself, then the E# field in
the TOC will also include the word “Chapter”. If you want toinclude the chapter number with the page number (forexample, in the style “1-1, 1-2, ...”) , you will find that thepage number appears in the TOC as “Chapter 1-1”, which isprobably not what you want.

Adding elements
To add an element to the Structure line:
1) Click in the white field where you want to insert the element.
2) Click one of the five buttons just below the Structure line. (Forexample, to add a tab, click the Tab stop button.) A button
representing the new element appears on the Structure line.
3) To add custom text, such as the word Chapter, type the text in thewhite field.
Changing elements
To change an element in the Structure line, click the button
representing that element and then click the element that you want tosubstitute in the row of buttons just below the Structure line. For
example, to change a chapter number to a tab stop, click the E#
button on the Structure line (it shows then as being pressed) and thenclick the Tab stop button in the row of available elements.
Deleting elements
To delete an element from the Structure line, click the button
representing that element and then press the Delete key on yourkeyboard. For example, to delete a tab stop, click the T button andthen press the Delete key.
Hyperlinking an entry
To change the default Structure line so that the chapter number andthe entry text form a hyperlink, follow these steps:
1) On the Structure line, place the cursor in the white field to theleft of the E# button.
2) Click the Hyperlink button. An LS button, representing the startof the hyperlink, appears on the Structure line.
3) On the Structure line, place the cursor in the white field to theright of the E button.
4) Click the Hyperlink button again. An LE button, representing theend of the hyperlink, appears on the Structure line.
388

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 328 represents the completion of the above steps. The number
and the text of the entries on that level will now be hyperlinks.

Figure 328: Hyperlink in table of contents
Applying character styles
You might want an element to be a bit different from the rest of theline. For example, you might want the page number to be bold. To
apply a character style to an element:
1) Be sure you have defined a suitable character style.
2) On the Structure line, click the button representing the element
to which you want to apply a style.
3) From the Character Style drop-down list, select the desired style.
To view or edit the attributes of a character style, select the style fromthe Character Style drop-down list and then click the Edit button.

Tip

The default character style for hyperlinks is Internet Link,
which by default is underlined and shown in blue. If you want
the TOC entries to work as hyperlinks, but not appear
underlined and blue, you can change the attributes of theInternet Link character style. However, this changes theattributes of all hyperlinks in the document.
If you want other hyperlinks (for example, website addresses)
to remain in the default style, select the LS button on the
Structure line and change the character style selection for
TOC entries to Index Link. If necessary, change the attributes
for Index Link to what you want.

Applying changes to all outline levels
To apply the displayed structure and formatting to all outline levels,
click the All button.
Tab position relative to Paragraph Style indent
When this option is selected, entries are indented according to thesettings of their individual formats. Where a paragraph style specifies

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies389

an indent on the left, tab stops are relative to this indent. If this option
is not selected, tab stops are relative to the left margin position.

Styles pageUse the Styles page to change which paragraph style is assigned toeach level in the table of contents. In most cases, the best strategy is tokeep the assigned styles but change their settings as needed to makethe TOC appear the way you want.
To apply a custom paragraph style to an outline level:1) In the Levels list box, select the outline level.
2) In the Paragraph Styles list box, click the desired paragraph style.
3) Click the < button to apply the selected paragraph style to theselected outline level.
The style assigned to each level appears in square brackets in theLevels list.

Figure 329: Styles page of Insert Index/Table dialog box
To remove paragraph styling from an outline level, select the outline
level in the Levels list box, and then click the Default button.
To view or edit the attributes of a paragraph style, click the style in the
Paragraph Styles list box, and then click the Edit button.
Note

390

Changes to a paragraph style will affect any text in the
document that is formatted using this style, not just the formatof the table of contents.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Columns pageUse the Columns page to change the number of columns for the TOC.
Multiple columns are more likely to be used in indexes than in TOCs,
so this page is described in the section on indexes. See Figure 335.

Background pageUse the Background page to add color or a graphic to the backgroundof the TOC. Refer to Chapter 4 (Formatting Pages) for details on
adding backgrounds to document elements.

Note

Even though the TOC may have a shade behind it while
editing, it is actually not shaded by default. It appears shaded
because it is a field and will appear to have the same shading
all fields have.

Maintaining a table of contents
This section shows you how to:• Edit an existing TOC.
• Update a TOC when changes are made to the document.
• Delete a TOC.

Editing a table of contents
To edit an existing TOC:
1) Right-click anywhere in the TOC.
2) From the pop-up menu, choose Edit Index/Table. The Insert
Index/Table dialog box (Figure 324 on page 383) opens and you
can edit and save the table as described in the previous section.

Tip

If you cannot click in the TOC, it is probably because it isprotected. To disable this protection, choose Tools > Options> OpenOffice.org Writer > Formatting Aids, and thenselect Enable in the Cursor in protected areas section. If you
wish to edit the TOC without enabling the cursor, you canaccess it from the Navigator.

You can also access the Index/Table dialog box from the Navigator(Figure 330).
1) Open the Navigator (press F5).
2) Click the + sign next to Indexes.
3) Right-click on the desired index and choose Index > Edit.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies391

Updating a table of contents
Writer does not update the TOC automatically, so after any changes tothe headings, you must update it manually. To update a TOC whenchanges are made to the document:
1) Richt-click anywhere in the TOC.
2) From the pop-up menu, choose Update Index/Table. Writer
updates the TOC to reflect the changes in the document.
You can also update the index from the Navigator by right-click on
Indexes > Table of Contents1 and choosing Index > Update fromthe pop-up menu.

Figure 330: Access an index from the Navigator

Deleting a table of contents
To delete the TOC from a document:
1) Right-click anywhere in the TOC.
2) From the pop-up menu, choose Delete Index/Table. Writerdeletes the TOC.

392

Free eBook Edition

OpenOffice.org 3.x Writer GuideNote

Writer will not prompt you to confirm the delete! Use caution
when deleting a TOC.
You can also delete the index from the Navigator by selecting
Index > Delete from the menu shown in Figure 330.

Alphabetic indexes
An alphabetical index (referred to as an index) is a list of keywords orphrases used throughout a document that, if listed in order with page
numbers, may help the reader find information quickly. Generally anindex is found in the back of a book or document.
This section describes how to:• Add index entries.
• Create an alphabetic index quickly.
• Customize the display of index entries.
• Customize the appearance of the index.
• View and edit existing index entries.

Adding index entries
Before you can create an index, you must create some index entries.
1) Either highlight the word or phrase to add to the index or place
the cursor at the beginning of the word or phrase. (If you want to
add multiple words as one entry it will generally be better tohighlight the entire phrase.)
2) Choose Insert > Indexes and Tables > Entry to display a dialog
box similar to that shown in Figure 331. You can accept the wordor phrase shown in the Entry box or change it to whatever you
want. If you placed the cursor at the beginning of a word, clicking
on the Entry text box inserts the word into the text box.
3) Click Insert to create the entry.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies393

Figure 331: Inserting an index entry
See “Customizing index entries” on page 395 for an explanation of the
fields on this dialog box.
You can create multiple entries without closing the dialog box. For
each one:1) Click at the location in the document that you want to index.
2) Click again on the dialog box.
3) Change the entry if needed, and click Insert.
4) Repeat steps 1–3 until you have finished with the entries, thenclick Close.

Note

If field shading is active (see Tools > Options >OpenOffice.org > Appearance > Text Document > Field
shadings), when a selected word or phrase has been added tothe index, it is shown in the text with a gray background. Index
entries whose text is different from the text in the document
are marked by a small gray rectangle.

Tip

You can also open the Insert Index Entry dialog box by clicking
the Entry icon on the Insert toolbar, as shown in Figure 332.

Figure 332: Entry icon on Insert toolbar

394

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Creating an alphabetic index quickly
Now that you have some index entries, you can create the index.
Although indexes can be customized extensively in Writer, most of thetime you need to make only a few choices. To create an index quickly:
1) Click in the document where you want to add the index and click
Insert > Indexes and Tables > Indexes and Tables.
2) In the Type box on the Index/Table page (Figure 333), selectAlphabetical Index.
3) In the Options section, you may want to uncheck Case sensitive(so that capitalized and lower-case words are treated as the sameword) and uncheck Combine identical entries with p or pp.
4) Click OK. The result will be a typical index.
Writer does not update an index automatically. If you add, delete, orchange the text of index entries, you need to update the index. To dothis, follow the steps outlined in “Updating a table of contents” on page392.

Customizing index entries
Below is a brief explanation of the fields in the Insert Index Entry
dialog box and how to use them.
Index
The type of index this entry is for. The default is AlphabeticalIndex, but you can use this field to create extra entries for a table ofcontents or user-defined indexes or lists of almost anything. For
example, you might want an index containing only the scientificnames of species mentioned in the text, and a separate index
containing only the common names of species. See “Other types ofindexes” on page 403.
Entry
The word or phrase to be added to the selected index. This word orphrase does not need to be in the document itself; you can add
synonyms and other terms that you want to appear in the index.
1st key
An index key is an entry that has no associated page number andhas several subentries that do have page numbers. Using keys is a
useful way of grouping related topics. (See “Example of using an
index key” on page 396.)

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies395

2nd key
You can have a three-level index, where some of the first-level keys
have level-2 entries that are also keys (without page numbers). Thisdegree of index complexity is not often necessary.
Main entry
When the same term is indexed on several pages, often one of thosepages has more important or detailed information on that topic, so
you want it to be the main entry. To make the page number for themain, or most important, entry stand out, select this option and thendefine the character style for the page number of a main index entry
to be bold, for example.
Apply to all similar texts
Select this option to have Writer automatically identify and mark anyother word or phrase that matches the current selection. The Matchcase and Whole words only options become available if this option
is selected. Use this option with care, as it may result in many
unwanted page numbers (for minor uses of a word) being listed in
the index.

Example of using an index key
An index key is a primary entry under which subentries are grouped.
For example, you might want to create a grouping similar to this:OpenOffice.org
Calc
10
Impress 15
Writer5
In this example, OpenOffice.org is the 1st key. The subentries (withthe page numbers showing) are the indexed entries. To insert an index
entry for the topic Writer, on the Insert Index Entry dialog box (Figure
331 on page 394), type Writer in the Entry box and OpenOffice.org
in the 1st key box.

Customizing the appearance of an index
To customize an existing index, right-click anywhere in the index andchoose Modify from the pop-up menu.
The Insert Index/Table dialog box (Figure 333) has five pages. Any or
all of them can be used to customize the appearance of an index.

396

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Use the Index/Table page to set the attributes of the index.
• Use the Entries and Styles pages to format the entries in the index.
• Use the Columns tab to put the index into more than one column.
• Use the Background tab to add color or a graphic to thebackground of the index.
The preview box, located on the left-hand side of the dialog box, shows
as you work how the index will look. (If you do not see the preview box,
select Preview in the lower right-hand corner of the dialog box.)
After making your changes, click OK to save the index so it appears inyour document.

Index/Table pageUse the Index/Table page to set the basic attributes of the index.
1) To give the Index a different title, type it in the Title field. To
delete the title, clear the Title field.

Figure 333: Index/Table page of Insert Index/Table dialog box2) Be sure the Type of Index is set to Alphabetic Index.
3) To prevent the index from being changed accidentally, selectProtected against manual changes. If this option is selected,
the index can only be changed using the right-click menu or theFree eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies

397

Insert Table/Index dialog box. If the option is not selected, theindex can be changed directly on the document page, just likeother text, but any manual changes to an index are lost when you
update it.
4) From the drop-down list in the Create index/table area, selectEntire document. You can also choose to create an index for justthe current chapter.
5) Various other options determine how the index handles entries:•
Combine identical entries. Defines how identical entries aredealt with. Normally each page number of an indexed word orphrase will be shown in the index; however these can be
combined using the Combine identical entries with p or
pp. If you want a page range displayed, select Combine with– (which will produce something similar to 23–31). If you wantdifferent entries based on what letters are capitalized, selectCase sensitive.
•
AutoCapitalize entries. Automatically capitalizes the first
letter of each entry regardless of how they show within the
document itself.
•
Keys as separate entries. For the keys to have their own
page numbers, select this option.
•
Concordance file. Enables a list of words in an external file
to be imported (select using the File button) and then usedwithin the index. The concordance file has a special fileformat; for further information, refer to concordance file inHelp > OpenOffice.org Help. Using a concordance file canspeed up production of an index, but unless the words arevery carefully selected and you edit the index afterwards, theresulting index can be full of entries for minor mentions of aterm, making it less useful than a more selective index.
•
Sort. Defines how the entries are sorted when displayed. The
only option is alphanumeric, but you can define which
language alphabet will be used.

Entries pageUse the Entries page to set exactly how and what will be displayed foreach of the entries. The page is similar to Figure 334.

398

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 334: Entries page for creating an alphabetical index
To begin, click a number in the Level column to select the index level
whose elements you want to format. (You will be able to apply yourchanges to all index levels later.) The Structure line displays theelements for entries in that level. Each button on the Structure line
represents one element:• The E button represents the entry text.
• The T button represents a tab stop.
• The # button represents the page number.
• The CI button represents chapter information. This may not be
displayed immediately, but can be added.
Each white field on the Structure line represents a blank space. You
can add custom text if you desire.
Adding elements
To add an element to the Structure line:
1) Place the cursor in the white field to the left of where you want toinsert the element.
2) Click one of the buttons below the Structure line. (For example, to
add a tab stop, click the Tab stop button.) A button representing
the new element appears on the Structure line.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies399

Changing elements
To change an element in the Structure line, click the button
representing that element and then click the element that you want tosubstitute in the row of buttons just below the Structure line. For
example, to change entry text to a tab stop, click the E# button on the
Structure line (it shows then as being pressed) and then click the Tabstop button in the row of available elements.
Deleting elements
To delete an element from the Structure line, click the button that
represents that element and then press the Delete key on yourkeyboard. For example, to delete a tab stop, click the T button andthen press the Delete key.
Applying character styles
Each of the items that can be added to the Structure line may haveadditional formatting. For example, you may want the page number tobe a different size from the rest of the index text. To do this, apply acharacter style to one of the elements in the Structure line.
To apply a character style to an element:
1) On the Structure line, click the button representing the element
to which you want to apply a style.
2) Select the desired style from the Character Style drop-down list.
Writer applies the style to the selected element.
To view or edit the attributes of a character style, select the style fromthe Character Style drop-down list and then click the Edit button.
Formatting entries
Apply additional formatting using the options in the Format section.
• Alphabetical delimiter. This will display, as a means ofseparating index entries, the first letter of all the subsequentindex entries. For example:
Aapple, 4author, 10
B
break, 2bus, 4• Key separated by commas. Arranges the entries in the index on

the same line but separated by commas.

400

Free eBook Edition

OpenOffice.org 3.x Writer Guide• Tab position relative to Paragraph Style indent. Whenchecked, entries are indented according to the settings of theirindividual formats. Where a paragraph style with an indent on theleft is in use, tab stops will be relative to this indent. If this option
is not selected, tab stops will be relative to the left margin
position.

Styles and Background pages
Refer to “Styles page” on page 390 and “Background page” on page391.

Columns pageUse the Columns page (Figure 335) to change the number of columns
for the index.

Figure 335: Columns page of the Insert Index/Table dialog box
Adding multiple columns
To display the index in more than one column:
1) Either enter the number of columns desired in the box labeled
Columns or select the icon representing the number of columns.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies4012) To evenly distribute the columns according to the page width,
check the AutoWidth box. If it is unchecked, you can manually
set each of the following:•
Width between each of the columns•
Spacing between each of the columns
3) You can choose to have a separator line between the columns:•
Line: The width (thickness) of the line.
•
Height: The height of the line.
•
Position: Position of the line relative to the columns (top,middle, or bottom) if the height is less than 100%.

Maintaining an index
To modify the appearance of an index:
1) Click anywhere in the index and then right-click.
2) From the pop-up menu, choose Edit Index/Table. The Insert
Index/Table dialog box opens and you can edit and save the index
using the five tabs described in the previous section.
To update or delete an index, follow the process described in thesections “Updating a table of contents” and “Deleting a table ofcontents” on page 392.

Viewing and editing existing index entries
Once you have added the initial entries, you can make someamendments or add some new ones. You can view and edit these using
the following steps:
1) Ensure that field shading is active (Tools > Options >OpenOffice.org> Appearance > Text Document > Field
shadings), so you can locate index entries more easily.
2) Place the cursor immediately to the left of an existing index entry
in the body of your document and select Edit > Index Entry.
Alternatively, right-click on the word or phrase and from the popup menu select Index Entry.
3) A dialog box similar to Figure 336 appears. You can move throughthe various index entries using the forward and back arrow
buttons. If there is more than one entry for a single word orphrase, then you can scroll through each of the entries.
4) Make the necessary modifications or additions to the index
entries and, when finished, click OK.

402

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 336: Viewing and editing index entries

Other types of indexes
An alphabetical index is not the only type of index that you can buildwith Writer. Other types of indexes supplied with Writer include thosefor illustrations, tables, and objects, and you can even create a userdefined index. This chapter does not give examples of all thepossibilities.
To create other indexes:
1) Place the cursor where you want the index created.
2) Select Insert > Indexes and tables > Indexes and tables fromthe menu bar.
3) On the Insert Index/Table dialog box, in the Type dropdown list,
select the index wanted.
4) Modify the various pages, which are very similar to those
discussed in previous sections.
5) Select OK when everything has been set.

Example: Creating an index of figures
Creating an index (list) of figures or tables is easy if the figure captions
were created Insert > Caption or manually using a number range
variable as described in Chapter 14 (Working with Fields).
1) On the Insert Index/Table dialog box, in the Type dropdown list,
choose Illustration Index. You can change the title of the index tosomething else; we have used Table of Figures as our title.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies403

Figure 337: Creating other types of indexes
2) Be sure Captions is selected in the Create from section, andchoose the category of caption. The default category is
Illustration; in our example we have used Figure for the figure
captions.
3) Under Display, you can choose References (to include thecategory, number, and caption text), Category and Number, or
Caption Text. We have chosen References.
4) On the Entries page, notice that hyperlinking from the index tothe body of the document is not available, but you can make someother selections.

Figure 338: Entries tab for Illustration Index
5) Click OK. The result is shown below.

404

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 339: Resulting index of illustrations

Bibliographies
A bibliography is useful for displaying references used throughout adocument. These references are either stored in a bibliographic
database or within the document itself.
This section shows you how to:• Create a bibliographic database; add and maintain entries.
• Add a reference into a document.
• Format the bibliography.
• Update and edit an existing bibliography.
For most of this section, the database table used is the sample one thatcomes with Writer. For information on creating a new table in the
bibliographic database, see Chapter 8 (Getting Started with Base) in
the Getting Started guide.

Creating a bibliographic database
Although you can create references within the document itself,
creating a bibliographic database allows reuse in other documents andsaves a lot of time.
Select Tools > Bibliography Database. A window similar to that in
Figure 340 is shown.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies405

You can use the top portion of this window to:• Filter for specific records within the database (see “Filtering

records” below).
• Change some details of columns in the database (see “Changing
column details”).
• Select an alternative data source (another database or table) orchange details of the fields in the database.
The middle portion of the window shows each of the records in a tablelayout similar to that of a spreadsheet. Additional fields can be viewed
by scrolling the table to the right.
The bottom portion of the window shows the contents of the selectedrecord.

Figure 340: Bibliography Database main window

406

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Filtering records
To set up a filter for specific records within the bibliographic database,select Tools > Filter from the Bibliographic Database menu bar. On
the Standard Filter dialog box, choose the fields, conditions and values
for the filter and click OK.

Figure 341: Setting up a filter for the bibliographic database

Changing column details
To change the details of columns in the bibliographic database, click
the Column Arrangement button near the top of the window. The
Column Layout for Table biblio dialog box (Figure 342) is displayed.

Figure 342. Changing column layout for bibliographic database

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies407

Changing the data source
To change the data source in use (for example, if you have more than
one bibliographic database for different purposes), click the Data
Source button near the top of the window. The Choose Data Source
dialog box (Figure 343) is displayed.

Figure 343: Choosing a different data source for the
bibliographic database

Changing field details
You can make changes to the bibliography database (for example,
rename fields or change the length of fields) by doing the following:1) In the main document (not the Bibliography Database window),press F4 or click View > Data Sources to open the data source
window, similar to Figure 344.
2) Make sure that the Bibliography database is selected as well as
the correct table. You may have to expand some levels to be able
to select the correct ones.

Figure 344: Data Source view of Bibliography database3) Right-click on the table entry (biblio in the example) and select
Edit Database File from the pop-up menu. This opens a window
similar to Figure 345, which is the main menu for Base, thedatabase component of OpenOffice.org.

408

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 345: Main window for working with databases4) If Tables (under the Database view) is not selected, select it now.
5) Right-click on the biblio table name in the Tables section andselect Edit from the pop-up menu to display a window similar tothat shown in Error: Reference source not found.

Figure 346: Modify table properties window

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies4096) You can now select each of the rows and modify the Field
Properties as required.
7) When finished, you will be asked to confirm that you want thechanges saved.
Note

For more information on how to use OOo’s database features,
see Chapter 8 (Getting Started with Base) in the Getting
Started guide.

Adding entries to the database
To add entries to the database:1) You can add records directly into the database using the lower
portion of the window shown in Figure 340 on page 406.
2) Complete each of the fields as required. Use the Tab key to move
between fields.
3) It is best to use a unique name in the Short name field. This isused when inserting entries into documents.
4) To complete the entry move to the last field and press Tab once
more.
Note

The Identifier column in the upper portion of the Bibliography
Database window is labeled Short name in the lower portion of
the window.

If your document requires [Author, date] style citations, use theIdentifier (Short name) field of the database to record the informationin the required format. If you are using a simple citation numberingsystem (for example, [1],[2],...), use a unique reference of some sort in
the Identifier (Short name) field. Writer will auto-number entries basedon the position within the document.

Maintaining entries in the database
To maintain entries in the database, use the Bibliography Databasewindow as in the previous section. Click on the appropriate field andmodify the text as appropriate.
Modified entries are saved automatically to the database when the
cursor moves off the record.

410

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Adding a reference (citation) into a document
Writer supports two ways of showing references (citations) in the textof a document:• Using authors’ names and dates of the referenced documents, forexample [Smith, 2004], as recorded in the Identifier (Short name)of each bibliographic entry.
• By numbering the referenced documents in the sequence theyoccur in the text, for example [1].
Tip

To specify which citation style is used in the document, use theIndex/Table page on the Insert Index/Table dialog, describedon page 405.

To add references from the bibliographic database into a document:
1) Place the cursor where you want the reference to appear.
2) From the main menu, choose Insert > Indexes and Tables >Bibliographic entry.
3) In the Insert Bibliographic Entry dialog box, shown in Figure 347,
choose From bibliography database at the top of the dialog
box. (You can also insert a reference from the document itself byselecting From document content, but that method is notcovered in this chapter.)Figure 347: Inserting bibliographic entries into a document
4) Select the reference from the Short name dropdown list near thebottom of the dialog box. The Author and Title of the selectedreference are shown in the middle of the dialog box, to help you
verify that it is the reference you want.
5) To insert the reference into the document, click Insert.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies

4116) You can keep the dialog box open and insert another reference
into the document; you don’t need to close and reopen it.
7) When you have finished inserting all the references, select Close.

Formating the bibliography
Formatting the bibliography involves choices made in two places:• Insert Index/table dialog (covered in this section)• Bibliography 1 paragraph style (see page 414)
To create the bibliography:
1) Place the cursor at the point where you wish to insert thebibliography.
2) Select Insert > Indexes and Tables > Indexes and Tables andchange the Type to Bibliography, to see a dialog box similar tothat shown in Figure 348.

Figure 348: Inserting a bibliography
The Insert Index/Table dialog box has five pages.

412

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Index/Table pageThe basic settings are selected on this page.
1) To give the bibliography a title, enter it in the Title field. (A title
is not required.)2) You can protect the bibliography from being changed accidentally,
by checking Protected against manual changes. If this option
is selected, the bibliography can only be changed using the rightclick menu or the Insert Table/Index dialog. If the option is notselected, the bibliography can be changed directly on the
document page, just like other text, but any manual changes will
be lost when you update the bibliography.
3) To have the bibliographic entries numbered within the body of the
document (for example, [1], [2], ...), select Number entries. If,
however, you wish to have the field Identifier (from the database)appear in the document, deselect this option.
4) Select the type of brackets that you want for the referenced
entries shown within the body of the document.
5) Define the sorting you require. Currently only alphanumericsorting is supported. Sorting by the the sequence that entries
appear in the text is done on the Entries page.

Entries pageThe structure of this page is similar to that for tables of contents andindexes (see Figure 349).
You can define how the entry will appear based on the Type of theentry, or simply apply the same format to all entries by selecting the
All button.
The Structure of the entry is based on the fields available in the
bibliographic database. The ones shown by default are:• Au – Author• Ti – Title• Ye - YearTo determine how entries are sorted, modify the Sort by options. To
sort by the sequence that entries appear in the text, choose Document
position. To sort alphanumerically, choose Content. Use Sort keys togroup similar references.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies413

Figure 349: Entries page for bibliographies

Styles, Columns and Background pages
Refer to “Styles page” on page 390 and “Columns page” on page 401.
Use of the Background page is in Chapter 4 (Formatting Pages).

Generating the bibliography
To generate the bibliography so that it appears in your document, click
OK. The Insert Index/Table dialog box closes and the bibliography
appears in your document.

Defining the paragraph style for the bibliography
You can modify the Bibliography 1 paragraph style to suit yourrequirements. For example, to number the entries in the bibliography
list, you need to define a numbering style and link that numbering styleto the Bibliography 1 paragraph style. To do this:1) On the Styles and Formatting window, click on the List Styles
icon. You can either define a new list style or modify one of those
supplied. In this example, we will modify the Numbering 1 style.
Right-click on Numbering 1 and choose Modify from the pop-up
menu.
414

Free eBook Edition

OpenOffice.org 3.x Writer Guide

2) On the Numbering Style dialog, go to the Options page. In our
example we want to have the numbers enclosed in square
brackets. To do this, type [ in the Before box and ] in the Afterbox, as shown in Figure 350.

Figure 350: Specifying square brackets before and after thenumber in a list3) Now go to the Position tab of the Numbering style dialog. In the
Spacing to text box, specify how much indentation you want forthe second and following lines of any item in the bibliography listof your document. Often you will need to experiment a bit to see
what is the best setting. In our example, we have chosen 1 cm.

Figure 351: Setting the spacing between the margin andthe text

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies

4154) Click OK to save these settings and close the Numbering Style
dialog. Return to the Styles and Formatting window, click on the
Paragraph Styles icon, choose All Styles from the list at thebottom of that window, then right-click on Bibliography 1 andchoose Modify.
5) On the Paragraph Style dialog, go to the Numbering tab andselect Numbering 1 from the drop-down list. (See Figure 326.)
Click OK to save this change to the Bibliography 1 paragraphstyle.

Figure 352: Applying a numbering style to a paragraph style
Now when you generate the bibliography, the list will look something
like the one shown in Figure 353.

Figure 353: Result of settings for Bibliography 1 paragraph style416

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Updating and editing an existing bibliography
To modify the display of bibliography entries:
1) Click anywhere in the bibliography and then right-click.
2) From the pop-up menu, choose Edit Index/Table. The Insert
Index/Table dialog box opens and you can edit and save the tableusing the five pages described in the previous section.
To update or delete the bibliography, follow the same process as
described in the sections “Updating a table of contents” and “Deletinga table of contents” on page 392.

Tools for working with bibliographies
If you find Writer’s bibliography feature too limited, try Bibus(http://bibus-biblio.sourceforge.net/wiki/index.php/Main_Page) or
Zotero (http://www.zotero.org/). Both programs are free and open
source and are reported to work well with Writer.

Free eBook Edition

Chapter 12 Tables of Contents, Indexes, and Bibliographies

417

13

Chapter
Working with Master
Documents

Free eBook Edition

Why use a master document?
Master documents are typically used for producing long documents
such as a book, a thesis, or a long report. A master document is
especially useful when graphics, spreadsheets, or other materialcauses the file size to become quite large. Master documents are also
used when different people are writing different chapters or otherparts of the full document, so you don’t need to share files. A masterdocument joins separate text documents into one larger document, andunifies the formatting, table of contents (ToC), bibliography, index, andother tables or lists.
Yes, master documents do work in OOo Writer. However, their use isfull of traps for inexperienced users. Until you become familiar withthe traps, find out whether they affect what you are doing, and learn
how to avoid (or work around) them, you may think that masterdocuments are unreliable or difficult to use. In fact, avoiding or
working around most of the traps is quite easy to do.
You can use several methods to create master documents. Eachmethod has its advantages and disadvantages. Which method you
choose depends on what you are trying to accomplish. The different
methods are described in this chapter, along with suggestions on when
to use each one.

Styles and master documents
Styles that are used in subdocuments, such as paragraph styles, areautomatically imported into the master document after you save themaster document. When you modify the style in the master document,
the style in the subdocument remains unaffected. That is, the style inthe master document takes precedence over the style in the
subdocument.

Tip

Use the same document template for the master document andits subdocuments. When you modify or create a style, add it to
the document template, and then reload the styles from thetemplate into the master document and the subdocuments.
This way the subdocuments will look the same when they areloaded into the master document as they do when viewed as
individual files.

Free eBook Edition

Chapter 13 Working with Master Documents

419

Using the Navigator
The Navigator is a very useful tool that helps you move quickly to
specific parts of your document. It also provides information about thecontent of the document and enables you to reorganize some of thecontent. For example, if each chapter in your final book is a separate
document, then in the master document they can be reordered, andthe references are renumbered automatically and the table of contents
and index can be updated.
In Writer, the Navigator has two distinct forms. One form is used inordinary text documents and the other in master documents.
In an ordinary text document, the Navigator displays lists of thegraphics, tables, index entries, hyperlinks, references, and other itemsin the document, as shown on the left hand side of Figure 354. Clickthe indicator (+ sign or triangle) by any list to display the contents of
the list. You can double-click an entry in the Navigator and jump
immediately to that place in the document.

Figure 354. The Navigator for a text document (left) and fora Master document (right)

420

Free eBook Edition

OpenOffice.org 3.x Writer GuideIn a master document, the Navigator lists the subdocuments and text
sections, as shown on the right hand side of Figure 354. The use of theNavigator in a master document is covered in more detail later in thischapter (see “Step 5. Insert the subdocuments into the masterdocument” on page 428 and “Cross-referencing between
subdocuments” on page 433).

Creating a master document
The three most common scenarios for creating a master document
depend on the current state of your document:• You have one existing document (a book) that you want to split
into several subdocuments (chapters) that will be controlled by
the master document.
• You have several existing documents (chapters) by one or moreauthors that you want to combine into one book, controlled by themaster document.
• You have no existing documents but intend to write a long bookcontaining several chapters, possibly by multiple authors.
We will look at each of these scenarios in turn.

Splitting one document into a master document andsubdocuments
When you have one existing document that you want to split into
several subdocuments that will be controlled by the master document,
you can split the document automatically.
Use this method if the original document uses only the Default pagestyle, is numbered sequentially from the first page, and uses the
Heading 1 style to identify the start of each chapter. In these
conditions, this method will work well.
Advantages: This method is quick and easy, and any existing crossreferences between chapters are preserved. Although cleanup work
may be necessary, once you have done the cleanup, the document will
behave itself.
Disadvantages: If the original document was complex, you may have
major cleanup work to do because some formatting will be lost—for
example, page styles, page breaks, restarted page numbering.

Free eBook Edition

Chapter 13 Working with Master Documents

421

How to do it: Open the document and click File > Send > Create
Master Document to split the document. You will find that each of the
subdocuments begins with a Heading 1 and the file names are all
maindocnameX.odt, where X is 1, 2, 3, and so on. If you have a Preface
or other “chapter” starting with a Heading 1 before Chapter 1, the filenames will not directly correspond to the chapter numbers.

Combining several documents into a masterdocument
This method works best when all of the documents were created fromthe same template, but you can also use it when the documents werecreated from different templates.
Use one of the techniques described in “Starting with no existing
documents” to create a blank master document and insert the otherdocuments as subdocuments of the master document.
This method is especially useful if the subdocuments are created or
maintained by multiple writers. All writers on the project can work on
their subdocuments without fear of version control issues that canoccur when multiple people work on the same document.

Starting with no existing documents
The ideal situation is to start with no existing documents, because you
can do everything the way you want from the beginning. Writer
provides three ways to create a master document:
Method 1. Quick and easy, but not recommended
Method 2. Not too complicated, but with restrictions
Method 3. Complete control
In each case, you need to have a disciplined approach to make sure themaster document works correctly and reliably. Each method below
describes the steps to take. Be sure to do the steps in the order given.

Method 1. Quick and easy, but not recommended
Writer provides a quick and easy way to create a master document, but
the master document is not associated with a template, so changes tostyles and formatting are more difficult to apply reliably.

422Free eBook Edition

OpenOffice.org 3.x Writer GuideNote

If the subdocuments were all created with the same template
and the styles were not modified in the documents, then thestyles are imported into the master document with thesubdocuments, and styles and formatting should be correct inthe master document. This method works best when these
conditions are met.

How to do it:
1) Click File > New > Master Document.
2) Use the Navigator to insert new documents or existing files into
the master document, as described in “Step 5. Insert thesubdocuments into the master document” on page 428.

Method 2. Not too complicated, but with restrictions
This technique works well if you want to use sequential page
numbering throughout the final document (not restarting at 1 at any
point), and each chapter starts with a Heading 1 on a new page.
(Books distributed in PDF or other e-book formats are often numbered
this way.) If you want to restart page numbering anywhere in the
document, use Method 3.
How to do it: Follow the instructions in “Recommended method for
creating master documents” but do not put in the text sections
between the subdocuments or try to change the page numbering.

Method 3. Complete control
This method gives you complete control over complex documents withseveral page styles or restarted page numbering. It is a bit more work
to set up, but works reliably2. This method is explained in detail in thenext section.

Recommended method for creating masterdocuments
Follow these steps, in the order given. Each step is explained in detailin the following subsections.
Step 1. Plan the project
Step 2. Create a template containing the required styles, fields, andother elements
2 However, the method does not work in some situations. See “Problem solving” onpage 439 for details.

Free eBook Edition

Chapter 13 Working with Master Documents423

Step 3. Create the master document and subdocuments from the same
template
Step 4. Insert some information directly into the master document
Step 5. Insert the subdocuments into the master document
Step 6. Add table of contents, bibliography, index

Step 1. Plan the project
Although you can make changes at most steps in this process, the more
you can plan before you start, the less work you will have to do tocorrect any problems later. Here are some things you need to plan:
Parts of book or report required. What pages will be in the masterdocument and what will be in the subdocuments? (The ToC and index
must be in the master document.)
Consider as an example a book with the parts given in the table below.
Part

Location

Title (cover) page

In master document

Copyright page

In master document

Table of contents (ToC)

In master document

Preface (Foreword)

Subdocument

Chapters 1 to 8

Subdocuments

Appendixes A, B

Subdocuments

Index

In master document

Page, paragraph, character, frame, and numbering styles. See
Chapter 6 (Introduction to Styles) and Chapter 7 (Working with Styles)
for instructions on how to create or modify styles and examples of theuse of styles in book design.
Fields and AutoText entries, as required. See other chapters in thisbook for ideas.

Step 2. Create a template containing the required
styles, fields, and other elements
You can create your template from an existing document or templatethat contains some or all of the styles you want for this document, or
you can create the template from a blank document. For more about
templates, see Chapter 10 (Working with Templates).

424

Free eBook Edition

OpenOffice.org 3.x Writer GuideIf you use an existing document or template, delete all the text from it
except for fields in headers and footers before saving it as the template
for this project. It will still have all the styles you defined, even if thetext is not there. You can change the styles in the template as yourproject develops.
Be sure to use File > Templates > Save when creating the template.

Step 3. Create the master document andsubdocuments from the same template
If you are starting a new project, create the master document and all
the subdocuments from the same template. Not using the same
template could create style inconsistencies that require time and effort
to correct. For example, if two subdocuments have a style with thesame name that is formatted differently in each document, the masterdocument will use the formatting from the first subdocument that wasadded. This could cause your document not to look like you expect.
Using the same template for all subdocuments saves time andfrustration.
It does not matter in what order you create the master andsubdocuments, and you do not have to create all the subdocuments atthe same time, when you are starting the project. You can add new
subdocuments at any time, as you need them—as long as you always
create them from the same template.

Create the master document
Follow this process to create the master document. You can use othermethods, but each method (including this one) has its drawbacks.
1) Open a new document from the template you created in Step 2,
by clicking New > Templates and Documents, then selecting
the template you created. Be sure the first page of this new
document is set to the page style you want for the first page ofthe final document; if it is not, change it. In our example, the stylefor the first page is Title page.
2) If any text or page breaks came into this document from thetemplate, delete the text. (Fields in headers and footers can stay.)3) Click File > Send > Create Master Document. Save themaster document in the folder for this project, not in thetemplates folder. We will return to this master document later. For
now, you can either leave it open or close it, as you prefer.

Free eBook Edition

Chapter 13 Working with Master Documents

425

Create subdocuments
A subdocument is no different from any other text document. It
becomes a subdocument only when it is linked into a master document
and opened from within the master document. Some settings in themaster document will override the settings in a subdocument, but only
when the document is being viewed, manipulated, or printed throughthe master document.
Create a subdocument in the same way as you create any ordinary
document:
1) Open a blank document based on the project template (veryimportant) by clicking New > Templates and Documents, thenselecting the template.
2) Delete any unwanted text, and set the first page to the page style
you specified for the first page of a chapter.
3) Click File > Save As. Give the document a suitable name andsave it in the folder for this project.
If you already have some of the chapters written, the files are probably
not based on the template you just created for this project. You willneed to change the template attached to the existing files. You can dothis manually, or by using the Template Changer extension to OOo;
both methods are described in Chapter 10 (Working with Templates).

Step 4. Insert some information directly into themaster document
The instructions in steps 4 and 5 are for a book that uses page
numbering requirements that are typical of printed books:• No page numbers on cover page or copyright page
• Lower-case roman numerals in the front matter, starting with 1• Arabic numerals in the body of the document, starting with 1

If your book has different requirements, change these instructions tosuit. See “Problem solving” on page 439 for one example.
These instructions are fairly tedious, but once you have the masterdocument set up, you should not have to change it, and with a bit ofpractice setting it up goes quickly.
1) Open the master document and do the following:•
Make sure paragraph marks are showing (you can set them inTools > Options > OpenOffice.org Writer > Formatting
Aids, or click the Nonprinting characters icon ).

426

Free eBook Edition

OpenOffice.org 3.x Writer Guide•Show text boundaries, table boundaries, and section
boundaries (Tools > Options > OpenOffice.org >Appearance).

2) Type the contents of the title page (or leave placeholders and fillin later). With the insertion point in the last blank paragraph on
the page, click Insert > Manual Break. On the Insert Breakdialog box, select Page break and the page style for the second
page (Copyright page in our example), and leave the Change
page number checkbox deselected. Click OK.

Figure 355: Inserting a page break between
the title page and the copyright page3) Type the contents of the copyright page (or leave placeholders).
Insert another manual page break, this time setting the page style
to Front matter first page. Select the Change page number
checkbox and choose 1 in the box below that, as shown in Figure356. This number 1 will show in your document as i, because thepage style is defined to use Roman numerals.
4) Let’s assume the third page is for the Table of Contents. Leave a
blank paragraph or two on this page and insert another page
break, with the next page again set to the Front matter first pagestyle, which we want to use for the first page of the Preface.
Because we want the page numbering for the Preface to continue
from the page numbers of the Table of Contents, do not select the
Change page number checkbox this time. Notice that the
Navigator shows one item, labeled Text.

Free eBook Edition

Chapter 13 Working with Master Documents427

Figure 356: Inserting a page break before
the first page of the front matter

Step 5. Insert the subdocuments into the masterdocument
At last we are ready to add the subdocuments.

Tip

Subdocuments are inserted into a master document before theitem highlighted in the Navigator. If you insert the last
subdocument first, and then insert the other subdocuments
before the last one, they will end up in the correct sequence
without the necessity of moving them up or down in the list.

1) Display the Navigator (click View > Navigator, or press F5, or
click the Navigator icon.
2) On the Navigator, select Text, then long-click on the Insert icon
and click File. (See Figure 357).

Figure 357: Inserting a subdocument into amaster document using the Navigator
A standard File Open dialog box appears. Select the required file(which you created in Step 3) and click OK. This example uses six
chapters and a preface; we will load Chapter 6 first, as suggested
in the Tip above.

428

Free eBook Edition

OpenOffice.org 3.x Writer Guide

The inserted file is listed in the Navigator before the Text item, as
shown in Figure 358.

Figure 358: Navigator after inserting
one subdocument
3) Because the Text section contains the title page and othermaterial you have already inserted, highlight it and click theMove Up icon to move it to the top of the list.
4) Highlight the subdocument you just inserted (Chapter 6), thenlong-click on the Insert icon and click File to insert the first
subdocument; in this example, Preface. Chapter 6 remains
highlighted. Repeat with Chapter 1, Chapter 2, and so on until all
the subdocuments have been added to the list. The Navigator will
now look something like Figure 359. Save the master document
again.

Figure 359. The Navigator showing aseries of files in a master document
5) Do this step only if you want to restart page numbering forthe first chapter only. Now highlight each chapter in turn andinsert a Text section before it. When you are done, the Navigatorshould look like Figure 360.

Free eBook Edition

Chapter 13 Working with Master Documents429

Figure 360. The Navigator showing aseries of files and text sections

Tip

You can define your Heading 1 paragraph style to start on a
new page, and thus avoid inserting manual page breaks
between chapters, but this causes a page numbering problem
if you want to restart page numbering at the beginning ofChapter 1.
To restart page numbering, you must insert a manual page
break; but because the Heading 1 style on the first page ofChapter 1 forces yet another page break, you end up with one
or more unwanted blank pages before the first page of Chapter
1. The technique described in this chapter avoids this problem.

6) Check whether the first page of the master document has thecorrect page style. If not, change it to the correct style (Title pagein this example).
Scroll to the place where the first subdocument begins. Check
whether its page style is correct, and change it if necessary(Front matter first page in this example).
The first subdocument (Figure 361) has a blank paragraph at the
top of the page; this was inserted as part of the manual page
break. Set this paragraph to the PageBreak style you created in
Step 2.

430

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Paragraph marker

Section marker

Protected section
containing
subdocument

Figure 361: Page break before subdocument, which is in a
protected section7) Notice that the document is in a protected section. That means
you cannot change any of the contents of this subdocument fromwithin the master document. If you remove the section, thecontents become part of the master document itself; they are nolonger in a subdocument. If you make changes in either the
master document or the subdocument, those changes are notmade in the other document. For more about sections, refer to theonline help or to Chapter 4 (Formatting Pages).
Scroll down until you find the beginning of Chapter 1. You willfind that it is on the same page as the end of the Preface, andthere is a blank paragraph in the text area between the two
sections (the Preface and Chapter 1), as shown in Figure 362.
Click on this blank paragraph and insert a page break, specifying
the First Page style and the page number to start at 1. Click OK.

Section marker at endof previous section
Text area in master document, between sections
Section marker atstart of next section

Figure 362: A text area between two sections of a masterdocument
8) Scroll to the first page of Chapter 2. You’ll find that it is on thesame page as the end of Chapter 1, and there is a blankparagraph in the text area between the two chapters.

Free eBook Edition

Chapter 13 Working with Master Documents

431

Click on this blank paragraph and insert a page break, specifying
the First Page style, but do not select the Change page number
checkbox.
Repeat for all of the chapters, so that each chapter starts on a
new first page.
9) Save the master document again.

Step 6. Add table of contents, bibliography, index
You can generate a table of contents, bibliography, or index for thebook, using the master document. You must insert these items into atext section in the master document. For more about these document
elements, see Chapter 12 (Creating Tables of Contents, Indexes, andBibliographies).
Put the insertion point on the page in the first text section where thetable of contents is to go and create the table of contents.
If you do not have a Text section at the end of the master document,
insert one before the last subdocument, then move it down so it is after
the last subdocument. Now, if you have included bibliographic entries
in your subdocuments, you can put the insertion point on the page inthis last text section where the bibliography is to go and create thebibliography.
If you have included index entries in your subdocuments, put theinsertion point on the page in the last text section where the index is togo and create the index.

Editing a master document
After creating a master document, you may want to change its
appearance or contents.

Changing the appearance of the document
You can change the styles in the template as your project develops. Do
not make changes to styles in the master document or in any of the
subdocuments—make those changes in the template.
To update the master document (and all of the subdocuments) withchanges to the template, just open the master document. You will get
two messages: first, to ask if you want to update all links; and second,
if you want to apply the changed styles. Answer Yes to both of thesemessages.
432Free eBook Edition

OpenOffice.org 3.x Writer Guide

Editing subdocuments
You cannot save edits made to a subdocument from within the masterdocument. Instead, you must open the subdocument, either by doubleclicking on it in the master document’s Navigator, or by opening itfrom outside the master document. Then you can edit it just as you
would edit any other document. Just one rule: if you make any changes
to the styles while editing a subdocument, you must copy thosechanged styles to the template so they are available to all of the
subdocuments and to the master document.
If you change the contents of any subdocument, you need to manually
update the table of contents, bibliography, and index from within themaster document.

Cross-referencing between subdocuments
The methods described earlier in this chapter are all most writers willneed when using master documents. However, you might want toinclude automatically updated cross-references between
subdocuments. This section describes how to do this.
The process to create cross-references between subdocuments istedious, but it works.

Preparing items as targets for cross-referencing
Before you can insert a cross-reference to anything that is not
automatically shown on the References tab, such as a heading, youmust prepare or “set” that heading as an item to be referenced. To dothis, you can either use bookmarks or set references.
When you set references, be sure to select the entire text you want touse as the reference, such as a heading or figure number. Keep a list ofwhat you have named the reference fields, and be sure every name isunique. One way to keep track of this information is by putting it in a
separate text file or a spreadsheet.
The field names are case-sensitive. You can check the field name byholding the cursor over the referenced item. In our example (Figure363), the heading has the field name word count.

Free eBook Edition

Figure 363: Finding the field name for a heading
Chapter 13 Working with Master Documents

433

Using bookmarks
Bookmarks are listed in the Navigator and can be accessed directlyfrom there with a single mouse click. In HTML documents, bookmarks
are converted to anchors that you can jump to via hyperlink.
1) Select the text you want to bookmark. Click Insert > Bookmark.
2) On the Insert Bookmark dialog box (Figure 364), the larger box
lists any previously defined bookmarks. Type a name for thisbookmark in the top box. Click OK.

Figure 364: Inserting a bookmark

Setting references
1) Click Insert > Cross-reference.
2) On the Cross-references tab of the Fields dialog box, click Set
Reference in the Type list. The Selection list shows any
references that have been defined.
You can leave this page open while you set many headings asreferences.
3) Click in the document and highlight the text of the first heading
to be used as a target for a cross-reference. Click on the Fields
dialog box. The text of the heading will appear in the Value box in
the lower right of the dialog box. In the Name box, type some text
by which you can identify this heading.
4) Click Insert. The text you typed in the Name box now appears in
the Selection list.
5) Repeat steps 3 and 4 as often as required.

434

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 365: Setting text to be used as a target for a cross-reference

Inserting the cross-references
1) Open the master document. In the Navigator (Figure 366), selecta subdocument and click the Edit icon (or right-click and choose
Edit from the pop-up menu). The subdocument opens for editing.

Figure 366: Selecting a subdocument in the Navigator2) In the subdocument, place the cursor where you want the crossreference to appear. Click Insert > Cross Reference.

Free eBook Edition

Chapter 13 Working with Master Documents

435

3) In the Fields dialog box, on the References page, select Insert
Reference in the Type list on the left hand side (Figure 367). The
Selection list in the middle column shows only the reference fieldnames for the subdocument you are using, so ignore that list andcheck the list you created manually in step 1.

Figure 367. Fields dialog box showing manual entry of field
name4) In the Name field in the lower right hand column, type the nameof the reference you set in the subdocument you are referring to.
In our example, the reference is in Chapter 3, and its name isword count.
5) Click Insert, type any text you want to appear between thereference and page number (such as “on page”), and then insert
another reference with the Page format. Nothing will appear in
the subdocument except tiny gray bars indicating the fields. If you
hover the mouse pointer over one of these fields, you should see
the field name (Figure 368).

Figure 368: Viewing the field name436Free eBook Edition

OpenOffice.org 3.x Writer Guide

(You can turn on the display of field codes by clicking View >Field Names. The two fields shown as gray lines in Figure 368
now look like Figure 369.)

Figure 369. Displaying field codes
6) After you have inserted all the cross-references required in the
subdocument, save and close it and return to the masterdocument window.
Within the master document, navigate to the page of the
subdocument on which you inserted the cross-reference field. You
should now see the text of the cross-reference appear in the spot
where you inserted it (Figure 370), because within the masterdocument, the subdocument can find the target of that fieldreference.

Figure 370. Field contents visible
This technique also works if you open a subdocument directly in step 2(that is, not from within the master document) and insert a crossreference field.

Creating one file from a master document
and its subdocuments
Master documents are .odm files containing linked subdocuments,
which are in .odt format. Although linked files are very useful whenwriting and editing a large document such as a book, sometimes you
might need to have a copy of the entire book in one file.
To export a master document to a .odt file (without affecting theoriginal .odm file), do this:1) Open the master document. Choose File > Export from the menubar.

Free eBook Edition

Chapter 13 Working with Master Documents

437

2) On the Export dialog (Figure 371), type a name for theexported .odt file and choose OpenDocument Text (.odt) fromthe File format list. Click Export. This step changes the .odm file
into a .odt file, with each subdocument in a separate section.

Figure 371: Exporting a master document to an
OpenDocument Text (.odt) file3) Close the master document and open the new .odt file, updating
all links.
4) Choose Edit > Links from the menu bar.

Tip

If the Links command is greyed-out, the cursor is probably ina write-protected part of the document (for example, in one of
the linked documents). Move the cursor into a part of the
document that is not write-protected; the Links command thenbecomes available.

5) The Edit Links dialog (Figure 372) shows all the linked files.
Select all the files in the Source file list and click Break Link.
This step embeds (includes) the contents of all the subdocuments
into one single file (but with each subdocument remaining in a
separate section) and removes the write protection on thesections.

Figure 372: Breaking links to include files in one document

438

Free eBook Edition

OpenOffice.org 3.x Writer Guide

6) After breaking the links, you may wish to also remove some or allof the sections. To do that, go to Format > Sections, select thesections you wish to remove, and click Remove. The contents of
those sections remain in the document; only the section markers
are removed.

Tip

The Help does not mention steps 4 and 5 above, giving only
the step for removing the sections. If you have no hidden
sections, that technique works fine and is faster; however, if
you want to break the links but retain some or all of thesections (particularly hidden sections), then the method
described in this chapter is safer.

Problem solving
Some combinations of choices do not work together, and sometechniques that affect master documents are not at all obvious. Thissection describes some problems and what to do about them.

Including a chapter reference in the header of thefirst pageThe problem
If you use the method described in “Step 5. Insert the subdocuments
into the master document” beginning on page 428 (putting a page
break paragraph into the master document between the
subdocuments), and you put a cross-reference to the chapter nameand number in the header of the first page of each chapter, then the
cross-reference field on the first page will pick up the chapter nameand number from the previous chapter. This happens because with thismethod the first (blank) paragraph on those pages is actually the lastparagraph of the previous chapter. The example did not include across-reference to the chapter name and number in the header of thefirst page, so it did not have this problem.
First page footers do not have this problem; they correctly pick up thecurrent chapter’s name and number.
The solution
The cure for this problem is as follows:
1) Use File > Templates > Edit to open the template used for the
master document and its subdocuments.

Free eBook Edition

Chapter 13 Working with Master Documents

439

2) Modify the style for the chapter title (usually Heading 1) to enablea page break before, using the page style you want for the firstpage of each chapter. Save and close the template.
3) When you reopen the master document, it should ask twoquestions: “Update all links?” and “Your styles don’t match thetemplate. Do you want to update your files?” Be sure to answer
Yes to both questions.
4) Modify the chapter title style (Heading 1) in the master document
file as you did in the template file in step 2. Save the masterdocument.
5) Open the Navigator in Master Document view and delete the Text
sections between the chapters. Update all links.
The headers on the first page of each chapter will now display thecorrect chapter name and number.
The problem with the solution—and a workaround
This solution creates another problem, if you want to restart page
numbering at 1 on the first page of the first chapter and have pages
numbered sequentially through all the chapters.
Normally you would restart numbering by specifying the starting page
number when you modify the Heading 1 style to start on a new page.
However, if you do that, then each chapter restarts page numbering at
1. (Sometimes this is what you want, but often it is not.)In this case, you will have to include an “offset” in the page number
field—that is, you tell OOoWriter how many pages to subtract to makethe first page of the first chapter to be page number 1. Of course, tomake this work, you need to know how many pages are in the front
matter, and you may not know that until after you have finished theentire book. If you add or delete some pages (for example, if the tableof contents grows from 4 pages to 5), you will need to adjust the offset
accordingly. Therefore, this adjustment is best made at the end of the
project.
Here is how to do it.
1) In the master document itself—not in the subdocument—place thecursor just in front of the Page field on the first page of the firstchapter. Right-click and choose Fields from the pop-up menu.
2) In the Edit Fields dialog box (Figure 373), type a negative evennumber (–2, –4, etc.) in the Offset box. Click OK to save thischange.

440

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 373. Using an offset to start at a different page number
3) You might need to make the same change on the second page ofthe first chapter.

Including landscape pages in a portrait-oriented
master document
The problem
Master documents ignore manual page breaks in subdocuments if themanual break specifies the following page style. Landscape pages areinserted into portrait-oriented documents by inserting a manual pageand specifying a landscape page style (and then changing back toportrait orientation by inserting another manual break and specifying
the following page style). This technique works fine until the document
becomes a subdocument within a master document. At that point thelandscape pages become portrait pages and the page break itself isignored.
The solution
1) Remove the landscape pages from the subdocument and put themin a separate document. Note that if the landscape pages are in
the middle of the original subdocument, you will end up with atleast three documents: (a) the portion of the subdocument before
the landscape pages, (b) the landscape pages themselves, and (c)the portion of the subdocument after the landscape pages.
2) Insert documents (a), (b), and (c) individually into the masterdocument.

Free eBook Edition

Chapter 13 Working with Master Documents

441

3) Using the method described on page 428 to include a manual
page break in a text section before and after the landscapedocument.
If you want portrait headers and footers on the landscape pages, use
the technique described in Chapter 4 (Formatting Pages).

Anchoring pictures to a pageThe problem
A picture (graphic) anchored “to page” in a subdocument is not
displayed in the master document although it always appears correctlyin the subdocument.
Because the master document reorganizes the page flow, page
numbers, and cross-references when it collates all the subdocuments
together, the absolute reference to a page X in a subdocument is lost in
the master document. The picture loses its anchor reference andsimply disappears.
The solution
To avoid this problem but keep pictures positioned precisely on aparticular page, anchor the pictures as follows:
1) Right-click on the picture and choose Picture from the pop-up
menu.
2) On the Type tab of the Picture dialog box (Figure 374), set theanchor to To character or To paragraph.
3) Under Position, choose suitable horizontal and vertical references
to the page.

Restarting list numbering when using custom styles
The problem
When custom numbering styles are used for lists, the first item in thefirst list in a file may continue numbering from the last list in theprevious chapter.
The solution
You need to explicitly set the first list item to restart numbering at 1.
However, if you right-click on the paragraph and choose Restart
numbering, the setting is not saved when the file is saved. (This works
for other lists in a document, but not the first.)

442

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 374. Anchoring a graphic and setting its position on a page
Here is the secret:1) Right-click on the first list item in the first list in the document
and choose Paragraph, not Restart Numbering.
2) On the Paragraph dialog, go to the Outline & Numbering tab.
3) Under Numbering, choose Restart at this paragraph and 1 forStart with. Click OK to save.
Note: If you do not explicitly choose 1 for Start with, the setting is
not retained.
Unfortunately there seems to be no way to build it into a paragraphstyle.

Free eBook Edition

Chapter 13 Working with Master Documents

443

14

Chapter
Working with Fields

Free eBook Edition

Introduction to fields
Fields are extremely useful features of Writer. They are used for avariety of purposes; for example, data that changes (such as thecurrent date or the total number of pages) or might change (the nameof a product or book under development), user-defined numbering
sequences, automatic cross-references, and conditional content (words
or paragraphs that are visible or printed in some conditions but notothers). Index entries are also fields.
This chapter describes some common uses of fields. A full discussion offields and their use is beyond the scope of this book. Power users canfind more details in the application Help.

Tip

Fields have a gray background when viewed on screen, unless
you have deselected the Field shadings option or changed thecolor of field shadings on the Appearance page of the Options –OpenOffice.org dialog box. This gray background does notshow when you print the file to hard copy or PDF.
To turn field shadings on or off quickly, choose View > Field
Shadings or press Control+F8.

Quick and easy field entry
You can quickly insert common fields into your document by choosing
Insert > Fields from the menu bar and selecting the required fieldfrom the list, as shown in Figure 375.

Figure 375: Inserting common fields

Free eBook Edition

Chapter 14 Working with Fields

445

Using document properties to holdinformation that changes
Use the Properties dialog box for any document to enter informationthat you might want to reference in your document. This is particularly
useful if it is information that might change during the course of the
project. Choose File > Properties and enter the desired data in the
Description page and the Custom Properties page.
Later in this chapter, we will see how to use this information in fields.
You can return to this dialog box at any time and change theinformation you entered. When you do so, all of the references to that
information will change wherever they appear in the document. For
example, on the Description page (Figure 376) you might need tochange the contents of the Title field from the draft title to the
production title.

Figure 376: The Description page of the document’s
Properties dialog box
The Custom Properties page (Figure 377) is particularly useful in atemplate, where the field names can serve as reminders of informationthat writers need to include, which will then be used within the
document itself. This page can be customized in several ways:• You can change the default names of the fields to moremeaningful names. If the choices in the drop-down list in theName column do not meet your needs, you can type a new nameinto the box. The example in Figure 377 shows that three of thedefaults have been changed: Info 1 to Chapter subtitle, Info 2 toChapter number, and Info 3 to Name of Guide.
• In the Type column, you can choose from text, number, date, or
yes/no for each field.
446

Free eBook Edition

OpenOffice.org 3.x Writer Guide• In the Value column, type what you want to appear in the

document where this field is used.
• If you need more than four custom properties, click the Add
button.

Figure 377: The Custom Properties page of the document’s
Properties dialog box

Using other fields to hold information thatchanges
One way that people use fields is to hold information that is likely tochange during the course of a project. For example, the name of amanager, a product, or even your entire company may change justbefore the document is due to be printed. If you have inserted thechangeable information as fields, you can change the information in
one place, and it will automatically change in all the places where thatfield occurs.
Writer provides several places where you can store the informationreferred to by a field. We will look at some of them here.
Seven document properties (Date, Time, Page Number, Page Count,
Subject, Title, and Author) are on the Insert > Fields menu (Figure375). To insert one of these fields, click on it in the menu.
Other document properties are on the DocInformation and Document
pages of the Fields dialog box (Figure 378 and Figure 379), reached byFree eBook Edition

Chapter 14 Working with Fields

447

choosing Insert > Fields > Other or pressing Ctrl+F2. Notice theCustom item in the Type list; this is derived from the Custom
Properties page of the Document Properties dialog box.
To insert one of these fields, select it in the Type list and then selectfrom the Select and Format lists if choices appear. Finally, click Insert.

Figure 378: Inserting a Date Modified field using theDocInformation page of the Fields dialog box

Figure 379: Inserting a File name field using theDocument page of the Fields dialog box

448

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Some of these items are picked up from the User Data page of the
Options dialog box (covered in Chapter 2, Setting up Writer), so makesure the information on that page is correct.

Tip

Although these fields are often used to hold information thatchanges, you can make the content unchangeable by selecting
the Fixed content option (visible in Figure 378, lower right)
when inserting the field. If necessary, you can come back tothis dialog box later and deselect this option to make the field
variable again.

Using AutoText to insert often-used fields
If you use the same fields often, you will want a quick and easy way toinsert them. Use AutoText for this purpose. To define an AutoText entry
for a field:
1) Insert a field into your document, as described previously.
2) Select the field, and then choose Edit > AutoText (or press
Ctrl+F3).
3) On the AutoText dialog box, choose the group where this new
entry will be stored (in this example, it is going into My AutoText),
type a name for the entry, and change the suggested shortcut if
you wish.
4) Click the AutoText button and click New to have the entry
inserted as a field. Do not choose New (text only) because the
AutoText entry will be plain text, not a field. (The selection New
does not appear until you have selected a group and typed a namefor the entry.) Click Close to close the AutoText dialog box.

Free eBook Edition

Figure 380: Creating a new AutoText entry
Chapter 14 Working with Fields

449

Now whenever you want to insert this field at the cursor position, typethe shortcut, and then press F3.

Defining your own numbering sequences
You may want to define your own numbering sequences, for example touse in situations where you do not always want the number at the startof the paragraph or where you want more control than the built-in
numbering choices give you.
This topic describes how to create and use a numbering sequence,using a “number range variable” field.

Create a number range variable
To create a number range variable using Arabic (1, 2, 3) numbers:
1) Place the insertion point in a blank paragraph in your document.
2) Choose Insert > Fields > Other and select the Variables page.

Figure 381: Defining a number range variable
3) In the Type list, select Number range. In the Format list, selectArabic (1 2 3). Type whatever you want in the Name field. (Wehave used Step in this example.)
450

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4) Click Insert. The name of the variable (Step) now appears in the
Selection list, and a number field (showing 1) appears at theinsertion point in your document. The Fields dialog box remains
open, so you may need to move it out of the way to see the field in
the document.
5) Hover the mouse pointer over this number field and you will see
the field code of Step = Step+1. If you click several more times
on the Insert button in the Fields dialog box, the numbers 2, 3,
4, and so on will appear in the document.
Now you may want to restart the Step sequence at 1, so you can use
the same sequence name more than once in your document (forexample, to begin each set of instructions). To do that, you need toinsert a new field of the same name, while instructing OOo to force thevalue to 1.
1) Open the Fields dialog box to the Variables page. Make sure thevariable name Step appears in the Name box.
2) In the Value box, type Step=1, as shown in Figure 382. Click
Insert.
Now hover the mouse pointer over the new field in your document andyou will see the field code of Step = Step=1. To continue with thenormal sequence (that is, to have the next item be step 2), you need todelete the contents of the Value box after inserting Step 1.

Figure 382: Defining a field to restart a number range variable

Free eBook Edition

Chapter 14 Working with Fields

451

Use AutoText to insert a number range field
You certainly do not want to go through all of that every time you wantto put in a step number. Instead, create two AutoText entries, one for
the Step = Step=1 field (call it Step1, for example) and one for the
Step = Step+1 field (StepNext). Then insert the fields in the same way
you would insert any other AutoText. See “Using AutoText to insert
often-used fields” on page 449.
You can create similar fields for substeps or other sequences that you
want to be numbered with letters (a, b, c), Roman numerals (i, ii, iii), or
some other sequence. In the Fields dialog box, choose the required
format in the Format list when creating the field codes.

Tip

If a user-defined variable is not in use in the document, theicon next to the Value box is active. You can delete the variableby clicking this icon. To remove a variable that is used in thecurrent document, first delete from the document all fields
using that variable (or convert them all to text, as described on
page 460), and then remove the variable from the list.

Using automatic cross-references
If you type in cross-references to other parts of the document, thosereferences can easily get out of date if you reword a heading, add or
remove figures, or reorganize topics. Replace any typed crossreferences with automatic ones and, when you update fields, all thereferences will update automatically to show the current wording or
page numbers.

Tip

Some people use Writer’s Hyperlink feature for crossreferences, but it has the major disadvantage that the visible
text of the hyperlink does not change if you change the text of
the item to which it links. For that reason, you are advised touse cross-references in most situations.
The exception is when you are creating a document to be
saved as HTML; cross-references do not become hyperlinks in
an HTML document.

The Cross-references page of the Fields dialog box (Figure 383) lists
some items, such as headings, numbered paragraphs, and bookmarks.
If figure captions, table captions, user-defined number range variables,and some other items have been defined in a document, that type also
appears in the list.
452

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 383: The Cross-references page of the Fields dialog box

Inserting cross-references
To insert a cross-reference to a heading, figure, or other item shown on
the Cross-references page:1) In your document, place the cursor where you want the crossreference to appear.
2) If the Fields dialog box is not open, choose Insert > Cross
Reference. On the Cross-references page (Figure 383), in theType list, click the type of item you are referencing (for example,
Heading or Figure).
3) You can leave this page open while you insert many crossreferences.
4) Click on the required item in the Selection list, which shows bothautomatically created entries (for example Headings) as well as
user-defined references (for example bookmarks).
5) In the Insert reference to list, choose the type of reference
required. The choices vary with the item being referenced.
For headings, usually you will choose Reference (to insert thefull text of the heading) or Page (to insert the number of the page
the heading is on).
For figures, you will usually choose Category and Number (toinsert the word “Figure” and its number), Reference (to insert
the word “Figure” with its number and the full text of theFree eBook Edition

Chapter 14 Working with Fields

453

caption), Page (to insert the number of the page the figure is on),or Numbering (to insert only the figure number).
6) Click Insert.
For a full list of the reference formats available, and their use, consult
the application Help.

Available formats
For all the types of reference, you can select one of the following
formats:• Page: the page number of the target• Chapter: the number of the chapter where the referenced target
is located.
• Reference: the full text set as reference.
• Above/Below: Inserts the words above or below depending on theposition of the field relative to the referenced target.
• As Page Style: similar to Page, this inserts the page number
where the reference is, but using the formatting specified in thepage style. This is very useful when putting a reference to a pagein the front matter where roman numerals are usually employed.
If you select Headings or Numbered Paragraphs as type, the following
two additional options become available:• Number (no context): inserts only the number of the heading or of
the numbered paragraph. For example, if referencing a numbered
item 2.4, it inserts 4.
• Number (full context): inserts the the full number including
higher hierarchical levels. For example, if referencing a
numbered item 2.4, the full numbering (2.4) is inserted.
Finally, for objects inserted with captions such as a table or a figure,you can choose:• Category and Number: inserts both the category and number ofthe referenced object (for example, Figure 6). This is generally
the most used formatting for figures and tables.
• Caption Text: inserts the full caption of the referenced object. For
example, Figure 6: This is an example figure.
• Numbering: inserts the sequential number of the referenced
object, without the category (for example, if referencing Table 2,
the field will contain only the number 2).

454

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Preparing items as targets for cross-referencing
Occasionally you might want to insert a cross-reference to somethingthat is not automatically shown on the Cross-references page. Before
you can insert a cross-reference to such an item, you must prepare theitem as a target to be referenced. To do this, you can either use
bookmarks or set references.
After a target has been defined, you can cross-reference to it as
described on page 453.
For an example of the use of this technique, see “Solving the pagecount problem” in Chapter 4 (Formatting Pages).

Using bookmarks
Bookmarks are listed in the Navigator and can be accessed directlyfrom there with a single mouse click. In HTML documents, bookmarks
are converted to anchors that you can jump to using a hyperlink.
1) Select the text you want to bookmark. Choose Insert >Bookmark.
2) On the Insert Bookmark dialog box, the larger box lists any
previously defined bookmarks. Type a name for this bookmark in
the top box. Click OK.

Figure 384: Inserting a bookmark

Setting references
1) Choose Insert > Cross reference.
2) On the Cross-references page of the Fields dialog box (Figure385), select Set Reference in the Type list. The Selection listshows any references that have been defined.
You can leave this page open while you set many items as
references.

Free eBook Edition

Chapter 14 Working with Fields

4553) Click in the document and highlight the text of the first item to
set as a target for a cross-reference. Click on the Fields dialog
box. The text of the item will appear in the Value box in the lower
right. In the Name box, type some text by which you can identify
this item.
4) Click Insert. The text you typed in the Name box now appears in
the Selection list.
5) Repeat steps 3 and 4 as often as required.

Figure 385: Setting text to be used as a target for a crossreference

Using fields in headers and footers
You can insert fields into headers or footers, using techniques
described earlier in this chapter:• To insert a page number, document title, author, creation date
and time, current date and time, or total page count field, use
document properties (see page 446) or the Insert > Fields menu
entry.
• You can insert a cross-reference to a bookmark, heading, or otheritem.
• If you have used Heading 1 for your chapter titles, you can use adocument field to insert the current chapter title, so the header orfooter contents change from one chapter to the next. See Figure456

Free eBook Edition

OpenOffice.org 3.x Writer Guide386. (Writer calls chapter titles Chapter names.) If you have used
outline numbering on your Heading 1, you can choose whether toinclude these numbers in the field (Chapter number and name).

Figure 386: Inserting the current chapter name andnumber into your document• You can insert cross-references to other heading levels by

specifying a value in the Level box in the lower right of theDocument page of the Fields dialog box (Figure 386). That is,Level 1 = Heading 1, Level 2 = Heading 2, and so on.
Note

A cross-reference field in the header of a page picks up the firstheading of that level on the page, and a field in the footer picks
up the last heading of that level.

• To include the chapter number with the page number, position the

cursor just before the Page field you inserted. Choose Insert >Fields > Other. On the Document page of the Fields dialog box,
select Chapter in the Type column and Chapter number
without separator in the Format column. Click Insert.
Go to the header or footer where you inserted this field, type thecharacter you want to appear between the chapter number andthe page number—for example, a period or a dash.
The table of contents will not automatically pick up these chapter
numbers, so you will need to make a change on the Indexes andTables menu item, as described in Chapter 12 (Creating Tables ofContents, Indexes, and Bibliographies).

Free eBook Edition

Chapter 14 Working with Fields

457

• You can add a page count to the footer—for example “Page 9 of12”. Type the word “Page” and a space in front of the Page field.
Type a space, the word “of”, and a space after the Page field.
Then choose Insert > Fields > Page Count.

Using fields instead of outline numbering
for appendix numbering
Chapter 6 (Introduction to Styles) describes how to use paragraphstyles to define a hierarchy of headings to be included in a table ofcontents.
This method has one major limitation: only one paragraph style can beselected for each heading level, and only one numbering sequence canbe specified in Tools > Outline Numbering. However, many books
contain Appendixes (typically designated A, B, C) in addition to thechapters (typically designated 1, 2, 3).
To solve this problem, you can use one paragraph style (Heading 1) for
both chapter and appendix names, and define two number range fields
for the chapters and appendixes respectively. The number range field
for chapters will use numbers, and the number range field forappendixes will use letters. You can then use the same field in theheader or footer of chapters and appendixes.
1) Define the first number range variable, as described in “Defining
your own numbering sequences” on page 450. To insert the field
into your Heading 1, type Chapter<space>. Choose Insert >Fields > Other. On the Variables page, select Number range,
Chapter, Arabic (1 2 3). Click Insert. You will need to do thismanually for each Heading 1 that is to be a chapter title.
2) Define and insert a second number range variable for the
appendixes, using Number range, Appendix, A B C), as shownin Figure 387. Type Appendix<space> and then insert thevariable. Do this for each Heading 1 that is to be an appendix
title.
3) When you create the table of contents, the chapters andappendixes will be designated correctly.

458

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 387: Defining a number range variable for Appendixes

Tricks for working with fields
Keyboard shortcuts for fields
Here are some handy keyboard shortcuts to use when working withfields:Ctrl+F2
Ctrl+F8
Ctrl+F9F9Open the Fields dialog box.
Turn field shadings on or off.
Show or hide field names.
Update fields.

Fixing the contents of fields
You can specify Fixed content for many items on the Document and
DocInformation pages so the field contents do not update. For
example, you might use a field to insert the creation date of adocument, and you would not want that date to change. In anotherplace you might use a date field to show the current date, which you dowant to change; in that case, deselect Fixed content when you insert
the field.

Free eBook Edition

Chapter 14 Working with Fields

459

Converting fields into text
Writer does not provide any easy way to convert field contents into
text. To do this, you need to copy the field contents and paste themback as unformatted text. This is not a very good solution if you havehundreds of fields that you want to change, but you could use a macro
to automate the process.

Developing conditional content
Conditional content is text and graphics that are included or excluded
depending on a condition you specify.
A simple example is a reminder letter for an overdue account. The firstand second reminders might have a subject line of “Reminder Notice ”,
but the third reminder letter might have the subject “Final Notice ” anda different final paragraph.
A more complex example is a software manual for a product thatcomes in two versions, Pro and Lite. Both product versions have muchin common, but the Pro version includes some features that are not in
the Lite version. If you use conditional content, you can maintain one
file containing information for both versions and print (or create onlinehelp) customized for each version. You do not have to maintain two
sets of the information that is the same for both versions, so you will
not forget to update both versions when something changes.

Choose the types of conditional content to use
This section describes several Writer features that can help you design
and maintain conditional content. You can use one or any combinationof these features in the same document.

Conditional text
With conditional text, you can have two alternative texts (a word,phrase, or sentence). One text will be displayed and printed if thecondition you specify is met, and the other will be displayed andprinted if the condition is not met. You cannot include graphics or edit
the text except in the field dialog (not in the body of the document).
You also cannot format part of the text (for example, bolding one word
but not the others), but you can format the field to affect all of the fieldcontents (for example, bolding all of the words). You cannot include across-reference or other field in the text.

460

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Hidden text
With hidden text (a word, phrase, or sentence), you have only two
choices: show or hide. If the condition you specify is met, the text is
hidden; if the condition is not met, the text is displayed. The
disadvantages are the same as for conditional text: you cannot include
graphics, edit the text in the body of the document, format part of thetext, or include a field.

Hidden paragraphs
Hidden paragraphs are like any other paragraphs, but you can specify
a condition under which the paragraph is not displayed or printed. A
blank paragraph can also be hidden—for example, if a database field
has no content for the current record. This is very useful whenmerging an address into a letter: if you allow two lines for the street
address and the database record uses only one line, you can preventthe blank line from appearing in your document. You can include
graphics, edit the text in the body of the document, format any part of
the text, and include fields.

Hidden sections
Hidden sections are like hidden paragraphs, but they can include morethan one paragraph—for example, a heading plus one or moreparagraphs. However, a section cannot contain less than a paragraph,so you cannot use this method for single words or phrases. The
contents of a hidden section behave just like the contents of any otherpart of the document, but you can specify a condition under which thesection is not displayed or printed. In addition, you can password
protect a section.

Plan your conditional content
Conditions are what programmers call logical expressions. You must
formulate a logical expression for each condition because a condition isalways either true (met) or false (not met). You can use the same
condition in many places in your document, for different types ofconditional content.
To make conditional content work, you need to:1) Choose or define a variable.
2) Define a logical expression (condition) involving the selectedvariable.

Free eBook Edition

Chapter 14 Working with Fields

461

Choose or define a variable
You can use the following variables in your condition:• User-defined variables• Predefined OpenOffice.org variables, which use statistical values
from the document properties• User data
• Database field contents—for example from your address book
You cannot use internal variables (for example, page number or
chapter name) to formulate conditions.
The examples in this chapter use user-defined variables.

Define a logical expression (condition) involving theselected variable
The condition compares a specified fixed value with the contents of avariable or database field.
To formulate a condition, use the same elements as you would tocreate a formula: operators, mathematical and statistical functions,
number formats, variables, and constants. The possible operators are
given in the online help; look in the index under “operators: informulas”. You can define quite complex expressions, but in most casesa simple condition will do the job.

Create the variable
To create your variable, choose Insert > Fields > Other. You can use
choices found on the DocInformation, Variables, and Database pages.

DocInformation fields“Using document properties to hold information that changes” on page
446 described how to set up a custom document property. You can usethat document property as the variable in your condition statement, or
you can create another document property field specifically forconditions.

User-defined variable field
To set up a variable or user field:
1) Place the cursor where you want the field to be inserted.
2) On the Fields dialog box, select the Variables page (Figure 388).

462

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) Select Set variable in the Type list and Text in the Format list.
Type a name for the variable in the Name box, and a value in the
Value box. I have chosen ProLite for the name (to remind me that
this variable is related to the two product versions), and I set thevalue as Lite because I can remember “If it is the Lite version,then this text should be hidden.”
4) Select Invisible so the field does not show in the document. Click
Insert, then click Close.

Figure 388: Defining a variable to use with conditional content
5) A small gray mark should be visible where you inserted the field.
Hover the mouse pointer over this mark and you will see the field
formula ProLite = Lite. We will come back to this field later.

Tip

Because the gray mark is so small, you may have trouble
finding it again, especially if you have other fields in the
document. You may prefer to leave the variable field visible
while you work, and change it to invisible just before you
create final copy.
At any time, you can place the insertion point just before thefield and choose Edit > Fields or right-click the field, andthen click Fields on the pop-up menu. On the Edit Fields
dialog box (Figure 392), select or deselect the Invisible
option.

Free eBook Edition

Chapter 14 Working with Fields

463

Apply the condition to the content
Now that you have defined the variable, you can use it in a condition
statement. This topic describes some of the possibilities.

Conditional text
First, let us set up some conditional text that will insert the words
Great Product Lite into the Lite version and Great Product Pro into
the Pro version of the manual. You would use this field whenever you
want to mention the name of the product.
1) Place the cursor where you want one of these phrases to appear.
(You can move or delete it later, if you wish.)2) Open the Fields dialog box by clicking Insert > Fields > Other,select the Functions page, and select Conditional text in theType list.
3) As shown in Figure 389, type ProLite EQ "Lite" in the Condition
box, Great Product Lite in the Then box, and Great ProductPro in the Else box.
Note

These fields are case-sensitive, and quotation marks are
required around a text value such as Lite.

4) Click Insert to insert the field, then click Close. You should see
Great Product Lite in your text.

Figure 389: Inserting conditional text

Tip

464

If you want to insert this field into your text in many places (asyou probably would for a product name), create an AutoText
entry for it. See “Using AutoText to insert often-used fields” onpage 449 for instructions.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Hidden text
You might use hidden text for words or short phrases that describefeatures of Great Product Pro that are not found in the Lite version.
You can reuse the same field in several places in your document—for
example, by copying and pasting it.
To create a hidden text field:
1) Choose Insert > Fields > Other and select the Functions page.
2) Select Hidden text in the Type list, as shown in Figure 390.
3) Type ProLite EQ "Lite" in the Condition box and type therequired text in the Hidden text box. Remember, this is the textthat is hidden if the condition is true.
4) Click Insert to create and insert the field.

Figure 390: Creating a condition for hidden text

Hidden paragraphs
Tip

To enable hidden paragraphs, remove the check mark from
View > Hidden Paragraphs. When this option is selected,
any hidden paragraph you create will always be hidden,
whether its condition is true or not.

A paragraph is hidden if the condition is true. To hide a paragraph:1) Click in the paragraph to be hidden.
2) Choose Insert > Fields > Other and select the Functions page
(Figure 390).
3) Select Hidden paragraph in the Type list.
4) For this example,type ProLite EQ "Lite" in the Condition box.
5) Click Insert to create and insert the field. If an extra paragraphmark appears, delete it.

Free eBook Edition

Chapter 14 Working with Fields

465

To show hidden paragraphs so you can edit them, do one of thefollowing:• Choose View > Hidden Paragraphs from the menu bar, so it ischecked (shows all hidden paragraphs).
• On the Tools > Options > OpenOffice.org Writer >Formatting Aids page, select the Fields: Hidden paragraphs
option (shows all hidden paragraphs).
• Double-click in front of the variable that you used to define thecondition for hiding the text, and enter a different value for thevariable (shows all hidden paragraphs).
• Double-click in front of the hidden text field or the hidden
paragraph field, and change the condition statement (changes
only the selected hidden paragraph).

Hidden sections
A conditional section is hidden if the condition is true. To create aconditional section:
1) Select the text that you want to be included in the conditional
section. (You can edit this text later, just as you can edit any othertext.)
2) Choose Insert > Section. On the Insert Section dialog box(Figure 391), select Hide and enter the condition in the with
Condition box. You can also give the section a name, if you wish
(strongly recommended, so you can find it again easily if you haveseveral sections in your document).
3) Click Insert to insert the section into your document.
To show a hidden section so you can edit it:
1) Choose Format > Sections.
2) On the Edit Sections dialog box (similar to the Insert Section
dialog box), select the section from the list.
3) Deselect Hide, and then click OK. You can now edit the contentsof the section. Afterwards, you can choose Format > Sections
again and select Hide to hide the section again.

466

Free eBook Edition

OpenOffice.org 3.x Writer GuideTo show all the hidden sections so you can edit them, change the valueof the variable to something that the conditions will not recognize. In
our example, you could change the value to 1.

Figure 391: Creating a section to be hidden when aspecified condition is met
To make the hidden section a normal part of the document (that is, toremove the section markers, but not the contents of the section):
1) Show the hidden section, as described above.
2) On the Edit Sections dialog box, select the section from the list.
3) Click Remove. The contents of the section are now a normal partof the document.

Change the value of the variable
1) Find the variable field you created in “Create the variable” onpage 462.
2) Click once just in front of this field, then right-click and click
Fields on the pop-up menu.
3) On the Edit Fields: Variables dialog box (Figure 392), change thevalue of the variable to Pro.
4) If you have set fields to update automatically, all of the conditionaland hidden text that uses this variable as a condition will change.
Tip

Conditional text and hidden text can only be edited in the Edit
Fields dialog box.

Free eBook Edition

Chapter 14 Working with Fields

467

Figure 392: Changing the value of the variableTip

To turn on automatic updating of fields, choose Tools >Options > OpenOffice.org Writer > General, and selectFields under Update: Automatically.

Using placeholder fields
A placeholder field prompts you to enter something (text, a table, aframe, a graphic, or an object).
To insert a placeholder field into a document:
1) On the Functions page of the Fields dialog box, selectPlaceholder in the Type column and select what the placeholder
is for in the Format column.
2) In the Placeholder box, type the text that you want to appear in
the placeholder field.
3) In the Reference box, type the text that you want to display as ahelp tip when you rest the mouse pointer over the field.
Figure 393 shows the results of inserting a placeholder field for agraphic.

468

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 393: Inserting a placeholder field
Because the <Logo> field is a graphics placeholder, when you click on
the field in the document, the Insert picture dialog box opens,prompting you to select a graphic (picture). When you select a picture
and click Open, the picture replaces the field in the document.
Similarly, clicking on a table placeholder field opens the Insert Table
dialog box, clicking on a frame placeholder field opens the Frame
dialog box, and clicking on an object placeholder field opens the Insert
OLE Object dialog box. The text placeholder field is different: you
simply click on it and type some text in the Placeholder box, which
replaces the field.

Using input fields and input lists
Input field
An input field is a variable that you can click in a document to open a
dialog where you can edit the text displayed in the field. To insert an
input field:
1) Choose Insert > Fields > Other and choose the Functions page.
2) Choose Input field in the Type list (Figure 394).
3) Optionally type some text in the Reference box. This text willappear as a tooltip when the users hover a mouse cursor over thefield.
4) Click Insert. In the small dialog box that opens, type some text
for the variable (for example, a brief instruction to the user
regarding the purpose of the field); this text can be the same ordifferent from the text in the Reference box in the previous step.
5) Click OK.

Free eBook Edition

Chapter 14 Working with Fields469

To edit an input field, click on it in the document. In the small dialog
box that opens, edit the text of the field.

Figure 394: Inserting an input field
To edit the field’s reference, right-click on the field and choose Fields
from the pop-up menu. This opens the Edit Fields: Functions dialog box(Figure 395).

Figure 395: Editing an input field

470

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Input list
An input list is a text field that displays one item from a list. To insert
an input list field into a document:
1) Choose Insert > Fields > Other; on the Functions page, choose
Input list in the Type list (Figure 396).

Figure 396: Defining an input list field
2) Type the names of the list items in the Item box on the upper
right, clicking Add after each item. The items then appear in theItems on list box. To change the order of the items, select anitem and click the Move Up or Move Down buttons.
3) Type the name of the list in the Name field on the lower right.
4) Click Insert.
To display the Choose Item dialog box, click the Input list field.

Free eBook Edition

Chapter 14 Working with Fields

471

Figure 397: Choosing an item from an input list
To add, edit, and remove items from this list, and change their order inthe list, click the Edit button in the Choose Item dialog box. This
displays the Edit Fields: Function dialog box.

Figure 398: Editing the items on an input list
To quickly edit all input fields and lists in a document, press
Ctrl+Shift+F9. The first input field or list in the document opens.
Clicking OK or Next moves to the next input field or list. After the last
input field or list, clicking Next or OK returns you to the document.

472

Free eBook Edition

OpenOffice.org 3.x Writer Guide

15

Chapter
Using Forms in WriterFree eBook Edition

Introduction to forms
This chapter covers the use of forms within Writer documents. Most of
the information here also applies to forms in other OpenOffice.org
components, but there are some differences.
The chapter presents information on using forms in four main sections:setting up a basic form, an example for creating a form, linking a form
to a data source, and finally some advanced techniques.
OpenOffice.org forms cover a lot of ground and not everything is
included here. Notable omissions are using forms in HTML documents
and writing macros to link to form controls.

When to use forms
A standard text document displays information: a letter, report, or
brochure, for example. Typically the reader may edit everything or
nothing in the document. A form has sections that are not to be edited,and other sections that are designed for the reader to make changes.
For example, a questionnaire has an introduction and questions (which
do not change) and spaces for the reader to enter answers.
OpenOffice.org offers several ways to enter information into a form,
including check boxes, option buttons, text boxes, pull-down lists, andother items, collectively known as form controls.
Forms are used in three ways:• To create a simple document for the recipient to complete, suchas a questionnaire sent out to a group of people who fill it in andreturn it.
• To link into a database or data source and allow the user to enter
information. Someone taking orders might enter the information
into a database using a form.
• To view information held in a database or data source. A librarianmight call up information about books.
Using forms to access a database offers a fast and easy way to build up
complex graphical front ends. Your form can include not only the fields
that link up to the data source but also text, graphics, tables, drawings
and other elements.
A typical way to use a simple form is:1) You design the form, then save it when you are happy with it.
2) You send the form to others (for example, by email).
474

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) They fill in the form, save it and send it back to you.
4) You open the form and see what their answers are.
Tip

By using a data source, or setting a form to update over theweb, you can automatically gather data. However, both of thoseare more complex and you might prefer to keep things simple.

Alternatives to using forms in Writer
In OpenOffice.org 3.x, the Base component provides an alternative way
to access a data source. There are a lot of similarities between forms in
Base and Writer, but one may be better for a particular task than theother. Base is appropriate only if the form accesses a data source; youwould not use it for simple forms.
Most other OpenOffice.org components—Calc, Impress, and Draw—
also support forms in almost the same way that Writer does.

Creating a simple form
This section explains how to create a simple form without any links to adata source or database and without advanced customization.

Create a document
There is nothing special to be done when creating a document to use
as a form. Create a new Writer document with File > New > Text
document.

Open the form toolbars
Two toolbars control form creation: Form Controls and Form Design.
Select View > Toolbars > Form Controls and View > Toolbars >Form Design to show them both. The Form Controls toolbar has abutton for each of the most commonly used types of control.
You can also open the Form Design toolbar from the Form Controls
toolbar. Some of the less commonly used controls are on a third toolbar—More Controls—also opened from the Form Controls toolbar.
You can dock these toolbars in different places on the Writer window,or leave them floating. Figure 399 shows the three toolbars floating.
See “Form controls reference” on page 478 for descriptions of the toolson these toolbars.

Free eBook Edition

Chapter 15 Using Forms in Writer475

Figure 399: The Form Control, More Controls and Form Design
Toolbars

Activate design mode
Click the Design Mode On/Off buttonon the Form Controls
toolbar to turn design mode on. (Click it again when you want to turn itoff.) This activates the buttons for inserting form controls and selects
controls for editing.
When design mode is off, the form behaves as it would for the end user.
Buttons can be pressed, check boxes selected, list items selected, andso on.

Insert form controls
1) To insert a form control into the document, click the control’s icon
to select it. The mouse pointer changes to look like this:2) Click in the document where you want the control to appear. (Youcan move it later.)3) Holding the left mouse button down, drag the control to size it.
Some controls have a fixed size symbol followed by the name of
the control (for example, Check Box or Option Button).
4) The control button remains active, so you can insert several
controls of the same type without needing to go back to thetoolbar.
5) To change to another tool, click its icon on the toolbar.
476

Free eBook Edition

OpenOffice.org 3.x Writer Guide

6) To stop inserting controls, click on the Select buttonon theForm Controls toolbar, or click on any of the controls you havejust inserted. The mouse pointer changes back to its normal
appearance.
Tip

Note

Holding down Shift when creating a form control makes thecontrol square. If you press Shift when resizing an existing
control, its proportions are kept the same.
When you insert a group box, list box, or combo box, a wizard
is launched to guide you through the setup. If you prefer not to
run the wizard, click the Wizards On/Off buttonon theForm Controls toolbar.

Configure controls
After inserting the controls, you need to configure them to look andbehave as you want. Right-click on a form control within yourdocument and select Control from the pop-up (context) menu to open
the Properties dialog box for the selected control. Double-clicking on aform control also opens this dialog box.
The Properties dialog box has three pages: General, Data, and Events.
For simple forms, only the General page is of any interest. On this page
you can set the look and feel of the control. See “Configure form
controls” on page 487 and “Form control formatting options” on page499 for more information, and the descriptions in the Help for details.
Configuration for use with a database is discussed in “Creating a form
for data entry” on page 494.
The fields on this dialog box vary with the type of control. For example:• Some controls have visible labels, such as Push Button and Option

Button. The label text can be set.
• The List Box contains a list of options to choose from. Set these in
the List entries box.
Notice the scroll bar in this dialog box. You can use the scroll bar or
enlarge the dialog box to see additional fields.

Free eBook Edition

Chapter 15 Using Forms in Writer477

Figure 400: Example of the Properties dialog
box for a form control

Use the form
To use the form, leave design mode by clicking the Design Mode
On/Off button

to deactivate it. Save the form document.

Form controls reference
Form Control toolbar
SelectSelects a form control to perform some otheraction on it.

Design mode on/off

Toggles between design mode on (to edit
forms) and design mode off (to use forms).

ControlForm

478

Launches form control properties dialog box.
This dialog box can be kept open as different
controls are selected.
Launches form properties dialog box,
controlling properties for the form as a whole,such as which data source it connects to.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Form Control toolbar
Check Box

A box that can be selected or deselected on theform. You can label the box.

Text Box

A control to create a box into which the form
user can type any text.

Formatted Field

Push Button

Option Button

List Box

Combo BoxLabel Field

More Controls

A control allowing numeric formatting options.
For example, you can set maximum andminimum values for the number entered, or thenumber type (decimal places, scientific,
currency).
Creates a button that can be linked to a macro.
The label is the name that appears on the
button.
Creates an option button (also known as aradio button). When multiple buttons aregrouped together, only one can be selected at atime. The easiest way to group multiple buttons
is to use the Group Box button on the MoreControls toolbar, with wizards enabled.
Creates a list of options as a pull-down menu
that the user can choose from. If wizards areon, creating a list box launches the List Box
Wizard. This wizard is only useful if your form
is linked to a data source.
If the form is not linked to a data source, turnwizards off and create an empty list box. Thenclick the control button and, in the List Entries
option on the General tab, enter the options
you want to appear on the list.
As with a List Box, you set up a list of choices.
In addition, a panel at the top either displays
the choice made or allows the form user to typein something else. This works the same as theList Box.
A text label. The difference between this andjust typing on the page is that, as a control, you
can link a label field to macros so, for example,
something happens when the mouse passes
over it or clicks on it.
Launches the More Controls toolbar.

Free eBook Edition

Chapter 15 Using Forms in Writer479

Form Control toolbar
Form Design

Wizards On/Off

Launches the Form Design toolbar, which canalso be opened with View > Toolbars > Form
Design.
Some form controls (List Box and Combo Box)have optional wizards. If you do not want the
wizard to launch when you create one of thesecontrols, use the Wizards On/Off button toswitch wizards off.

More Controls toolbar
Spin Button

Scrollbar

Image Button

Image Control

Date Field

Time Field

480

Allows form users to choose a number bycycling through the list of numbers. You canspecify maximum, minimum, default, and thestep between numbers.
This control is not commonly used in Writer, as
the number is not displayed. In Calc, however,a Data tab appears on the Control Properties
dialog box, so you can link the spin button to acell.
Creates a scrollbar, with a number of options todefine the exact appearance.
This control is not commonly used in Writer. In
Calc, a Data tab appears on the Control
Properties dialog box, allowing you to link thescroll bar to a cell.
Behaves exactly like a push button, butdisplays as an image. Choose the image in theGraphics option on the General tab in theControl Properties dialog box.
Only useful when the form is connected to adata source and a field in the data source
exists that can hold images. You can add newimages to the database or retrieve and display
images from it.
Stores a date. You need to configure theearliest and latest dates the field will accept,
the default date, and the date format. You can
add a spinner.
Works like a date field but specifies a time.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

More Controls toolbar
File Selection

Allows a user to select a file, either by typing
the path and name directly or by clicking on a
Browse button and choosing the file from a
dialog box.

Numeric Field

Displays a number. You need to specify
formatting, maximum, minimum and default
values. You can add a spinner.

Currency Field

Works like a numeric field; additionally you can
add a currency symbol.

Pattern Field

Group Box

Table Control

Navigation Bar

Pattern fields are useful when the form links
into a data source. Specify an Edit Mask to
restrict what a user can enter into the field.
Specify a Literal Mask to restrict which data isdisplayed from the data source.
The group box control has two different uses
depending on whether wizards are on or off.
If wizards are on, creating a group box
launches the Group Element wizard. This
creates a group of options buttons (in which
only one may be selected at a time). In mostcases, using a group box is the best way tocreate a set of option buttons.
If wizards are off, a group box is simply a visual
box to group together different controls. It has
no effect on the way the controls operate.
Table Control is only useful with a data source.
If no data source is specified, you will beprompted to choose one in the Table Element
Wizard. You then pick the fields to display and,
when design mode is off, the data appears in
the table. The table also includes controls to
step through the records.
Records can be added, deleted, and modified in
the table.
A navigation bar is the same as the Form
Navigation toolbar (View > Toolbars > Form
Navigation), but can be placed anywhere in
the document and be resized.

Free eBook Edition

Chapter 15 Using Forms in Writer481

Form Design toolbar
SelectSelects a form control to perform an action on
it.

Design mode on/off

Toggles between design mode on (to edit
forms) and design mode off (to use forms).

Control

Form

Form Navigator

Add Field

Activation Order

Open in Design Mode
Automatic Control
Focus

482

Launches form control properties dialog box.
This dialog box can be kept open as different
controls are selected.
Launches form properties dialog box,
controlling properties for the form as a whole,such as which data source it connects to.
The Form Navigator is a utility displaying all
the forms and controls in the current
document. It allows you to edit and deletethem easily.
If you use the Form Navigator, it's
recommended that you give your controls
names (in the properties dialog box). The nameappears in the navigator so, for example, if you
have ten text boxes, you can tell which iswhich.
Add Field is only useful if you have specified adata source for the form. If no data source is
specified, an empty box opens.
If you have specified a data source, Add Field
opens a list of all the fields in the specified
table, which you can then drag and drop onto
the page. The fields are placed on the page
with the name of the field before them.
This is a quick and easy way to create a form
from a data source.
Allows you to specify the order in which focus
shifts between controls. You can test the orderby leaving design mode and using Tab toswitch between the controls.
Opens the current form in design mode (to edit
the form rather than entering data into it).
If activated, focus is set to the first form
control.

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Form Design toolbar
Position and Size

Change Anchor

Alignment

Launches the Position and Size dialog box,
allowing you to specify both by typing inprecise values, rather than dragging thecontrol. You can also lock the size or position,
so they do not get changed accidentally. For
some controls, you can rotate and set the slant
and corner radius.
Just as with a frame, any form control can be
anchored to page, paragraph or character andalso anchored as a character (meaning that it
behaves like any other character on the page).
The Alignment button is disabled unless thecontrol is anchored as a character. You canalign a control in different ways, for example so
the top of the control lines up with the top of
the text or the bottom lines up with the bottomof the text.

Display Grid

Displays a grid of dots on the page, to help youline up controls.

Snap to Grid

When a control is brought close to a grid point
or line, it will snap to the grid. This makes it iseasier to line up controls.

Guides when Moving

When a control is being moved, lines extend
from the control horizontally and vertically tohelp you position it accurately.

Free eBook Edition

Chapter 15 Using Forms in Writer

483

Example: a simple form
Create the document
Open a new document (File > New > Text Document). It is a goodidea to write down the outline of the document, without form controls,though of course it can easily be changed later.

Figure 401: Initial document without form controls

Add form controls
The next step is to add the form controls to the document. We will havefour controls:• Name is a text box• Sex is two option buttons, male or female.
• Favourite shape is a list of options.
• All shapes you like is a series of check boxes.
To add these controls:
1) Select View > Toolbars > Form Controls to open the Form
Control toolbar.
2) If the tools are not active, click the Design Mode On/Off
button to activate them.
3) Click the Text Box button, then click in the document and,with the left mouse button held down, drag the shape of theName text box to approximately the size you want.

484

Free eBook Edition

OpenOffice.org 3.x Writer Guide

4) Make sure the Wizards On/Off button
border). Click the More Controls button
Controls toolbar.

is on (shaded with ato launch the More

5) On the More Controls toolbar, click the Group Box button.
Draw a group box by the Sex: entry. The Group Element Wizard
opens.
a) On the first page of the wizard, enter two names for the
options fields: Male and Female. Click the >> button after
each entry. Click Next >>.

Figure 402: Specifying names for option fieldsb) On the next page, select the option No, one particular field is
not going to be selected. Click Next>>.

Figure 403: Selecting a default field

Free eBook Edition

Chapter 15 Using Forms in Writer

485c) Give a value to your fields. Typically, you would give one field
the value 1 and the other field the value 2. If there are morethan 2 option fields, you would give them values of 3, 4, andso on. Click Next >>.

Figure 404: Assigning field valuesd) You can either delete the caption or give a caption to yourGroup Box. Then click Finish.

Figure 405: Create Caption Option6) Now create the list box. On the Form Controls toolbar, click the
Wizards On/Off button

to turn wizards off. Click the List Box

buttonand draw a list box by Favourite Shape: in the
document. This will just be an empty pane for now.

486

Free eBook Edition

OpenOffice.org 3.x Writer Guide

7) Finally create four check boxes by All the shapes you like. Clickon the Check Box button
and then draw out four checkboxes, side by side across the page.
You should now have a document looking something like Figure 406.

Figure 406: Document with form controls

Configure form controls
No further configuration is required to the Name and Sex fields, but
you could, if you wish, give a name to each control and change theappearance of the controls.
The list box must be configured to add the list of options. The checkboxes must be configured to add in the names (instead of Check Box,
Check Box1, and so forth). Following are instructions to configure
these controls:
1) Be sure design mode is on. Double-click on the List Box control
within the document to open the control’s Properties dialog box.
Select the General tab.
2) In the List Entries box (scroll down if it is not visible), type thenames of the shapes (Circle, Triangle, Square, Pentagon)
separated by ”;” and then press Enter. You should end up with aline saying “Circle”;”Triangle”;”Square”;”Pentagon”.

Free eBook Edition

Chapter 15 Using Forms in Writer487

Figure 407: Properties dialog box for a list box3) Click on the first Check Box. The Properties dialog box stays open
but changes to show the properties for the check box.

Figure 408: Top part of Properties dialog box fora check box4) Change the Label fieldfrom Check Box to Circle and press Enter.
The cursor moves to Label Field and the label on the check box
in the document changes immediately.

488

Free eBook Edition

OpenOffice.org 3.x Writer Guide

5) Click on each of the other three check boxes in turn. Change theLabel in the Properties dialog box to Triangle, Square, andPentagon in turn.
6) Close the Properties dialog box.
7) Turn design mode off

and close the two Controls toolbars.

You have now completed the form, which should look something like
Figure 409.

Figure 409: Completed form

Finishing touches
The form is complete, but you are free to make further changes to the
document. If you were sending this out to other people to complete,
you would probably want to make the document read-only. The effectwould be that users would be able to fill in the form but not to makeany other changes to the document.
To make the document read-only, select Tools > Options >OpenOffice.org > Security > Open this document in read-only
mode.
Note

If the document is read-only, anyone filling in the form willneed to use File > Save as to save the document.

Free eBook Edition

Chapter 15 Using Forms in Writer

489

Accessing data sources
The most common use for a form is as the front end of a database. You
can provide a form that allows users to enter information into a
contacts database and, because it is part of a Writer document, theform can contain graphics, formatting, tables, and other elements tomake it look just the way you want. Modifying the form is as simple asediting a document.
OpenOffice.org can access numerous data sources. These include
ODBC, MySQL, Oracle JDBC, spreadsheets and text files. As a generalrule, databases can be accessed for read and write; other data sources(such as spreadsheets) are read-only.

Tip

To see the list of supported data source types for youroperating system, choose File > New > Database. On the firstpage of the Database Wizard (Figure 410), select Connect toan existing database and then open the drop-down list. An
example is shown in Figure 413.

Creating a database
Chapter 8 (Getting Started with Base) in the Getting Started guidecovers in more detail how to create a database. Here we give a shortguide to creating a very simple database with OOo Base.
1) Select File > New > Database to start the Database Wizard(Figure 410).
2) Select Create a new database and click Next.
3) On the next page, select Yes, register the database for me andOpen the database for editing. Registering the database justmeans that it can be accessed from other OOo components suchas Writer and Calc. You need to do this if you want to link yourforms into it.
4) Click Finish and save your new database, giving it a name.
Unlike creating other documents in OOo, databases must be
saved when you first create them.

490

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 410: Database Wizard
After saving the database, you should see the main Base window(Figure 405), which contains three panels. The left-hand panel is
Database, with icons for Tables, Queries, Forms and Reports.

Figure 411: Main Base window

Free eBook Edition

Chapter 15 Using Forms in Writer

491

The next step is to create a table. Again, this is covered in more detailin Chapter 8 (Getting Started with Base) in the Getting Started guide.
Here we are going to create a small table as an example.
1) Choose Tables in the left-hand column, then choose Create
Table in Design View under Tasks.
2) Use the Table Design window to tell Base which fields to create.
We will have just three fields: Name, Address, and Telephone.

Figure 412: Database table design3) On the first line, enter under Field Name ID and set the Field
Type to Integer [INTEGER]. In the gray box at the left of the line,
right-click and select Primary Key, bringing up a key icon in thebox. In the Field Properties at the bottom of the window is an
Auto Value option; change this to Yes.

Tip

Setting up the Primary Key field with Auto Value set to Yes is
an important step. If this is not done, the form you create later
will be much trickier to use and may generate errors for theuser. Make sure you get this step right!

4) On three lines, enter under Field Name Name, Address andTelephone. Accept the default Field Type of Text [VARCHAR] andleave Description blank.
5) Save the table (File > Save). You will be prompted to name it.
The name can be anything you like.
6) Finally, save the whole database from the main Base window(File > Save).
492

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Accessing an existing data source
If you have an existing data source, such as a spreadsheet or database,
you simply need to tell OpenOffice.org about it. This is called
registering a data source.
To register an existing data source:1) Select File > New > Database to launch the Database Wizard.
2) Select Connect to an existing database and choose the typefrom the drop-down list.

Figure 413: Using the Database Wizard to connect to an
existing database3) Click Next and follow the instructions to select the database toregister (the exact process varies between different types of data
source).
4) In Step 3: Save and proceed, check that Yes, register the
database for me is selected. Deselect Open the database forediting – you just need to register it, not edit it through Base.

Free eBook Edition

Chapter 15 Using Forms in Writer493

Creating a form for data entry
Whether you created a new database, or already had a data source, it
must be registered with OpenOffice.org (see above). Once it isregistered, linking your form to the data source is simple. Follow thesesteps to create a new form and link it to a registered data source.
1) Create a new document in Writer (File > New > Text
Document).
2) Design your form, without putting in the actual fields (you canalways change it later).
3) Show the Form Controls toolbar (View > Toolbars > Form
Controls).
4) Click the Design Mode On/Off button
to put the document
into design mode, if necessary. With design mode off, most of thetoolbar buttons are grayed out. If the Design Mode button is also
grayed out, click on the Select button to activate it.
5) Click the Text Box button. Click in the document and, holding
down the left mouse button, drag the mouse to create a text box
for the first form field (for example, Name, if you are linking to
the database created above).
again and drag the mouse to draw6) Click the Text Box button
another field. Additional fields, of any type, can be added in thesame way (click and drag).
So far you have followed the same steps you used before when you
created your first form. Now you link your form with the data source
you registered.
in the Form Controls toolbar, or right1) Click the Form button
click on any of the fields you inserted and select Form, to open
the Form Properties dialog box.
2) In the Form Properties dialog box, click on the Data tab.
•
Set Data Source to be the data source you registered.
•
Set Content Type to be Table.
•
Set Content to be the name of the table you want to access.
•
Close the dialog box.

494

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 414: Form properties, connecting
to a data source3) For each form control in turn, launch the Properties dialog box..
Click on the control to select it (so small green boxes appear
around it). Then either right-click and select Control or click on
the Control buttonon the Form Controls toolbar.
4) In the Properties dialog box, click on the Data tab. If you set up
the form correctly, the Data Field option will contain a list of thedifferent fields in the data source (for example, Name, Address
and Telephone). Select the field you want.

Figure 415: Form control
properties, Data tab5) Repeat for each control in turn until every control that should be
has been assigned to a field.

Free eBook Edition

Chapter 15 Using Forms in Writer

495

Tip

If you created a database in OOo Base and your Primary Key
field had Auto Value set to Yes, that field does not need to bepart of the form. If Auto Value was set to No, you will have toinclude it and have your users enter a unique value into thatfield whenever they make a new entry—not something that isrecommended.

Entering data into a form
Once you have created a form and tied it to a database, you want to
use it to enter data into your data source, or modify data already there.
1) Make sure that the form is not in design mode. In the Form
Controls toolbar, click on the Design Mode On/Off button.
If design mode is off, most of the buttons on the toolbar will begrayed out.
2) Make sure that the Form Navigation toolbar is on (View >Toolbars > Form Navigation). This toolbar normally appears at
the bottom of the window.

Figure 416: Form Navigation toolbar
3) If there is existing data in the data source, use the control buttons
on the Form Navigation toolbar to look at different records. You
can amend data in a record by editing the values in the form. To
submit the changes, press the Enter key with the cursor in thelast field. The record is saved and the next record is displayed.
4) If there is no data in the form, you can start entering information
by typing into the fields of the form. To submit the new record,press the Enter key with the cursor in the last field.
5) Other functions can be performed from the Form Navigation
toolbar, including deleting a record and adding a new record.

496

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Advanced form customization
Linking a macro to a form control
You can set any form control (for example, text box or button) toperform an action when triggered by some event. To see the full list of
events, right-click on the form control when the design mode is on,
select Control and click on the Events tab.

Figure 417: Control properties, Events tab
To assign a macro to an event:1) Create the macro. See Chapter 13 (Getting Started with Macros)in the Getting Started guide.
2) Be sure the form is in design mode. Right-click on the form
control, select Control and click on the Events tab.
3) Click the browse
button to bring up the Assign action dialog
box (Figure 418).
4) Click the Macro button and select the macro from the list in the
Macro Selector dialog box. You return to the Assign action dialog
box. Repeat as needed, then click OK to close the dialog box.

Free eBook Edition

Chapter 15 Using Forms in Writer497

Figure 418: Assign action dialog box
Macros can also be assigned to events relating to the form as a whole.
To assign these, right-click on a form control in the document, selectForm and click on the Events tab.

Read-only documents
Having created your form, you want whoever is using it to be able toaccess the information stored in the database, or complete the form,
without changing the layout. To do this, make the document read-onlyby selecting Tools > Options > OpenOffice.org > Security> Open
this document in read only mode.

Fine-tuning database access permissions
By default, when a database is accessed from a form, any changes canbe made to it: records can be added, deleted, and amended. You may
not want that behavior. For example, you may want users to be able
only to add new records or to be prohibited from deleting existing
records.
In design mode, right-click on a form control and select Form from the
pop-up menu. On the Data tab of the Form Properties dialog box are anumber of options: Allow additions, Allow deletions, Allow
modifications and Add data only. Set each of these to Yes or No tocontrol the access users have to the data source.
498

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 419: Data Properties of a Form
Individual fields can also be protected. This might be useful if you
wanted a user to be able to modify some parts of a record but only
view others, such as a stock list where item descriptions are fixed andquantities can be modified.
To make an individual field read-only, in design mode, right-click on theform control within the document and select Control from the pop-up
menu. Select the General tab and set Read-only to Yes.

Form control formatting options
You can customize the way form controls look and behave in a numberof ways. These are all accessed in design mode. Right-click on the form
control, select Control from the pop-up menu and select the Generaltab in the Properties dialog box.
• Set a label for the control in the Label box (not to be confusedwith the box called Label Field). Some form controls, such aspush buttons and option buttons, have visible labels that can be
set. Others, such as text boxes, do not.
• Set whether the form control will print out if the document isprinted with the Print option.
• Use the Font setting to set the font, typeface, and size for a field’slabel or for text typed into a field. This setting does not effect thesize of check boxes or option buttons.

Free eBook Edition

Chapter 15 Using Forms in Writer499

• For a text box, you can set the maximum text length. This is very

•

•

•
•

useful when adding records into a database. Every database text
field has a maximum length and, if the data entered is too long,
OOo displays an error message. By setting the maximum text
length of the form control to be the same as that of the databasefield, this error can be avoided.
You can set the default option for a form control. By default, acontrol is blank, or has every option unselected. You can set thecontrol to start with a particular option or list item selected.
For controls where a password is being entered, setting the
Password character (for example to *) displays only thatcharacter, but saves what the user really types.
You can add additional information and help text for a form
control.
Other formatting controls such as background color, 3-D look, text
formatting, scroll bars, and borders allow you to further define
how the control appears.

XFormsXForms are a new type of web form, developed by the World Wide Web
Consortium (W3C). OpenOffice.org 3 supports the XForms 1.0 open
standard for creating web forms with XML.
In OpenOffice.org, an XForms document is a special type of Writer
document. XForms use the same controls as the ordinary forms
described in this chapter.
After you create and save an XForms document, you can open the
document, fill out the form, and submit the changes to a server.
A detailed discussion of XForms is beyond the scope of this chapter, as
it is related more to databases than word processing. A good tutorial
introduction is J. David Eisenberg’s XForms and OpenDocument in
OpenOffice.org, available fromhttp://opendocument.xml.org/files/xforms_ooo_06_10_25.pdf andhttp://books.evc-cit.info/xforms_ooo_06_08_15.odt. Another good
resource is Valden Longhurst’s Using XForms and the OpenDocument
format in OpenOffice.org and StarOffice,http://wiki.services.openoffice.org/wiki/Documentation/Using_XForms

500

Free eBook Edition

OpenOffice.org 3.x Writer Guide

16

ChapterMath Objects
The OpenOffice.org Equation Editor

Free eBook Edition

What is Math?
Math is OpenOffice.org (OOo)’s component for writing mathematicalequations. It is most commonly used as an equation editor for text
documents, but it can also be used with other types of documents or
stand-alone. When used inside Writer, the equation is treated as an
object inside the text document.
This chapter is now a separate document, the OpenOffice.org Math
Guide. You can get a copy from the OpenOffice.org Documentation
wiki, http://wiki.services.openoffice.org/wiki/Documentation/
OOo3_User_Guides/Chapters.

502

Free eBook Edition

OpenOffice.org 3.x Writer Guide

17

Chapter
Customizing WriterFree eBook Edition

Introduction
This chapter describes some common customizations that you may
wish to do.
You can customize menus, toolbars, and keyboard shortcuts in
OpenOffice.org, add new menus and toolbars, and assign macros toevents. However, you cannot customize context (right-click) menus.
Other customizations are made easy by extensions that you can installfrom the OpenOffice.org website or from other providers.
Note

Customizations to menus and toolbars can be saved in a template.
To do so, first save them in a document and then save the document
as a template as described in Chapter 10 (Working with Templates).

Customizing menu content
In addition to changing the menu font (described in Chapter 2), you
can add and rearrange items on the menu bar, add items to menus, andmake other changes.
To customize menus:
1) Choose Tools > Customize.
2) On the Customize dialog box, go to the Menus page (Figure
420).
3) In the Save In drop-down list, choose whether to save thischanged menu for the application (Writer) or for a selected
document.
4) In the section OpenOffice.org Writer > Menus, select from the
Menu drop-down list the menu that you want to customize. The
list includes all the main menus as well as sub-menus, that ismenus that are contained under another menu. For example, in
addition to File, Edit, View, and so on, there is File | Send andFile |Templates. The commands available for the selected menu
are shown in the central part of the dialog box.
5) To customize the selected menu, click on the Menu or Modify
buttons. You can also add commands to a menu by clicking on the
Add button. These actions are described in the following sections.
Use the up and down arrows next to the Entries list to move theselected menu item to a different position.
6) When you have finished making all your changes, click OK tosave them.
504

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 420. The Menus page of the Customize dialog box

Creating a new menu
In the Customize dialog box, click New to display the New Menu dialog
box, shown in Figure 421.
1) Type a name for your new menu in the Menu name box.
2) Use the up and down arrow buttons to move the new menu into
the required position on the menu bar.
3) Click OK to save.
The new menu now appears on the list of menus in the Customize
dialog box. (It will appear on the menu bar itself after you save yourcustomizations.)
After creating a new menu, you need to add some commands to it, as
described in “Adding a command to a menu” on page 507.

Free eBook Edition

Chapter 17 Customizing Writer505

Figure 421: Adding a new menu

Modifying existing menus
To modify an existing menu, select it in the Menu list and click the
Menu button to drop down a list of modifications: Move, Rename,
Delete. Not all of these modifications can be applied to all the entries
in the Menu list. For example, Rename and Delete are not available
for the supplied menus.
To move a menu (such as File), choose Menu > Move. A dialog box
similar to the one shown in Figure 421 (but without the Menu namebox) opens. Use the up and down arrow buttons to move the menu into
the required position.
To move submenus (such as File | Send), select the main menu (File) in
the Menu list and then, in the Menu Content section of the dialog box,
select the submenu (Send) in the Entries list and use the arrow keys tomove it up or down in the sequence. Submenus are easily identified in
the Entries list by a small black triangle on the right hand side of thename.
In addition to renaming, you can specify a keyboard shortcut thatallows you to select a menu command when you press Alt+ an
underlined letter in a menu command.
1) Select a menu or menu entry.
2) Click the Menu button and select Rename.
3) Add a tilde (~) in front of the letter that you want to use as anaccelerator. For example, to select the Save All command bypressing Alt+V, enter Sa~ve All.
506

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Adding a command to a menu
You can add commands to the supplied menus and to menus you havecreated. On the Customize dialog box, select the menu in the Menu list
and click the Add button in the Menu Content section of the dialogbox.
On the Add Commands dialog box, select a category and then thecommand, and click Add. The dialog box remains open, so you canselect several commands. When you have finished adding commands,
click Close. Back on the Customize dialog box, you can use the up anddown arrow buttons to arrange the commands in your preferred
sequence.

Figure 422: Adding a command to a menu

Modifying menu entries
In addition to changing the sequence of entries on a menu or submenu,
you can add submenus, rename or delete the entries, and add groupseparators.
To begin, select the menu or submenu in the Menu list near the top of
the Customize page, then select the entry in the Entries list under
Menu Content. Click the Modify button and choose the required action
from the drop-down list of actions.

Free eBook Edition

Chapter 17 Customizing Writer

507

Most of the actions should be self-explanatory. Begin a group adds a
separator line after the highlighted entry.

Customizing toolbars
You can customize toolbars in several ways, including choosing whichicons are visible and locking the position of a docked toolbar, as
described in Chapter 1 (Introducing Writer), and adding or deleting
icons (commands) in the list of those available on a toolbar. You canalso create new toolbars. This section describes how to create new
toolbars and add or delete icons on existing ones.
To get to the toolbar customization dialog box, do any of the following:• On the toolbar, click the arrow at the end of the toolbar andchoose Customize Toolbar.
• Choose View > Toolbars > Customize from the menu bar.
• Choose Tools > Customize from the menu bar and go to the
Toolbars page.

Figure 423. The Toolbars page of the Customize dialog box

508

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Modifying existing toolbars
To modify an existing toolbar:
1) In the Save In drop-down list, choose whether to save thischanged toolbar for the application (Writer) or for a selected
document.
2) In the section OpenOffice.org Writer > Toolbars, select fromthe Toolbar drop-down list the toolbar that you want to modify.
3) Click on the Toolbar or Modify buttons, and add commands to a
toolbar by clicking on the Add button. You can also create a new
toolbar by clicking on the New button. These actions aredescribed in the following sections.
4) When you have finished making all your changes, click OK tosave them.

Adding a command to a toolbar
If the list of available buttons for a toolbar does not include all thecommands you want on that toolbar, you can add commands. When you
create a new toolbar, you need to add commands to it.
1) On the Toolbars page of the Customize dialog box, select the
toolbar in the Toolbar list and click the Add button in the Toolbar
Content section of the dialog box.
2) The Add Commands dialog box (Figure 422) is the same as foradding commands to menus. Select a category and then thecommand, and click Add. The dialog box remains open, so you canselect several commands. When you have finished adding
commands, click Close. If you insert an item which does not havean associated icon, the toolbar will display the full name of theitem: the next section describes how to choose an icon for atoolbar command.
3) Back on the Customize dialog box, you can use the up and downarrow buttons to arrange the commands in your preferred
sequence.
4) When you are done making changes, click OK to save.

Choosing icons for toolbar commands
Toolbar buttons usually have icons, not words, on them, but not all of
the commands have associated icons.
To choose an icon for a command, select the command in the Toolbar
Content – Commands list in the Customize dialog box, and click

Free eBook Edition

Chapter 17 Customizing Writer

509

Modify > Change icon. On the Change Icon dialog box, you can scroll
through the available icons, select one, and click OK to assign it to thecommand.

Figure 424: Change Icon dialog box
To use a custom icon, create it in a graphics program and import it into
OOo by clicking the Import button on the Change Icon dialog box.
Custom icons must be 16 x 16 or 26 x 26 pixels in size and cannot
contain more than 256 colors.

Example: Adding a Fax icon to a toolbar
You can customize OpenOffice.org so that a single click on an icon
automatically sends the current document as a fax.
1) Be sure the fax driver is installed. Consult the documentation foryour fax modem for more information.
2) Choose Tools > Options > OpenOffice.org Writer > Print. The
dialog box shown in Figure 425 opens.
3) Select the fax driver from the Fax list and click OK.
4) Click the arrow icon at the end of the Standard toolbar. In thedrop-down menu, choose Customize Toolbar. The Toolbars pageof the Customize dialog box appears (Figure 423). Click Add.

510

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Figure 425: Setting up OOo for sending faxes5) On the Add Commands dialog box (Figure 426), select Documentsin the Category list, then select Send Default Fax in theCommands list. Click Add. Now you can see the new icon in theCommands list.
6) In the Commands list, click the up or down arrow button toposition the new icon where you want it. Click OK and then click
Close. Your toolbar now has a new icon to send the current
document as a fax.

Figure 426: Adding a Send Fax command to a toolbar

Free eBook Edition

Chapter 17 Customizing Writer

511

Creating a new toolbar
To create a new toolbar:
1) Choose Tools > Customize > Toolbars from the menu bar.
2) Click New. On the Name dialog box, type the new toolbar’s nameand choose from the Save In drop-down list where to save thischanged menu: for the application (Writer) or for a selected
document.

The new toolbar now appears on the list of toolbars in the Customize
dialog box. After creating a new toolbar, you need to add somecommands to it, as described above.

Assigning shortcut keys
In addition to using the built-in keyboard shortcuts (listed in Appendix
A), you can define your own. You can assign shortcuts to standard OOofunctions or your own macros and save them for use with the entire
OpenOffice.org suite.

CautionBe careful when reassigning your operating system’s or OOo’s
predefined shortcut keys. Many key assignments are universally
understood shortcuts, such as F1 for Help, and are always
expected to provide certain results. Although you can easily
reset the shortcut key assignments to the OOo defaults,changing some common shortcut keys can cause confusion,
frustration and possible data loss or corruption, especially ifother users share your computer.

To adapt shortcut keys to your needs, use the Customize dialog box, as
described below.
1) Choose Tools > Customize > Keyboard. The Customize dialog
box opens.
2) To have the shortcut key assignment available in all componentsof OpenOffice.org, select the OpenOffice.org button.

512

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) Next select the required function from the Category and Function
lists.
4) Now select the desired shortcut keys in the Shortcut keys list at
the top of the page and click the Modify button on the right. The
selection now appears in the Keys list on the lower right.
5) Click OK to accept the change. Now the chosen shortcut keys will
execute the function chosen in step 3 above whenever they arepressed.

Note

All existing shortcut keys for the currently selected Function arelisted in the Keys selection box. If the Keys list is empty, it
indicates that the chosen key combination is free for use. If it
were not, and you wanted to reassign a shortcut key
combination that is already in use, you must first delete theexisting key.
Shortcut keys that are greyed-out in the listing on the Customize
dialog box, such as F1 and F10, are not available forreassignment.

Example: Assigning styles to shortcut keys
You can configure shortcut keys to quickly assign styles in yourdocument. Some shortcuts are predefined, such as Ctrl+0 for the Text
body paragraph style , Ctrl+1 for the Heading 1 style and Ctrl+2 for
Heading 2. You can modify these shortcuts and create your own.
1) Click Tools > Customize > Keyboard. The Keyboard page of the
Customize dialog box (Figure 427) opens.
2) To have the shortcut key assignment available only for Writer,
select Writer in the upper right corner of the page; otherwise
select OpenOffice.org to make it available to every component.
3) Choose the shortcut keys you want to assign a style to. In thisexample, we have chosen Ctrl+9.
4) In the Functions section at the bottom of the dialog box, scroll
down in the Category list to Styles. Click the + sign to expand thelist of styles.
5) Choose the category of style. (This example uses a paragraphstyle, but you can also choose character styles and others.) The
Function list will display the names of the available styles for theselected category. The example shows some of OOo’s predefinedstyles.

Free eBook Edition

Chapter 17 Customizing Writer513

Figure 427. Defining keyboard shortcuts for applying styles
6) To assign Ctrl+9 to be the shortcut key combination for the List 1
style, select List 1 in the Function list, and then click Modify.
Ctrl+9 now appears in the Keys list on the right, and List 1
appears next to Ctrl+9 in the Shortcut keys box at the top.
7) Make any other required changes, and then click OK to savethese settings and close the dialog box.

Example: Assigning macros to shortcut keys
A common use for assigning macros to shortcut keys is to enable quick
and easy insertion of special characters. This example shows how to
set up keyboard shortcuts for inserting en-dashes and em-dashes.
First, you need to record a macro for inserting each type of dash. Then,
you need to assign those macro to shortcut key combinations.

514

Free eBook Edition

OpenOffice.org 3.x Writer Guide

1) Choose Tools > Macros > Record Macro to start
recording a macro.
A small window is displayed so you know that
OpenOffice.org is recording.
2) Choose Insert > Special Characters to open the Special
Characters dialog box (Figure 428). Scroll down until you find theen-dash (U+2013) and em-dash (U+2014) characters. Select oneof them and click OK.

Figure 428: Find and choose the en-dash.
3) Click the Stop Recording button to stop recording, save themacro, and display the OpenOffice.org Basic Macros dialog box(see Figure 429). Type a descriptive name for the new macro in
the Macro name box on the upper left.

Free eBook Edition

Figure 429: Naming the new macro and storing it
Chapter 17 Customizing Writer

5154) Be sure to open the library container named My Macros. Find thelibrary named Standard under My Macros. Select Module1 andclick Save.
5) Repeat steps 1–4 to create other macros, for example to insert an
em-dash.
6) Choose Tools > Customize > Keyboard tab (Figure 430). In the
Shortcut keys list, pick an unused combination (for example,
Ctrl+Shift+N for an en-dash). In the Category list, scroll down to
OpenOffice.org Macros, click the + sign (or small triangle,
depending on your operating system), then click the + (ortriangle) next to the Standard library and choose Module1. In the
Function list, choose Endash and click the Modify button on theupper right. The selected key combination now appears in theKeys list on the lower right, and Endash appears next to
Ctrl+Shift+N in the Shortcut keys list.
7) Repeat for the em-dash macro, then click OK.

Figure 430: Defining keyboard shortcuts for running macros

516

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Tip

For inserting en- and em-dashes, and other special characters,
you may find extensions such as Compose Special Characters
useful. See “Adding functionality with extensions” on page 518.

Saving changes to a file
Changes to the shortcut key assignments can be saved in a keyboard
configuration file for use at a later time, thus permitting you to create
and apply different configurations as the need arises. To save keyboard
shortcuts to a file:1) After making your keyboard shortcut assignments, click the Save
button on the right of the Customize dialog box (Figure 430).
2) In the Save Keyboard Configuration dialog box, select All files
from the Save as Type list.
3) Next enter a name for the keyboard configuration file in theFile name box, or select an existing file from the list. If you needto, browse to find a file from another location.
4) Click Save. A confirmation dialog box appears if you are about tooverwrite an existing file, otherwise there will be no feedback andthe file will be saved.

Loading a saved keyboard configuration
To load a saved keyboard configuration file and replace your existing
configuration, click the Load button near the bottom right of the
Customize dialog box, and then select the configuration file from theLoad Keyboard Configuration dialog box.

Resetting the shortcut keys
To reset all of the keyboard shortcuts to their default values, click the
Reset button near the bottom right of the Customize dialog box. Use
this feature with care as no confirmation dialog box will be displayed;
the defaults will be set without any further notice or user input.

Assigning macros to eventsIn OOo, when something happens, we say that an event occurred. For
example, a document was opened, a key was pressed, or the mouse
moved. You can associate a macro with an event, so the macro is run
when the event occurs. For example, a common use is to assign theFree eBook Edition

Chapter 17 Customizing Writer517

“open document” event to run a macro that performs certain setup
tasks for the document.
To associate a macro with an event, use the Events page of the
Customize dialog box. For more information, see Chapter 13 (Getting
started with macros) in the Getting Started guide.

Adding functionality with extensions
An extension is a package that can be installed into OpenOffice.org to
add new functionality.
Although individual extensions can be found in different places, theofficial OpenOffice.org extension repository is at
http://extensions.services.openoffice.org/. Some extensions are free ofcharge; others are available for a fee. Check the descriptions to see
what licenses and fees apply to the ones that interest you.

Installing extensions
To install an extension, follow these steps:
1) Download an extension and save it anywhere on your computer.
2) In OOo, select Tools > Extension Manager from the menu bar.
In the Extension Manager dialog box, click Add.

Figure 431: Using the Extension Manager

518

Free eBook Edition

OpenOffice.org 3.x Writer Guide

3) A file browser window opens. Find and select the extension you
want to install and click Open. The extension begins installing.
You may be asked to accept a license agreement.
4) When the installation is complete, the extension is listed in the
Extension Manager dialog box.

Tip

To get extensions that are listed in the repository, you can open
the Extension Manager and click the Get more extensions
here link. You do not need to download them separately as instep 1 above.

Note

To install a shared extension, you need to have write access to
the OpenOffice.org installation directory.

Using extensions
This section describes a few of the more important and popularextensions to Writer. All are available from the OOo extensions
repository. In each case, you need to first install the extension as
described in the previous section.

Template Changer
Adds two new items to the File > Templates menu that allow you toassign a new template to the current document or to a folder of
documents. All styles and formatting will be loaded from that template
and the document will behave as it was created using that template.
Open source.

Compose Special Characters
Provides a facility for inserting accented and special characters using
key combinations. Adds an entry (Compose Character) to the Insert
menu, which opens a dialog box where you can view the list of key
combinations and choose the keystroke you want to use to run themacro. Once setup is done, simply press the appropriate key
combination, followed by the keystroke to run the macro. Open source.

Professional Template Pack II
Provides more than 120 templates for Writer, Calc, and Impress.
Available in several languages. After you have installed this extension,
you will find the templates under File > New > Templates andDocuments. From Sun Microsystems. Freeware.

Free eBook Edition

Chapter 17 Customizing Writer

519

PDF Import
This extension enables you to make minor modifications to the text ofexisting PDF files when the original source files do not exist or you areunable to open the source files. (Whenever possible, modify the source
and regenerate the PDF to obtain the best results.)
When the extension is installed, PDF is listed as a choice in the File
Type drop-down list in the File > Open dialog box.
Best results can be achieved with the PDF/ODF hybrid file format,
which this extension also enables. A hybrid PDF/ODF file is a PDF filethat contains an embedded ODF source file. Hybrid PDF/ODF files will
be opened in OpenOffice.org as an ODF file without any layoutchanges.
Non-hybrid PDF documents open in Draw. Many PDFs can be edited
and resaved with no problems. However, depending on the complexityof the layout, the fonts used, the graphics included, and other factors,
changes may be difficult to make, font substitution may occur, and thesaved result may not preserve the original layout.
From Sun Microsystems. Open source.

Writer’s Tools
A set of utilities designed to help OpenOffice.org users perform a wide
range of tasks. Using Writer’s Tools, you can back up documents, lookup and translate words and phrases, manage text snippets, and keeptabs on document statistics. Open source.

520

Free eBook Edition

OpenOffice.org 3.x Writer Guide

A

Appendix
Keyboard Shortcuts
Using Writer without a mouse

Free eBook Edition

Introduction
You can use OpenOffice.org (OOo) without requiring a pointing device,
such as a mouse or trackball, by using its built-in keyboard shortcuts.
Tasks as varied and complex as docking and un-docking toolbars andwindows, or changing the size or position of objects, can all beaccomplished with only a keyboard.
OOo has a general set of keyboard shortcuts, available in allcomponents, and a component-specific set directly related to the workof that component. This appendix lists the the default set for Writer.
For general shortcuts, see Appendix A of the Getting Started guide.
For help with OOo’s keyboard shortcuts, or using OOo with a keyboard
only, search the OOo Help using the “shortcut” or “accessibility”
keywords.
In addition to using the built-in keyboard shortcuts listed in thisAppendix, you can define your own. See Chapter 17 (Customizing
Writer) for instructions.

Note

Some of the shortcut keys may be assigned to your desktop
system. Keys that are assigned to the desktop system are notavailable to OOo. Try to assign different keys either for OOo(described in Chapter 17), or for your desktop system (see yoursystem’s documentation).

Choosing menu items using the keyboard
Some of the characters shown on the menu bar are underlined. You
can open the menus by pressing the underlined character together
with the Alt key. Once the menu is opened, you can access menu items
by pressing the underlined character key.

Using shortcut keys in dialogs
When you open any dialog, one element (such as a button, an option
field, an entry in a list box, or a checkbox) is highlighted or indicatedby a dotted box around the field or button name. This element is said
to have the focus on it.
If the focal point is a button, pressing Enter runs it as if you had
clicked it with the mouse. A checkbox is toggled on or off by pressing
the spacebar. If an option field has the focus, use the arrow keys tochange the activated option field in that area. Press the Tab key to go

522

Free eBook Edition

OpenOffice.org 3.x Writer Guide

from one element or area to the next one, or press Shift+Tab to go in
the reverse direction.
Press Esc to close the dialog without saving changes or activating any
commands.

Interrupting macros
To terminate a macro that is currently running, press Shift+Ctrl+Q.

Function keys for Writer
Shortcut keys
F2

EffectOpens or closes the Formula Bar.

Ctrl+F2

Opens the Fields dialog box.

F3

Inserts the AutoText entry corresponding to thetyped shortcut.

Ctrl+F3

Opens the AutoText dialog box, where you can edit
an AutoText entry or create a new entry from theselected text.

F4

Opens or closes the View Data Sources window.

Shift+F4

Selects the next frame.

F5

Opens or closes the Navigator.

Ctrl+Shift+F5

Opens the Navigator with cursor in page number
field.

F7

Starts the spelling and grammar checker.

Ctrl+F7

Opens the Thesaurus.

F8

Turns Extension Selection mode on or off.

Ctrl+F8

Turns field shadings on or off.

Shift+F8

Turns Multiple Selection mode on or off.

Ctrl+Shift+F8

Turns Block Selection mode on or off.

F9

Updates fields.

Ctrl+F9

Shows or hides field names.

Shift+F9

Calculates Table.

Ctrl+Shift+F9

Opens a dialog box for editing input fields and lists.

Ctrl+F10

Displays or hides nonprinting characters.

F11

Opens or closes theStyles and Formatting window.

Shift+F11

Creates a new style from a selection.

Ctrl+Shift+F11

Updates a style.

Free eBook Edition

Appendix A Keyboard Shortcuts

523

Shortcut keys
F12

EffectTurns paragraph numbering on or off.

Ctrl+F12

Inserst or edits a table.

Shift+F12

Turns bullets on or off.

Ctrl+Shift+F12

Turns numbering/bullets off.

Shortcut keys for Writer
Shortcut Keys
Ctrl+A

EffectSelects all content in a document, unless the
cursor is in a table (see “Shortcut keys for tables
in Writer” on page 526).

Ctrl+D

Double underlines selected text or text typed
afterwards. Press again to turn off.

Ctrl+E

Centers the paragraph.

Ctrl+F

Opens the Find and Replace dialog box.

Ctrl+J

Justifies the paragraph.

Ctrl+L

Aligns the paragraph to the left.

Ctrl+R

Align the paragraph to the right.

Ctrl+M

Applies default formatting to the selection.

Ctrl+Shift+B

Subscripts selected text or text typed afterwards.
Press again to turn off.

Ctrl+Shift+P

Superscripts selected text or text typed
afterwards. Press again to turn off.

Ctrl+Y

Redoes last action.

Ctrl+5

Applies 1.5 line spacing to paragraph.

Ctrl+Plus Key(+)

Calculates the selected text and copies the result
to the clipboard.

Ctrl+Hyphen(-)

Inserts a conditional hyphen.

Ctrl+Shift+minus sign(-)

Inserts a non-breaking hyphen (not used for
hyphenation).

Ctrl+Shift+X

Removes direct character formats from selected
text.

Ctrl+/ (slash)Inserts a no-width optional line break.

Ctrl+multiplication sign
* (only on number pad)

Runs macro field.

Ctrl+Shift+Space

Inserts a non-breaking space (not used for
hyphenation and not expanded if text is justified).

Shift+Enter

Inserts a line break without paragraph change.

524

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Shortcut Keys
Ctrl+Enter

EffectInserts a page break.

Ctrl+Shift+Enter

Inserts a column break in multi-column texts.

Alt+Enter

Inserts a new paragraph without numbering.

Alt+Enter

Inserts a new paragraph directly before or after asection or a table.

Arrow Left

Moves cursor to left.

Shift+Arrow Left

Moves cursor with selection to the left.

Ctrl+Arrow Left

Goes to beginning of word.

Ctrl+Shift+Arrow Left

Selects to the left word by word.

Arrow Right

Moves cursor to right.

Shift+Arrow Right

Moves cursor with selection to the right.

Ctrl+Arrow Right

Goes to end of word.

Ctrl+Shift+Arrow Right

Selects to the right word by word.

Arrow Up

Moves up one line.

Shift+Arrow Up

Selects lines in an upwards direction.

Arrow Down

Moves cursor down one line.

Shift+Arrow Down

Selects lines in a downward direction.

Home

Goes to beginning of line.

Shift+Home

Goes and selects to the beginning of a line.

End

Goes to end of line.

Shift+End

Goes and selects to end of line.

Ctrl+Home

Goes to start of document.

Ctrl+Shift+Home

Goes and selects text to start of document.

Ctrl+End

Goes to end of document.

Ctrl+Shift+End

Goes and selects text to end of document.

Ctrl+PageUp

Switches cursor between text and header.

Ctrl+PageDown

Switches cursor between text and footer.

InsertTurns Insert mode on or off.

PageUpMoves up one screen page.

Shift+PageUp

Moves up one screen page with selection.

PageDown

Moves down one screen page.

Shift+PageDown

Moves down one screen page with selection.

Ctrl+Del

Deletes text to end of word.

Ctrl+Backspace

Deletes text to beginning of word.

Ctrl+Shift+Del

Deletes text to end of sentence.

Free eBook Edition

Appendix A Keyboard Shortcuts

525

Shortcut Keys
Ctrl+Shift+Backspace

EffectDeletes text to beginning of sentence.

Ctrl+Tab

Uses next suggestion with automatic word
completion.

Ctrl+Shift+Tab

Use previous suggestion with automatic word
completion.

Alt+W

In the spelling checker dialog box: Calls back theoriginal unknown word into the text box.

Ctrl+double-click or
Ctrl+Shift+F10

Docks or un-docks the Navigator, Styles andFormatting window, or other windows.

Shortcut keys for tables in Writer
Shortcut Keys
Ctrl+A

EffectIf the active cell is empty, Ctrl+A selects thewhole table; otherwise, it selects the contents of
the active cell. Press Ctrl+A a second time toselect the entire table.

Ctrl+Home

If the active cell is empty, Ctrl+Home moves the
cursor to the beginning of the table. Press
Ctrl+Home again to move the cursor to thebeginning of document.
If the active cell is not empty, Ctrl+Home moves
the cursor to the beginning of the active cell. A
second press of Ctrl+Home moves the cursor to
the beginning of the current table. A third press
moves the cursor to the beginning of the
document.

Ctrl+EndIf the active cell is empty, Ctrl+End moves the
cursor to the end of the table. Press Ctrl+End
again to move the cursor to the end of document.
If the active cell is not empty, Ctrl+End moves the
cursor to the end of the active cell. A secondpress of Ctrl+End moves the cursor to the end of
the current table. A third press moves the cursor
to the end of the document.

Ctrl+Tab

Inserts a tab stop (only in tables). Depending on
the Window Manager in use, Alt+Tab may be
used instead.

Ctrl+Shift+Arrow Up

Jumps to start of table.

Ctrl+Shift+Arrow
Down

Jumps to end of table.

526

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Shortcut Keys
Alt+Arrow Keys

EffectIncreases or decreases the size of the column or
row on the right or bottom cell edge.

Alt+Shift+Arrow Keys

Increases or decreases the size of the column or
row on the left or top cell edge.

Ctrl+Alt+Shift+Arrow
Keys

Like Alt, but modifies only the active cell.

Alt+Insert

Provides 3 seconds in Insert mode, during whichtime pressing an arrow key inserts a row orcolumn, or Ctrl+Arrow Key inserts a cell.

Alt+DelProvides 3 seconds in Delete mode, during whichtime pressing an arrow key deletes a row orcolumn, or Ctrl+Arrow Key merges the active cellwith the neighboring cell.

Ctrl+Shift+T

Removes cell protection from all selected tables.
If no table is selected, then cell protection isremoved from all of the tables in the document.

Ctrl+Shift+Del

If nothing is selected, the contents of the next cellare deleted. If cells are selected, the whole row(s)of the selection are deleted. If all rows are
selected completely or partially, the entire table isdeleted.

Shortcut keys for paragraphs and headinglevelsShortcut Keys
Ctrl+0 (zero)

EffectApplies Text Body paragraph style.

Ctrl+1

Applies Heading 1 paragraph style.

Ctrl+2

Applies Heading 2 paragraph style.

Ctrl+3

Applies Heading 3 paragraph style.

Ctrl+4

Applies Heading 4 paragraph style.

Ctrl+5

Applies Heading 5 paragraph style.

Ctrl+Alt+Up Arrow
or Ctrl+Up Arrow

Moves the active paragraph or selectedparagraphs up one paragraph.

Ctrl+Alt+Down Arrow
or Ctrl+Down Arrow

Moves the active paragraph or selectedparagraphs down one paragraph.

Tab

When the cursor is at the beginning of theheading text, moves a heading in format Heading
X (X = 1–9) down one level in the outline. Does
not affect the applied paragraph style.

Free eBook Edition

Appendix A Keyboard Shortcuts

527

Shortcut Keys
Shift+Tab

EffectWhen the cursor is at the beginning of theheading text, moves a heading in format Heading
X (X = 2–10) up one level in the outline. Does notaffect the applied paragraph style.

Ctrl+TabAt the start of a heading: Inserts a tab stop.
Depending on the Window Manager in use,
Alt+Tab may be used instead.

Shortcut keys for moving and resizing
frames, graphics and objects
Shortcut Keys
Esc

EffectCursor is inside a text frame and no text is selected:
Esc selects the text frame.
Text frame is selected: Esc clears the cursor from thetext frame.

F2 or Enteror any key that
produces acharacter on screen

If a text frame is selected: positions the cursor to theend of the text in the text frame. If you press any key
that produces a character on screen, and the
document is in edit mode, the character is appended
to the text.

Alt+Arrow Keys

Moves the selected object.

Alt+Ctrl+Arrow
Keys

Resizes an object by moving the lower right corner.

Alt+Ctrl+Shift+
Arrow Keys

Resizes an object by moving the top left corner.

Ctrl+Tab

Selects the anchor of an object (in Edit Points mode).

528Free eBook Edition

OpenOffice.org 3.x Writer Guide

IndexA
accepting or rejecting changes 107
accessibility features 522
address book 351
address data source 350align cells in table 334
Aligning graphics 289
alphabetic index
adding index entries 393
creating 393
anchoring frames 130
antialiasing screen font 41
appearance options 49
arranging graphics 287, 288
Asian languages 67
Assign action dialog (form) 498
AutoCaption 64, 297
AutoCorrect 69, 84, 98
Autofit 311
autoformat table 334
automatic caption 64, 327
automatic saving 32
AutoText 100
AutoText dialog box 449
AutoText for entering fields 449

B
Base main window 491
bibliographic databaseadding entries 410
columns 407
creating 405
fields 408
filter 407
bibliography
creating 405
creating database 405
editing 417
formating 412
master document 432
paragraph style 414
references 411
book preview 169
booklet printing 170
bookmarks 107, 434, 455
bookmarks. 452
brochure printing 170
Indexbulleted list 85, 86
Bullets and Numbering toolbar 86

C
Caption dialog box 297
captions 296
change tracking options 62
character formatting 84
character styles
undoing 199
citations 411
clipboard 42
closing a document 34
closing Writer 35
color options 45
columnschanging the number 125
defining 122
distributing text evenly 125
formatting 124
newspaper-style 125
separator lines 124
command line, starting Writer 14
comments 103
comparing documents 101, 105
compatibility options 62
complex text layout languages 67
conditional content 460, 461
conditional text 460, 464
convert colors to grayscale 60
counting words 112
create document from template 336
creating a document 28
cross-reference 160
cross-references
between documents 433
in headers or footers 456
inserting references 453
overview 107, 452
preparing headings as targets 433
setting references 434, 455
customizing
keyboard shortcuts 512
menus 504
toolbars 508
cutting and copying text 73

Free eBook Edition

529

D
dashes 79
data source
accessing existing 493
accessing using a form 490
definition 349
registering 350
database
access permissions 498
creating 490
Table Design window 492
Database Wizard 491, 493
default file format 52
default template 342
dictionaries 66
dictionary 92
different first page 117
digital rights management (DRM) 181
digital signature 187
direct cursor 58
DocInformation field 462
docking/floating windows 18
document
closing 34
create from template 336
creating 28
saving 31
saving as a Microsoft Word 32
document status 39
document views 23
double-sided printing 61
drag and drop 271
Drawing Object Properties toolbar 284
drawing objects
grouping 286
properties 284
Drawing toolbar 284
drawing tools 283
duplex printer 61

E
e-mail options 65
e-mailing
Mail Merge Wizard 184
several recipients 184
Writer document as attachment 183
edit document properties before saving
51
Edit Fields dialog box 468
en and em dashes 79
530

endnotes 89, 142
envelope
formatting address blocks 172
Mail Merge dialog box 367
mail merge from database 171
printing 171
envelope printing 171
EPS images in PDF 178
equation editor 502
export directly as PDF 176
exporting to PDF 176
extended tips 33
Extension Manager 341
extensions 518

F
fax icon, adding to toolbar 176, 510
fax sending 176
Fax Wizard 338
FDF 178
features 11
field names, show/hide 459
field shadings on/off 459
fieldsautomatic updating 468
AutoText entry 452
AutoText for entering 449
bookmark 107, 434, 455
bookmarks. 452
converting into text 460
cross-reference 107, 452
DocInformation 462
document properties 447
document title 456
entering 445
fixed content 449, 459
gray background on screen 445
hidden text 465
in headers and footers 456
keyboard shortcuts 459
number range variable 450
page count 458
page number 445, 456
placeholder 468
updating 459
user-defined variable 452, 462
Fields dialog box
Cross-references tab 453, 456
DocInformation tab 448
Document page 448
Document tab 457

Free eBook Edition

OpenOffice.org 3.x Writer Guide

Functions tab: conditional text 464
Functions tab: hidden text 465
Functions tab: placeholder field 469
open using keyboard 459
References tab 435
file locations 44
file sharing options 47
Fill Format mode 191
finding and replacing text 74
floating toolbars 17, 18
font family 59
font history 42
font options 46
font preview 42
font replacements 46
font size, relative 234
fonts, default 59
footnote (or endnote) marker 90
footnote formatting 91
footnotes 89, 141
form
accessing data sources 490
adding form controls 484
configuring controls 477
configuring form controls 487
control formatting options 499
creating 475
customization, advanced 497
data entry form creation 494
database access permissions 498
design mode 476
entering data 496
example of creating a form 484
form controls reference 478
form properties 495
Form Properties dialog 495
inserting form controls 476
linking macro to a control 497
read-only 498
toolbars 475
when to use 474
XForms 500
476
Form Controls toolbar 475
Form Design toolbar 475, 482
form letter
creating with wizard 368
Form Properties dialog 495
Formatting Aids options 58
formatting, finding and replacing 75
Index

frame
anchoring 130
border 130
creating 127
linking 131
moving, resizing, and changing
attributes 128
Frame dialog box 129, 132

G
Gallery
Hide/Show button 276
opening 274
general options 38
general options for Writer 56
GNOME 12grammar checker 92
graphics
adding captions 296
adding from file 271alignment 286
Arrangement 286
linking 272
modifying 276
positioning 286
resizing 280
wrapping text around 290
grid intervals 58

H
headers and footers 146, 456
Help 33, 38
Help Agent 33, 39
hidden paragraphs 461
hidden section 139
hidden sections 461
hidden text 461, 465
Hide/Show button 276
high contrast 39
HTML compatibility 54
HTML documents 59
hyperlinks
editing 111
inserting 108
hyphenation 95
manual 97

Iicon size and style 41
icons in menus 41
image map 300

Free eBook Edition

531

images
adding from file 271
linking 272
resizing 280
scanned 274
wrapping text around 290
indent distance 57
indents 82
index
capitalizing entries 398
creating 393
customizing 396
key 395, 398
sorting entries 398
index entries 393
customizing 395, 398
editing 402
Index Link character style 389
Insert Bookmark dialog box 434, 455
Insert Index Entry dialog 395
Insert Index/Table dialog box 383
Insert Picture dialog 271
Insert Section dialog box 136, 467
interface, Writer 15
Internet Link character style 389

K
KDE 12, 14
KDocker 14
keyboard shortcuts
assigning 512, 522
customizing 512
loading from a file 517
resetting to default values 517
saving to a file 517
select nonconsecutive items 72
keyboard shortcuts for fields 459

Llabel printing 174
labelsprinting 174
landscape page in portrait document120
landscape pages 119, 161
language settings 66
Language Tool extension 92
line numbering 100
lines 85
linking frames 131
Linux 14532

load/save options 50
loading styles 194
locale settings 66
logical expressions 461

M
Mac OS X 12
Macintosh 72
macro
linking to a form control 497
macrosassigning to events 517
mail merge
Adjust Layout dialog 375
Create Salutation dialog 374
edit saved file 362
envelopes 367
Mail Merge dialog 357
Mail Merge dialog box 367
Match Fields dialog 373
New Address Block dialog box 372
overview 349
personalize documents 377
save, print or send 378
Select Address Block dialog box 371
Select Address List dialog box 370
Mail Merge dialog box 357, 367
mail merge e-mail options 65
Mail Merge Wizard
e-mailing Writer document 184
mailing labels 358
marginal notes 133
margins, changing 121
master document
anchoring pictures to page 442
bibliography 432
breaking links 438
changing styles 432
chapter reference in header 439
combining several documents 422
creating 421
creating one file 437
cross-referencing between
subdocuments 433
editing 432
editing subdocuments 433
exporting to .odt file 437
index 432
landscape pages in portrait document
441
Navigator 420

Free eBook Edition

OpenOffice.org 3.x Writer Guide

no existing documents 422
planning 424
splitting one document 421
styles 419, 424
subdocument creation 426
subdocument inclusion 428
table of contents 432
template 424
title page 427
Match Fields dialog 373
mathematical equations 502
measurement unit 83
memory options 40
menus 16
adding commands 507
creating 505
customizing 504
modifying 506
modifying entries 507
merge cells in table 333
merging and splitting cells in table 314
merging documents 105
Microsoft Office file conversion 53
Microsoft Word 12, 32, 62
middle mouse button function 42
More (Form) Controls toolbar 475, 480
mouse positioning 42

Nname and initials of user 37
Navigator
in master document 420
in normal document 23
nested tables 307
New Address Block dialog box 372
newsletter layout 115
Next Style 118
non-breaking hyphen 79
non-breaking spaces 79
Number Format dialog box 135
number range variable 450
number recognition 61, 135, 321
numbered lists 85, 86
numbering pages 150
numbering pages by chapter 154
numbering sequence, defining 450

O
ODF plugin (Sun) 32
Office Assistant 39
Open/Save dialogs 39
Index

organizing templates 345
orientation of page 119
overwrite mode 112
OXT extension 341

Ppage break, manual 116
page count in header or footer 458
page count, problem 159
page layoutchoosing best method 114
different first page 117
headers and footers 146
landscape page 119
landscape page in portrait document
120
margins, changing 121
newsletter 115
orientation 119
portrait headers on landscape pages
147
snaking columns 115
using columns 122
using frames 126
using sections 136
using styles 116
using tables 133
page number
automatic 150
numbering by chapter 154
odd and even 158
restarting 156
restarting, problems 158
page numbers 445
page styles 116
paragraphformatting 80
spacing at tops of pages 63
paragraph ends 58
paragraph markers 126
paragraph styles
conditional 241
finding and replacing 76
next style 209
outline levels 215
password protection 31
password-protect PDF 182
pasting text 73
path options 44
PDF
blank page export 179

Free eBook Edition533

digital rights management (DRM) 181
Linux 14
encrypt 181
Windows 13
EPS images 178
R
export documents to 176
image compression and resolution 178 read-only forms 498
recording changes 101, 102
initial view selection 179
redlines 102
pages to export 177
redo 34
password-protect 182
regular expressions 76
security settings 181
rejecting changes 103
tagged 178
relative font size 234
user interface settings 179
replacement table (font) 46
PDF import 520
reverse order printing 61
PDF Options dialog 177
revision marks 102
picturesrulers 20, 82
adding 302
rulers, changing margins 122
adding from file 271
linking 272
S
resizing 280
Save 32transparency 278
scaling factor 41
wrapping text around 290
scanner 274
placeholder field 468
screen font antialiasing 41
preview of fonts 42
searching in Japanese 67
Print dialog box 166
sectionprint file directly 166
boundaries 49
print options 43, 60
conditional 466
printer metrics 63
creating 136
Printer Options dialog 167
deleting 143
printer settings 51
editing the format 144
printer warnings 43
hidden 466
printing
hiding 139
black and white on color printer 168
linking 137
book preview 169
links, updating 144
booklet 170
naming 137
brochure 170
password-protecting 138
choosing what to print 166
saving 142
default settings 168
uses of 136
envelopes 171
write-protecting 138
grayscale on color printer 169
security 31
labels 174
security options 47
previewing 169
Select Address Block dialog box 371
print options 167
Select Address List dialog 371
printer selection 166
Select Address List dialog box 370
Professional Template Pack extension
selecting text 71
519
selection clipboard 42
Properties dialog 477
send document as e-mail 183
Properties dialog box 446
shared extension 519
protecting a document 102
shortcut keys 522
Qsideheads 133
size optimization 52
Quickstartersnaking columns 115
enabling 40
534

Free eBook Edition

OpenOffice.org 3.x Writer Guidesnap to grid 58
sorting data in a table 334
spacing at tops of pages 63
spacing between paragraphs and tables
63
special characters 78
spelling 91
spelling options 68
split cells in table 334
spreadsheet functions in table 323
starting Writerfrom an existing document 12
from the command line 14
from the system menu 12
preloading OOo under Linux/KDE 14
Quickstarter 13
Style dialog box 204
stylesassigning to shortcut keys 513
creating by drag and drop 195
creating from selection 192
loading from template or document
194
next style 209
relative font size 234
tab stops 238
updating from selection 193
Styles and Formatting window 191
subdocuments 421, 425, 426
sum cells in table 334
superordinate object settings 320
system font for user interface 41
system menu, starting from 12T
tab stops 57, 82, 238
tableallow to break across pages 319
autoformat 334
automatic caption 327
background colors and graphics 316
borders 314
boundaries 49, 318
caption 325
heading 306
linking graphic file 318
merging and splitting 314
nested table 307
number recognition 321
page layout using 133
page or column break 319
Index

properties 306
resizing rows and columns 311
rows 313
sort cells 334
spacing at tops of pages 63
spreadsheet functions 323
sum cells 334
text flow 319
Table Design window 492
Table Format dialog box 135
Table Format dialog box
Text Flow tab 120
Table menu and toolbar 332
table of contents
accessing from the Navigator 392
adding elements 388
background 391
changing number of levels included
384
character styles 389
columns 391, 401
creating 381
creating from additional styles 385
creating from an outline 385
creating from index marks 386
customizing 382
deleting 392
editing 391
formating entries 387
graphic in background 163
hyperlinking entries 388
including chapter numbers 388
Index Link character style 389
Internet Link character style 389
paragraph style 390
protecting against manual changes
384
scope 384
Tab position relative to Paragraph
Style indent 389
updating 392
table options 61
tear-off toolbars 17
template
create document from 29, 336
creating from document 337
creating using wizard 338
deleting 346
description 336
editing 339

Free eBook Edition535

exporting 347
Extension Manager 341
folders 345
importing 346
moving 345
organizing 345
setting a default 342
update document styles from 340
Template Changer extension 519
text boundaries 49
text flow in tables 319
text size in user interface 41
text wrapping 290
theme, Gallery 302
thesaurus 95
toolbars 16
adding commands 509
choosing icons for commands 509
creating 512
tooltips 33, 38
tracking changes 101, 102transparency 278
two-digit years 39

U
undo 34
unsaved changes flag 21
update fields and charts automatically57
update links when loading 56

536

updating fields 459
URL Recognition 108
User Data options 37
user-defined variable field 452
user-specific settings 51

Vvariables 462
view options 40
View options for Writer 57

W
What’s This? help 33
Windows 12
wizardAddress Data Source 350
Mail Merge 368
word completion 99
word count 112
workspace 15
wrap off 290
wrap through 295
wrapping text around graphics 290

X
XForms 500
XML 52Y
year (two digits) 39

Free eBook Edition

OpenOffice.org 3.x Writer Guide