Suppose you want to have a simple header or footer containing only a page number, visually separated from the main text by a thin line—but you don’t want the line to extend the full width of the footer area. Here’s how to do it.
Define the Footer paragraph style to have indents before and after the text, a center alignment, and a border above the paragraph. The figure below shows an example of the settings and the next one shows the result.
You can also place images in the header or footer, include document information (such as the book’s title or author), and use a table so you can have more than one line of text, aligned in different ways (left, right, or center).
Including document information
In addition to page numbers, headers and footers often include document information such as the book’s title or author or the name of the chapter.
You can type book titles, authors’ names, and other unchanging information into the header or footer, or you can use a field. Some information, such as the name of the chapter or section, changes from one chapter or section to the next; in this case, you need to use a field that displays information relevant to each page.
To include the chapter name in a header or footer:
- Put the cursor in the header or footer and click Insert > Fields > Other (or press Control+F2) to open the Fields dialog.
- On the Document tab, select Chapter in the Type list and Chapter name in the Format list.
- Make sure that Level is set to 1, and then click Insert.
The Chapter field uses the hierarchy of headings defined in the Outline Numbering dialog (which also determines which headings go into a table of contents; see page 116). The Level box determines which heading (outline) level is displayed in the field. For example, Level 1 always displays the most recently found heading that has the paragraph style selected for Level 1 in the Outline Numbering dialog, Level 2 displays the most recent heading with the paragraph style selected for Level 2 in outline numbering, and so on.
A Chapter field in a page header always picks up the highest heading level on a page, even if you have specified a lower level. For example, if a page has a Heading 1 and a Heading 2 on it, then a Level 2 Chapter name field in the header of that page will display the Heading 1 paragraph, not the first Heading 2 paragraph, as intended. In a footer, the layers work as intended.
Using a table to align text in headers and footers
If one or more of the items to be included in the header or footer is too long to fit in the space available, or you need more than one line of information, you can use a table for layout (within the header or footer area), as shown below. The contents of each cell can be aligned to the left, center, or right, independently of the other cells.
Place the cursor in the footer area and choose Insert > Table from the menu bar. Choose the number of rows and columns required, and click OK. A typical arrangement would be 3 columns, 1 row, as shown in the example.
This book is licensed under the terms of the Creative Commons Attribution License, version 3.0.