Page Numbering, Fields, Variables and Cross References
As we have already seen in the section devoted to the headers/footers the page number must be inserted as a "field" with Insert → Field. On this menu other fields are available (Date, Author...).
Fields can not only show the page number or the total page count of the document, but are also able to show cross references to a heading or a footnote, information about the document (the chapter name or its number, the template in use, editing time, number of revisions...) as well as set a condition to hide a part of the content. With fields it is possible to set sequences to use automatically numbered figures or tables, or even show information taken from a database.
Because the content is automatically generated, during the editing of the document Writer shows the fields with a grey background that will not print nor be exported to PDF. This background, whose color can be changed (or even completely eliminated) on Menu → Options → Apache OpenOffice → Appearance → Text Document → Field shadings is very useful during editing because it allows one to distinguish between normal and automated text.
Now, we will review all the possibilities offered by fields in Writer. To do this, open the menu Insert → Fields → Others
Document TabOptions on this tab are quite clear. You select a field type on the left panel (for example, Page), on the middle panel the variant (Page number for the actual page, the previous page or the next one) while on the right panel you choose the configuration options.
|It is important to note that if you insert a page number and select on the right panel a format different from the format set on the page style (for example, the page style is set as Arabic numerals and you choose Roman numerals) this will not change the numbering, it only will change its appearance. This is the same with the "Offset" options that adds or subtracts a quantity to the real page number.
This means that if we insert the table of content afterwards, the real number and not the "corrected" one will be shown there. To obtain pages with Roman or other kind of numeral the best way is to set that on the page style.
To change the page number, instead of the offset we need to insert a page break with change of page style, selecting to restart the numbering.
It is then recommended leaving the format on "As Page Style" and to not use the offset.
Here it is possible to make references to any heading in the document, any footnote or endnote, to the pictures or tables with caption, to the numbered paragraphs...
Here it is also possible to "tag" text or any other element in the document (picture, object, frame...) to reference later. Under "Insert reference to" it is possible to choose what we need to show: the page number on which the element is inserted, the name or number for the chapter, the text of which we are referencing, if the element is before or after the point were the reference is inserted, etc.
The options under "Type" are:
- Set Reference: selecting an element or text in the document, Set Reference will "tag" it assigning to it a name.
- Insert Reference: here there is a list of all the elements tagged with the previous option.
- Headings: the list of all headings in the document. We will come back to this when discussing Outline Numbering.
- Numbered Paragraphs: every paragraph with an associated numbering, either as direct formatting or through numbered styles, will be listed here.
- Footnotes/Endnotes: the list of all footnotes or endnotes.
- The different variables defined on the document: see below.
Variables are used to store simple text or a numerical value. Numerical variables can be also used as sequences: each time a sequence is inserted its value grows.