Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

OpenOffice Writer 3.x Guide
Previous Page Home Next Page

Including a chapter reference in the header of the first page

The problem

If you use the method described in Step 5. Insert the subdocuments into the master document (putting a page break paragraph into the master document between the subdocuments), and you put a cross-reference to the chapter name and 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 name and number from the previous chapter. This happens because with this method the first (blank) paragraph on those pages is actually the last paragraph of the previous chapter. The example did not include a cross-reference to the chapter name and number in the header of the first page, so it did not have this problem.

First page footers do not have this problem; they correctly pick up the current 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.
  2. Modify the style for the chapter title (usually Heading 1) to enable a page break before, using the page style you want for the first page of each chapter. Save and close the template.
  3. When you reopen the master document, it should ask two questions: “Update all links?” and “Your styles don’t match the template. 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 master document.
  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 the correct 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 Writer how many pages to subtract to make the first page of the first chapter to be page number 1. Of course, to make 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 the entire book. If you add or delete some pages (for example, if the table of 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 the cursor just in front of the Page field on the first page of the first chapter. Right-click and choose Fields from the pop-up menu.
  2. In the Edit Fields dialog box, type a negative even number (–2, –4, etc.) in the Offset box. Click OK to save this change.
  3. Using an offset to start at a different page number.
  4. You might need to make the same change on the second page of the first chapter.

OpenOffice Writer 3.x Guide
Previous Page Home Next Page

 
 
  Published under the terms of the Creative Commons License Design by Interspire