About Arbortext Styler > Creating Headers and Footers > Inserting Division References in Headers and Footers
Inserting Division References in Headers and Footers
You can insert division references, such as chapter title, in Generated Content objects. This is especially useful when referenced from page regions that represent headers and footers. This allows you to set the division information that displays in headers and footers to change dynamically as the divisions change in a document.
Example: Inserting a Division Reference in a Header
The example given below adds a division reference to a header region. The number of the current chapter will display in the header. The example assumes that the stylesheet is configured to include numbered divisions, for example numbered chapters.
1. In the Generated Contents list The Generated Contents list icon - a text box containing lines of text, create a new Generated Content object and name it divnumbered-header.
Refer to Adding Content to a Header or Footer for an example of how to create content for a header or footer.
2. Highlight divnumbered-header then click the Edit button in the properties area to open the Generated Text Editor. Place your cursor in the middle cell of the table, then choose Insert > Division Reference. The Insert Division Reference dialog box opens.
3. Select chapter in the All divisions field. Select the required cross reference format from the Cross reference format list. Click OK to save the changes and exit the dialog box. Arbortext Styler will add the object DivisionReference into the cell.
This is an image of the DivisionReference element in the middle cell of the heading table in the Generated Text Editor
Note that the All divisions field displays a list of all the divisions configured for your stylesheet, if applicable. For example, if your stylesheet defines three levels of the section element, the following entries will appear in the field: section, section in section, and section in section in section. You are permitted to select any of these recursive divisions to form the target of your division reference.
4. Add any text you would like to appear either side of the division reference.
5. Choose File > Apply and Close to save the change and exit the Generated Text Editor. You will see that the read only field in the properties area of the Generated Contents list describes the generated text settings you have made for the Generated Content object.
You have now configured the content for your Generated Content object.
6. Assign the Generated Content object divnumbered-header to the page region representing your header.
7. If you have not already done so, assign the page region representing your header to the page type representing the layout of the pages that should display your header.
8. Assign the page type to the relevant page set, if you have not already done so.
9. Choose the Preview > Print menu option. You will see that the header is displayed on the relevant pages of the previewed document.
Inserting a Division Reference to a Title that Contains Footnotes
If you insert a division reference into your header or footer where the target title contains footnotes, you may encounter error messages of the form shown below when publishing your document:
[A12531] ERROR: Styldesc counter variable "cnt__footnote_default_footnotes.cnt"
is modified in the pagedesc.
You will also see the footnote reference in the header, but generally no footnote will appear on the page.
To avoid this situation, create the context footnote anywhere in _sfe:xxxx for the relevant generated text element. Navigate to the Footnote category for the context and check the Element is not footnote related property. This will delete the generated context for Footnote body and will set the value of Hidden to No for the context, which is now the only context. Reset the value of Hidden to Yes here to avoid the error.
For example, if you create the context footnote anywhere in _sfe:HeaderOrFooter, it will be matched for footnotes in headers and footers and the footnote reference will not appear when the title appears in a header or footer. As another example, you could create the context footnote anywhere in _sfe:Gentext. In this case you will ensure that footnote references will be hidden when the title appears in headers, footers, tables of contents, and cross references.
This issue will only occur if you are publishing print/PDF output via the FOSI engine.