I am preparing a template, in which I need: (1) a custom title page (generated separately) (2) a custom abstract page with very big footer and no page number (3) the rest of the document with fancy footer (in particular, including page number) and header.
To achieve (2), I used \newgeometry and \restoregeometry. However, the page number is placed in correct position only from page 4 onwards, but page 3 has 'wrong' bottom margin size. Any attempts to fix it only wrosen the situation (e.g. align ALL page numbers with the 'incorrect' one).
Here is my MWE (at least I hope it's minimal):
\documentclass[11pt,a4paper,twoside=semi]{scrartcl}
\usepackage{graphicx}
\usepackage[top=4.79cm, bottom=2.5cm, left=1.5cm, right=1.5cm]{geometry}
\usepackage{eso-pic}
\usepackage{afterpage}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{lipsum}
\begin{document}
\title{Some stuff on title page}
\maketitle
\clearpage
\afterpage{
\newgeometry{bottom=8cm}
\pagenumbering{gobble}
\newcommand{\FooterDisclaimer}{%
{\parbox[c][5cm]{\textwidth}
{very long message in footer
}
}
}
\chead{}
\cfoot{\FooterDisclaimer}
Some stuff on the second page with different footer
\restoregeometry
}
\clearpage
\thispagestyle{scrheadings}
\pagenumbering{arabic}
\setcounter{page}{3}
\clearpairofpagestyles
\cfoot{\pagemark}
\section{Test}
\lipsum[1-20]
\end{document}

\afterpage, instead use\clearpage\newgeometry{bottom=8cm}<contents of your abstract>\clearpage\restoregeometry– Skillmon May 14 '18 at 07:22\restoregeometryhas to be called in\AfterEndEnvironmentfor example. – mforbes Mar 20 '22 at 08:31