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) or the Insert > Fields menu entry.
- You can insert a cross-reference to a bookmark, heading, or other item.
- If you have used Heading 1 for your chapter titles, you can use a document field to insert the current chapter title, so the headers or footers contents changes from one chapter to the next. (Writer calls chapter titles Chapter names.) If you have used outline numbering on your Heading 1, you can choose whether to include these numbers in the field (Chapter number and name).
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 Level box in the lower right of the Document page of the Fields dialog box. That is, Level 1 = Heading 1, Level 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 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 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.