The document uses scrlayer-scrpage to create a footer with (originally) a logo, and two lines of inner and outer footer text.
This works fine unless there is a longtable that continues on the next page. If that happens, the text of the footer on the page with the first part of the table is placed too low. On the page after, the line spacing of the outer foot (right side) is decreased.
EDIT: it happens even on non-broken longtables, and even if setting footlines=2 or more.
The MWE is a little long because I needed to fill the longtables.
\documentclass[11pt,a4paper,parskip=half,DIV=15]{scrartcl}
\usepackage{xltxtra,fontspec,xunicode}
\usepackage[T1]{fontenc}
\usepackage{tabularx,booktabs,longtable}
% Load T1-fontenc (after loading ngerman) for hyphenation of words containing umlaut
\usepackage[ngerman]{babel}
%----------------------------------------------------
% Graphics and Hyperlinks
%----------------------------------------------------
%% use xetex version of hyperref
\usepackage[xetex,unicode,colorlinks,%
plainpages=false,hyperindex=true,pdfpagelabels,bookmarks=true,%
bookmarksopen=true,bookmarksopenlevel=1,%
bookmarksnumbered=true,pdfstartview=]{hyperref}
%anchorcolor=darkgreen,urlcolor=darkgreen,%
%\fi
% Kopfzeilen / Fußzeilen
\usepackage[headsepline,plainheadsepline]{scrlayer-scrpage}
\ModifyLayer[addvoffset=2pt]{scrheadings.head.below.line}
\ModifyLayer[addvoffset=2pt]{plain.scrheadings.head.below.line}
\clearpairofpagestyles
\setkomafont{pagehead}{\normalfont\scriptsize}
\setkomafont{pagefoot}{\normalfont\scriptsize}
\addtokomafont{pagenumber}{\bfseries}
\renewcommand{\rightmark}{%
1st line\\2nd line\\}
\ohead*{\leftmark \qquad{} \pagemark}
\ifoot*{
\bgroup%
\setlength\tabcolsep{0pt}
\begin{tabular}{p{2cm}p{2cm}}
\vspace{0pt}
\rule{4.5\baselineskip}{2\baselineskip}
&
\vspace{0pt}
{\raggedright One line\\another}
\\
\end{tabular}
\egroup
}
\ofoot*{
% need the tabular to top align ifoot and ofoot
\begin{tabular}{r}
\rightmark
\end{tabular}
}
\pagestyle{scrheadings}
\newcolumntype{Z}[1]{>{\centering\arraybackslash}p{#1}} % used in contract
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{regular page}
This page has the correct footer.
\newpage
\renewcommand{\arraystretch}{0.5}
\section{page with tables}
With the first part of a longtable that continues on the next page, the text in the footer is set too low. Also, on the next page, the ofoot (right side) will still have decreased line spacing.
\begin{longtable}[h]{@{}L{0.3\linewidth}L{0.2\linewidth}Z{0.11\linewidth}L{0.3\linewidth}@{}}
\multicolumn{4}{@{}l}{\bfseries table 1}\\
\toprule
\\\addlinespace
{\bfseries Col1} & {\bfseries Col2} & {\bfseries Col3} & {\bfseries Col4} \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\bottomrule
\end{longtable}
\begin{longtable}[h]{@{}L{0.3\linewidth}L{0.2\linewidth}Z{0.11\linewidth}L{0.3\linewidth}@{}}
\multicolumn{4}{@{}l}{\bfseries table 2}\\
\toprule
\\\addlinespace
{\bfseries Col1} & {\bfseries Col2} & {\bfseries Col3} & {\bfseries Col4} \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\bottomrule
\end{longtable}
\begin{longtable}[h]{@{}L{0.3\linewidth}L{0.2\linewidth}Z{0.11\linewidth}L{0.3\linewidth}@{}}
\multicolumn{4}{@{}l}{\bfseries table 3}\\
\toprule
\\\addlinespace
{\bfseries Col1} & {\bfseries Col2} & {\bfseries Col3} & {\bfseries Col4} \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\cmidrule(r){1-1} \cmidrule(l){2-4}
cell 1 & cell 2 & 1 & comment \\
\bottomrule
\end{longtable}
\end{document}
I've also tried to use supertabular
directly but the longer table was not broken but instead pushed to the next page, and I did not follow up on that solution. (In my actual document, I'm loading supertabular to modify the table headers and footers.)
Note: XeTeX is required because custom fonts are loaded in the actual document.