% Our variation on \plainoutput, which manages inner/outer margins and overlays
\output{\ucwoutput}
+\newdimen\pagebodydepth
\def\ucwoutput{\wigglepage\shipout\vbox{%
\makeheadline
\ifvbox\commonunderlays\copy\commonunderlays\nointerlineskip\fi
\ifvbox\pageunderlays\box\pageunderlays\nointerlineskip\fi
\pagebody
- \ifvbox\commonoverlays\vbox to 0pt{\vskip -\vsize\copy\commonoverlays}\fi
- \ifvbox\pageoverlays\vbox to 0pt{\vskip -\vsize\box\pageoverlays}\fi
+ \pagebodydepth=\prevdepth
+ \nointerlineskip
+ \ifvbox\commonoverlays\vbox to 0pt{\vskip -\vsize\copy\commonoverlays}\nointerlineskip\fi
+ \ifvbox\pageoverlays\vbox to 0pt{\vskip -\vsize\box\pageoverlays}\nointerlineskip\fi
+ \prevdepth=\pagebodydepth
\makefootline
}\advancepageno
\ifnum\outputpenalty>-\@MM \else\dosupereject\fi}