[Tex/LaTex] scrlayer-scrpage: Footer only on first page, adjust geometry

geometryheader-footerkoma-scriptscrlayer-scrpage

I have a problem during the re-creation of a Word template concerning scrlayer-scrpage and possibly the geometry package inside a KOMA-script document class.

My template has a constant header in the whole document and a footer, but only on the first page. Usually, this is no problem. However, in the original template, the space occupied by the footer on the first page is added to the text area on the following pages. So I need something like includefoot=true inside the geometry definition of the first page and includefoot=false on all following pages.

I hope the following pictures explain what I want to achieve. The current state: on the left, the first page has the footer. On the right, the second page has all the white space where the empty footer is.

enter image description here
enter image description here

I want to add the footer space for every page from page 2 to the end as shown on the right:

enter image description here
enter image description here

Unfortunately, I only achieve the desired result for page 2 and forward for includefoot=false which messes up the footer on the first page. I tried to use newgeometry after my title section, but as explained in this thread this works on full pages and my first section is moved to the second page. I do not want that.

Is there a possibility to switch geometry definitions without jumping to a new page or anything else that solves my problem?


MWE

\documentclass[listof=totoc,bibliography=totoc,parskip=half-,11pt]{scrartcl}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ---------------------------
% Packages
% ---------------------------

\usepackage{anyfontsize}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{coffee4}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage[autooneside]{scrlayer-scrpage}

% Page geometry
\geometry{
  left=25mm,
  right=20mm,
  top=25mm,
  bottom=12mm,
  includefoot=true,
  headsep = \dimexpr2\baselineskip\relax,
  footskip = \dimexpr1\baselineskip+1.5mm\relax,
}

% ---------------------------
% Template adjustments
% ---------------------------

% Title
\makeatletter
\def\@maketitle{%
  \newpage
  % Zweck
  \begingroup%
    \normalsize%
    \bfseries%
    Test
    \par
  \endgroup%
  % Abstand
  \vskip 2\baselineskip
  % Authors
  \begingroup%
    \normalsize%
    \bfseries%
    \begin{tabularx}{\linewidth}{@{}X}%
      \@author
    \end{tabularx}
    \par
  \endgroup%
  % Abstand
  \vskip 1\baselineskip
  % Title
  \begingroup%
    \normalsize
    \bfseries
    \@title%
    \par%
  \endgroup%
  % Abstand
  \vskip 1\baselineskip
  \rule{\textwidth}{0.4pt}%
  %\vskip 1.5em%
  \vskip 1\baselineskip
  % Beschreibung des Vorhabens
  \begingroup%
    \normalsize
    \bfseries
    Schalala
    \par%
  \endgroup%
  \vskip 2\baselineskip
}
\makeatother

% Font sizes
\setkomafont{section}{\normalsize\bfseries}
\setkomafont{subsection}{\normalsize\bfseries}
\setkomafont{subsubsection}{\normalsize\bfseries}
\setkomafont{paragraph}{\normalsize\bfseries}
\setkomafont{subparagraph}{\normalsize\bfseries}

% ---------------------------
% Header/Footer commands
% ---------------------------

% Clear old  headers/footers
\clearpairofpagestyles

% Fonts for headers/footers
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagehead}{\sffamily}
\setkomafont{pagination}{}

% Trennlinien fuer Kopf und Fuss
\KOMAoptions{
  headsepline = false,
  footsepline = false,
  plainfootsepline = false,
}

% Create new header for title page
\newpairofpagestyles{firstpage}{%
  \ihead{Inner head}
  \ohead{Outer head}
  \ifoot{
    \begin{tabular}[t]{@{}l}
    \textbf{An organization}\\
    With an address\\
    and communication channels
    \end{tabular}
  }
  \cfoot{Footer on 1\textsuperscript{st} page only}
  \ofoot{\fontsize{37}{44}\selectfont XYZ}
}
% Page Layout for normal pages
\newpairofpagestyles{normalpage}{%
  \ihead{Inner head}
  \ohead{Outer head}
  \ifoot{}
  \ofoot{}
}

% Abstaende
\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{section}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subsection}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subsubsection}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{paragraph}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subparagraph}

