Documentation/OOoAuthors User Manual/Writer Guide/Using fields in headers and footers

From Apache OpenOffice Wiki
Jump to: navigation, search



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 Using document properties to hold information that changes).
  • You can insert a cross-reference to a bookmark or a set reference.
  • If you have used Heading 1 for your chapter titles, you can use a document field to insert the current chapter title, so it changes from one chapter to the next. See figure below, which calls chapter titles “names”. If you have used outline numbering on your Heading 1, you can choose whether to include these numbers in the field.
Inserting the current chapter name and number
Inserting the current chapter name and number into your document.
  • You can insert cross-references to other heading levels by specifying a value in the Layer box in the lower right of the Document tab of the Fields dialog box. That is, Layer 1 = Heading 1, Layer 2 = Heading 2, and so on. A cross-reference field in the header of a page picks up the first heading 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. Click Insert > Fields > Other. On the Document tab 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 the character you want to appear between the chapter number and the 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 and Tables menu item, as described in Chapter 12 (Creating Tables of Contents, Indexes, and Bibliographies).
  • You can add a page count to the footer—for example “Page 9 of 12”. 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 click Insert > Fields > Page Count.
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY).
Personal tools