Headers and footers in compiled docs

Where do I define what is to appear in headers and footers in a new compile format I have just made?

headers and footers