% 
\setlength{\parskip}{0cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title and author                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Title}
\author{Author}
\date{\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\maketitle
\thispagestyle{firstpage}
\pagestyle{normalpage}

\section{First section}

\subsection{Subsection 1}

\Blindtext[2]

\subsection{Subsection 2}

\Blindtext[6]

\section{Second section}

\cofeAm{1}{0.85}{0}{0.25\textwidth}{-0.25\textheight} % needs \usepackage{coffee4}
\Blindtext[9]
\cofeDm{0.5}{0.2}{0}{-0.35\textwidth}{-0.4\textheight} % needs \usepackage{coffee4}

\end{document}

Update

using the approach proposed by @UlrikeFischer:

\documentclass[listof=totoc,bibliography=totoc,parskip=half-,11pt]{scrartcl}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ---------------------------
% Packages
% ---------------------------

\usepackage{anyfontsize}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{coffee4}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage[autooneside]{scrlayer-scrpage}

% Page geometry
\geometry{
  left=25mm,
  right=20mm,
  top=25mm,
  %bottom=20mm,
  %includefoot=true,
  bottom=12mm,
  includefoot=false,
  headsep = \dimexpr2\baselineskip\relax,
  footskip = \dimexpr1\baselineskip+1.5mm\relax,
}

% ---------------------------
% Template adjustments
% ---------------------------

% Title
\makeatletter
\def\@maketitle{%
  \newpage
  % Zweck
  \begingroup%
    \normalsize%
    \bfseries%
    Test
    \par
  \endgroup%
  % Abstand
  \vskip 2\baselineskip
  % Authors
  \begingroup%
    \normalsize%
    \bfseries%
    \begin{tabularx}{\linewidth}{@{}X}%
      \@author
    \end{tabularx}
    \par
  \endgroup%
  % Abstand
  \vskip 1\baselineskip
  % Title
  \begingroup%
    \normalsize
    \bfseries
    \@title%
    \par%
  \endgroup%
  % Abstand
  \vskip 1\baselineskip
  \rule{\textwidth}{0.4pt}%
  %\vskip 1.5em%
  \vskip 1\baselineskip
  % Beschreibung des Vorhabens
  \begingroup%
    \normalsize
    \bfseries
    Schalala
    \par%
  \endgroup%
  \vskip 2\baselineskip
}
\makeatother

% Font sizes
\setkomafont{section}{\normalsize\bfseries}
\setkomafont{subsection}{\normalsize\bfseries}
\setkomafont{subsubsection}{\normalsize\bfseries}
\setkomafont{paragraph}{\normalsize\bfseries}
\setkomafont{subparagraph}{\normalsize\bfseries}

% ---------------------------
% Header/Footer commands
% ---------------------------

% Clear old  headers/footers
\clearpairofpagestyles

% Fonts for headers/footers
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagehead}{\sffamily}
\setkomafont{pagination}{}

% Trennlinien fuer Kopf und Fuss
\KOMAoptions{
  headsepline = false,
  footsepline = false,
  plainfootsepline = false,
}

% Create new header for title page
\newpairofpagestyles{firstpage}{%
  \ihead{Inner head}
  \ohead{Outer head}
  \ifoot{
    \raisebox{1cm}[0pt][0pt]{%
      \begin{tabular}[t]{@{}l}
      \textbf{An organization}\\
      With an address\\
      and communication channels
      \end{tabular}
    }
  }
  \cfoot{
    \raisebox{1cm}[0pt][0pt]{%
      Footer on 1\textsuperscript{st} page only
    }
  }
  \ofoot{
    \raisebox{1cm}[0pt][0pt]{%
      {\fontsize{37}{44}\selectfont XYZ}
      %\normalsize
    }
  }
}
% Page Layout for normal pages
\newpairofpagestyles{normalpage}{%
  \ihead{Inner head}
  \ohead{Outer head}
  \ifoot{}
  \ofoot{}
}

% Abstaende
\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{section}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subsection}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subsubsection}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{paragraph}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subparagraph}

