On Mon, Mar 06, 2006, Robert Thorsby wrote: > I have started playing with mom and like her. Is there any way to use > mom with **both** headers and footers in the one document? If so, can > anyone point me in the right direction. By default, no. From the documentation:
+---------------------------------------------------------------+ | Please note that headers and footers are mutually exclusive. | | If headers are on, footers (but NOT bottom-of-page numbering) | | are automatically turned off. Equally, if footers are on, | | headers (but NOT top-of-page numbering) are automatically | | turned off. | +---------------------------------------------------------------+ There is a way around this, using groff's .am request, but there's a catch: you must define HEADER_LEFT/CENTER/RIGHT and FOOTER_LEFT/CENTER/RIGHT plus any style changes you want for the various parts of headers and footers in the places marked inside the .am requests in the recipe below. ---Recipe for getting both headers and footers; must come before START--- .\" If you don't want a footer on page 1, comment out the next two .\" lines. If you do want a footer on page 1, leave them as is. .FOOTERS .FOOTER_ON_FIRST_PAGE .\" .am START . if r#PAGINATE .rr #PAGINATE . if \\n[#HEADERS_ON]=1 \{\ . HEADER_LEFT "Header Left . HEADER_CENTER "Header Center . HEADER_RIGHT "Header Right .\"***Add any header style changes above this comment line.*** . \} . if \\n[#FOOTERS_ON]=1 \{\ . FOOTER_LEFT "Footer Left . FOOTER_CENTER "Footer Center . FOOTER_RIGHT "Footer Right .\"***Add any footer style changes above this comment line.*** . \} .. .\" .am PRINT_HDRFTR . if \\n[#FOOTERS_ON]=1 \{\ . rr #FOOTERS_ON . nr #HEADERS_ON 1 . if r#PAGE_NUM_V_POS .rr #PAGE_NUM_V_POS . HEADER_LEFT "Header Left . HEADER_CENTER "Header Center . HEADER_RIGHT "Header Right .\"***Add any header style changes above this comment line.*** . \} .. .\" .am HEADER . if \\n[#HEADERS_ON]=1 \{\ . if r#START_FOR_FOOTERS .rr #START_FOR_FOOTERS . rr #HEADERS_ON . nr #FOOTERS_ON 1 . if r#PAGE_NUM_V_POS .rr #PAGE_NUM_V_POS . \} . FOOTER_LEFT "Footer Left . FOOTER_CENTER "Footer Center . FOOTER_RIGHT "Footer Right .\"***Add any footer style changes above this comment line.*** .. ---End recipe for getting both headers and footers--- I'm interested to know how you intend to use the combo of headers and footers. If your situation is a common one, I may macro-ize the above to save other users the trouble. -- Peter Schaffter Author of _The Schumann Proof_ (RendezVous Press, Canada) http://faustus.dyn.ca _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff