The $document mapping

The $document mapping defines a set of default values for properties such as typeface, font size, paragraph alignment, widow and orphans, and text directionality. In XPath terms it corresponds roughly to /, which is the root node of the document as a whole.

It is important to note that the $document mapping is not only applied at the start of each job, but also whenever page headers, page footers or notes are being set. This ensures that the setting of these objects is consistent from one page to the next. For example, a footnote inherits its font state from the $document mapping, not from its referring paragraph or the paragraph immediately above it.