% 
\setlength{\parskip}{0cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title and author                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Title}
\author{Author}
\date{\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\maketitle
\enlargethispage{-1cm}
\thispagestyle{firstpage}
\pagestyle{normalpage}

\section{First section}

\subsection{Subsection 1}

\Blindtext[2]

\subsection{Subsection 2}

\Blindtext[6]

\section{Second section}

\Blindtext[9]

\end{document}

enter image description here

What happens with the \ofoot?

Best Answer

Based on your update you simple need to change your command \raisebox{1cm}[0pt][0pt] in command \ofoot to for example \raisebox{0cm}[0pt][0pt]. Please see that I changed the first parameter 1cm to 0cm.

With the complete MWE

\documentclass[%
  listof=totoc,
  bibliography=totoc,
  parskip=half-,
  11pt
]{scrartcl}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ---------------------------
% Packages
% ---------------------------

\usepackage{anyfontsize}
\usepackage[english]{babel}
\usepackage{blindtext}
%\usepackage{coffee4}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage[autooneside]{scrlayer-scrpage}

% Page geometry
\geometry{
  left=25mm,
  right=20mm,
  top=25mm,
  bottom=12mm,
  includefoot=false,
  headsep = \dimexpr2\baselineskip\relax,
  footskip = \dimexpr1\baselineskip+1.5mm\relax,
}

% ---------------------------
% Template adjustments
% ---------------------------

% Title
\makeatletter
\def\@maketitle{%
  \newpage
  % Zweck
  \begingroup%
    \normalsize%
    \bfseries%
    Test
    \par
  \endgroup%
  % Abstand
  \vskip 2\baselineskip
  % Authors
  \begingroup%
    \normalsize%
    \bfseries%
    \begin{tabularx}{\linewidth}{@{}X}%
      \@author
    \end{tabularx}
    \par
  \endgroup%
  % Abstand
  \vskip 1\baselineskip
  % Title
  \begingroup%
    \normalsize
    \bfseries
    \@title%
    \par%
  \endgroup%
  % Abstand
  \vskip 1\baselineskip
  \rule{\textwidth}{0.4pt}%
  %\vskip 1.5em%
  \vskip 1\baselineskip
  % Beschreibung des Vorhabens
  \begingroup%
    \normalsize
    \bfseries
    Schalala
    \par%
  \endgroup%
  \vskip 2\baselineskip
}
\makeatother

% Font sizes
\setkomafont{section}{\normalsize\bfseries}
\setkomafont{subsection}{\normalsize\bfseries}
\setkomafont{subsubsection}{\normalsize\bfseries}
\setkomafont{paragraph}{\normalsize\bfseries}
\setkomafont{subparagraph}{\normalsize\bfseries}

% ---------------------------
% Header/Footer commands
% ---------------------------

% Clear old  headers/footers
\clearpairofpagestyles

% Fonts for headers/footers
\setkomafont{pageheadfoot}{\sffamily\footnotesize}
\setkomafont{pagehead}{\sffamily}
\setkomafont{pagination}{}

% Trennlinien fuer Kopf und Fuss
\KOMAoptions{
  headsepline = false,
  footsepline = false,
  plainfootsepline = false,
}

% Create new header for title page
\newpairofpagestyles{firstpage}{%
  \ihead{Inner head}
  \ohead{Outer head}
  \ifoot{
    \raisebox{1cm}[0pt][0pt]{%
      \begin{tabular}[t]{@{}l}
      \textbf{An organization}\\
      With an address\\
      and communication channels
      \end{tabular}
    }
  }
  \cfoot{
    \raisebox{1cm}[0pt][0pt]{%
      Footer on 1\textsuperscript{st} page only
    }
  }
  \ofoot{
    \raisebox{0cm}[0pt][0pt]{%  <=======================================
      {\fontsize{37}{44}\selectfont XYZ}
      %\normalsize
    }
  }
}
% Page Layout for normal pages
\newpairofpagestyles{normalpage}{%
  \ihead{Inner head}
  \ohead{Outer head}
  \ifoot{}
  \ofoot{}
}

% Abstaende
\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{section}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subsection}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subsubsection}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{paragraph}

\RedeclareSectionCommand[
  beforeskip=1\baselineskip,
  afterskip=1\baselineskip
]{subparagraph}

% 
\setlength{\parskip}{0cm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title and author                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Title}
\author{Author}
\date{\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\maketitle
\enlargethispage{-1cm}
\thispagestyle{firstpage}
\pagestyle{normalpage}

\section{First section}

\subsection{Subsection 1}

\Blindtext[2]

\subsection{Subsection 2}

\Blindtext[6]

\section{Second section}

\Blindtext[9]

\end{document}

you will get the wished result:

enter image description here