# Different footer heights for odd and even pages

I want to use LaTeX to typeset a multi-page contract; in such contracts it's a common practice for parties to sign all pages, except the last one where “main” signatures are written.

However, signing each page of a long contract (for example, the one verbosely describing technical details of the work under the agreement) is hard; it's okay to print contract two-sided and let parties sign each paper sheet instead.

So, the question itself is: how can I set up different footer heights for odd and even pages? I want my even pages have a bit more free space for signatures and stamps. Moreover, if the page with main signatures happened to be odd, its footer should be narrow, not wide.

Is there a way to achieve this layout?

• Do you really need a footer, or just some blank space at the end of each even page? I would use frowfram for the former, and afterpage and a bottom float for the latter. – John Kormylo Feb 4 '17 at 23:07
• Please provide code in the form of a minimal example showing your basic document set up as your class and any packages used to affect to page layout will partly determine the best way to do it. Right now, this isn't worth answering as the chances of any proposed solution actually being what you need are relatively low. – cfr Feb 5 '17 at 0:43
• Do you mean if the signature page is even? If it is odd it will be small already. What determines which is the signature page? – cfr Feb 5 '17 at 0:45
• @cfr: Sorry for long delay. I meant that every contract has a page where "main" signatures are to be put, and if this page is even, it does not have to have two sets of signatures. The only reason to have intermediate signatures is to make contract pages irreplaceable: if one party decide to replace a page of already signed contract, they have to craft a fake signature and stamp of the other party. – firegurafiku Feb 10 '17 at 20:09

You can use package everyshi. In the next example, the text-height of every even page is reduced by 1cm.

\documentclass[twoside]{article}

\usepackage{everyshi}
\makeatletter
\if@twoside
\EveryShipout{\ifodd\c@page\enlargethispage{-1cm}\fi}
\fi
\makeatother

\pagestyle{empty}

\begin{document}

...

\end{document}

• Well thought! The \enlargethispage command will put an \insert\@kludgeins in the list being constructed by the output routine, so that it will be appended to the main vertical list at the top of the new page, as if the command had been issued there. – GuM Feb 5 '17 at 5:00

Essentially the same answer as @user94293’s, but a little “lighter”, in that it doesn’t redefine the \shipout primitive (through the everyshi package), but just adds the necessary code at the end of \@outputpage:

\documentclass[a4paper,twoside]{article}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
% \usepackage{showframe}

\makeatletter

\if@twoside
\ifodd\c@page \else % now \c@page has already been incremented
\fi
}
\fi

% % Uncomment the following lines to see what actually happens:
% \newtoks\my@OutPut
% \my@OutPut = \output
% \output = {%
%   \the\my@OutPut
%   \showboxdepth = \sixt@@n
%   \showlists
% }

\makeatother

\begin{document}

\lipsum[1-64]

\end{document}


I've managed to get the quick-and-dirty solution by using the changepage package. My solution is provided below:

\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage[strict]{changepage}
\usepackage{fancyhdr}

\fancypagestyle{pagesnormal}{%
\changepage{3cm}{}{}{}{}{}{}{}{3cm}%
}
\fancypagestyle{signaturepage}{%
\changepage{1cm}{}{}{}{}{}{}{}{1cm}%
}

\fancypagestyle{plain}{%
\checkoddpage
\ifoddpage
\thispagestyle{pagesnormal}
\else
\thispagestyle{signaturepage}
\fi%
}

\begin{document}
\pagestyle{plain}

\lipsum
\newpage
\pagestyle{plain}
\lipsum

\end{document}


The only problem with my solution is that you have to execute \pagestyle{plain} on every second page as it seems that my odd/even page check has to be improved. If you want the last page to be the signature page, you can issue the command \thispagestyle{signaturepage}.

I hope this will guide you to the final solution.