Page context

The Page context field enables you to define mappings applicable to specific areas on the output page. For example you might want a heading capitalized in the text area of the page, but left in mixed case in a header.

A mapping page context may be required if you need to disambiguate mappings that share the same attribute or occurrence qualifier.

There are four possible values:

  • $document — applies anywhere (the default).

  • $headfoot — applies within headers and footers;

  • $float — applies within float objects;

  • $note — applies within footnotes, sidenotes, and running heads;

Mappings that apply to the normal in-column text are of type $document, which has a lower precedence than the other types. It is therefore possible to declare a standard tag mapping, and a separate mapping that applies only within notes or headers/footers.

For example consider a title which must be all upper case in the main text, but mixed upper and lower in a running head. To do this declare two mappings for <title>, one of type $document which forces to all caps, and one of type $note which doesn't. The second mapping would appear as $note//title in the selector box, where $note and $headfoot are special system markers which are temporarily in force during the setting of notes and headers/footers. Note that the first mapping is title (not $document//title) as $document is the default page context.

It is important to remember that footnotes, sidenotes, running heads/feet, floats, and headers/footers are set in a special context which is completely separate from that which applies to in-column text. For this reason, mappings of type $note, $float or $headfoot do not normally have parents or ancestors specified in the Tag in context box.

If you do specify ancestors, then those ancestors must all be contained within the same note or header/footer as the element being mapped, otherwise the mapping will never be called.