How can I write a document class to place page numbers one inch from the bottom on pages with a chapter heading and place the text body one inch from the bottom on pages without a chapter heading (with page numbers in the header instead)?
I'm voluntarily creating a thesis class for my university so that future students don't have to worry about the formatting and layout of their theses if they choose to write them in LaTeX. The university thesis guide requires that if a page includes a chapter heading then the page number should be 1 inch from the bottom of the page but if a page does not contain a chapter heading then the page number should appear as specified by the appropriate style guide.
So far this is easily implemented by using the
geometry package with the appropriate margins and the
includeheadfoot option (like in this question) and then specifying an appropriate default pagestyle (since pages with chapter headings will override with
plain pagestyle as desired).
The catch is that the thesis guide also requires that if a page number is not on the bottom then the text body must be 1 inch from the bottom of the paper instead. Since all the style guides (APA, MLA, Chicago/Turabian, etc.) suggest putting page numbers in the header, for me this means a page number is in the footer if and only if the page has a chapter heading.
Perhaps if I could somehow modify the geometry of pages that have chapter headings to use the
includefoot option while other pages default to a geometry without that option, I could solve my problem. The accepted answer to this question about changing geometry for a single page gave me the idea to patch
\pretocmd like so:
The only issue with this approach is I don't know how to restore geometry on subsequent pages of a chapter, especially since I won't know the contents of chapters.
% Remove includefoot option above and uncomment lines below to see patch attempt.
Page number on this page should be in the footer and 1in from the bottom of the page. Page number on the next page should be in the header and 1in from the top of the page and last line of text on the next page should be 1in from the bottom of the page.\par