headers

The headers function gives the script developer the ability to specify the headers for the current section of the document.

 @(headers (first; odd; even))

The result of the headers function is of type TEXT.

This function has no effect on the AiaDocXML and HTML output.

This function has three parameters:

  1. first, type TEXT. This is the content for the header on the first page. The content depends on the specific word processor you use to develop a Master Template.
  2. odd, type TEXT. This is the content for the headers on odd numbered pages. The content depends on the specific word processor you use to develop a Master Template.
  3. even, type TEXT. This is the content for the headers on even numbered pages. The content depends on the specific word processor you use to develop a Master Template.

The result of the function headers is of type TEXT. The output of this function has effect at the location where it is put into the result document.

If the result of multiple calls to the headers function is put in the same section, only the last result has impact on the section.

An example is provided here.

# BEGIN 
 
#
@(headers ("First page header"; ""; "Even page header containing two lines of text.")
#

END #

The option "Different first page" in the Microsoft Word GUI controls whether the first page header is shown on the first page. If this option is disabled in a section, the first page header is not shown, though it is present in the result document.

The option "Different odd and even" in the Microsoft Word GUI applies to the complete document and is controlled by the setting from the Template script. It can be changed with the pagestyle function (see pagestyle) or the pragma function (see pagestyle).

All headers must end with a paragraph break. As Microsoft Word accepts headers that do not end with a paragraph break, the behavior is undefined.

You can disable a header by specifying an empty string for that header. This takes up the white space around the headers compared to a header that is empty. This feature is not available in the Microsoft Word GUI.