About Arbortext Styler > Cross References and Other Links > Modifying Default Cross Reference Formatting
  
Modifying Default Cross Reference Formatting
There are two Styler Formatting Elements for formatting cross references, _sfe:CrossReference and _sfe:CrossReferenceTitle. The _sfe:CrossReference element wraps the entire cross reference, while the _sfe:CrossReferenceTitle element wraps text extracted from the target's title when text is included in the cross reference format (for example, the Label Number Text format).
You can change the properties of the _sfe:CrossReference element to change the formatting of the entire cross reference. Change the properties of the _sfe:CrossReferenceTitle element if you only want to change the title text formatting.
Example: Changing the Formatting of Arbortext Styler Cross Reference Elements
1. In Arbortext Styler, deselect the View > Only Elements In Document option to list all elements in the stylesheet, rather than just those that have been used in your document.
2. Select the xref element in the Elements list, and style it as a Cross Reference via the Edit > Style menu option.
3. In the Cross Reference Details dialog box, choose linkend as the Reference attribute.
4. Choose Label Number Text Page as the format, then click OK.
5. In Arbortext Editor, add a new para within abstract, and add the content Refer to <xref> for further information
This graphic illustrates the sentence added to the axdocbook sample document. It is the sentence “Refer to xref for more information”, which is the content of para tags.
6. Select the xref tag, and choose Edit > Modify Attributes.
7. Type intro in the linkend field, then click OK.
8. Click to the right of the first chapter element in the document, then choose Edit > Modify Attributes.
9. Type intro in the id field, and then click OK.
10. In Arbortext Styler, select the chapter element in the Elements list, choose Division as its style, then click OK in the Division Details dialog box.
11. Select the title in chapter context for the title element in the Elements list, then go to the Generated text category.
12. Click Details in the Bullets and Numbers field.
13. Type Chapter followed by a space in the Label field, and then click OK.
14. Choose Preview > Print.
In the Print Preview window, note that the second paragraph in the document now has the following cross reference: Refer to Chapter 1 Introduction, page 2 for more information.
15. In Arbortext Styler, check the View > Styler Formatting Elements menu option to ensure that all Styler Formatting Elements (SFEs) defined for the stylesheet are displayed in the Elements list.
16. Select the _sfe:CrossReferenceTitle element, and go to the Text category.
17. Change Italic to No.
18. Specify Red as the Text color and set Bold to Yes.
19. Choose File > Print Preview.
In the Print Preview window, note that the title text, Introduction, in the cross reference in the second paragraph is now bold and red. To have the whole of the cross reference text displayed in bold red font, carry out steps 16–18 but choose the SFE _sfe:CrossReference in step 16.
Cross Referencing a Title that Contains Footnotes
If you elect to create a cross reference to a title that contains footnotes, you may encounter error messages of the form shown below when composing your document:
[A12531] ERROR: Styldesc counter variable "cnt__footnote_default_footnotes.cnt"
is modified in the pagedesc.
You will also see the footnote reference with the title in the cross reference text, and a footnote will appear on the page.
To avoid this situation, create the context footnote anywhere in _sfe:xxxx for the relevant generated text element, and set the value of the Hidden field in the Text category to Yes for that context. For example, if you create the context footnote anywhere in _sfe:CrossReference, it will be matched for footnotes in cross references and neither the footnote reference nor the footnote will appear when the title appears in the cross reference text. 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.