Big blank space after header when using itmize in 2 pages in Latex

1.1k Views Asked by At

I'm trying to make a document in latex using a table as a header, but everytime I use an itemize or enumerate longer than 1 page, the 2nd page has a big blank space between the header and the listing.

Can you help me identifying the problem? Any comments would be appreciated.

PS I found it really difficult to make tables in latex, so I used a table latex generator.

\documentclass{article} 
\usepackage[utf8]{inputenc}  
\usepackage{graphicx}  
\usepackage{fancyhdr}  
\usepackage{vmargin}  
\usepackage{siunitx}  
\usepackage{subcaption}  
\usepackage{caption}  
\usepackage{multirow}   
\usepackage{fancyhdr}  
\usepackage{lastpage}  

\usepackage{blindtext}  


\setlength{\parindent}{1cm}  


\setmarginsrb{2.5 cm}{1.5 cm}{2.5 cm}{2.5 cm}{3.6cm}{0.0 cm}{1 cm}{1.5 cm}

\pagestyle{fancy}  
%\renewcommand{\headrulewidth}{0pt}  
\fancyhead{} %% clear out all headers  
\fancyhead[C]{%  
\resizebox{\textwidth}{!}{%  
\begin{tabular}{lllll}  
\cline{1-4}  
\multicolumn{1}{|c|}{\multirow{2}{*}{{\includegraphics[width = 2cm,height=0.8cm]{example-image-duck}}} &   \multicolumn{2}{c|}{Name of document}                                   & \multicolumn{1}  {c|}{\multirow{2}{*}{Thingies}} &  \\ \cline{2-3}  
\multicolumn{1}{|c|}{}                      & \multicolumn{1}{c|}{Code of document} &   \multicolumn{1}{c|}{Pag 1 of 2} & \multicolumn{1}{c|}{}                          &  \\ \cline{1-4}  
                                            &                                       &                                   &                                                &  \\  
                                            &                                       &                                   &                                                &   
\end{tabular}%  
}  
}  

%----------------------------------------------------------------  
\begin{document}  
\begin{titlepage}  
\pagenumbering{gobble}  
%Titel Page  
\end{titlepage}
\pagenumbering{arabic}



\section{Section1}
   \blindtext

\section{Section2}
    \blindtext 
\section{Enumerate}
    \begin{enumerate}  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
    \end{enumerate}/
\end{document}

Big blank space after header when listing continues in a new page.

Blank space in header using example image

1

There are 1 best solutions below

2
On

Most of the additional space comes from the two extra rows at the bottom of the table. There is also an additional column with can be removed as well together with all the unnecessary multicolumns this dreadful table generator inserted.

\documentclass{article} 
\usepackage[utf8]{inputenc}  
\usepackage{graphicx}  
\usepackage{fancyhdr}  
\usepackage{vmargin}  
\usepackage{siunitx}  
\usepackage{subcaption}  
\usepackage{caption}  
\usepackage{multirow}   
\usepackage{fancyhdr}  
\usepackage{lastpage}  

\usepackage{blindtext}  


\setlength{\parindent}{1cm}  


\setmarginsrb{2.5 cm}{1.5 cm}{2.5 cm}{2.5 cm}{3.6cm}{0.0 cm}{1 cm}{1.5 cm}

\pagestyle{fancy}  
%\renewcommand{\headrulewidth}{0pt}  
\fancyhead{} %% clear out all headers  
\fancyhead[C]{%  
\resizebox{\textwidth}{!}{%  
\begin{tabular}{|l|l|l|l|}  
\hline
\multirow{2}{*}{\includegraphics[width = 2cm,height=0.8cm]{example-image-duck}} & \multicolumn{2}{c|}{Name of document} & \multirow{2}{*}{Thingies} \\
\cline{2-3}  
& Code of document & Pag 1 of 2 & \\
\hline   
\end{tabular}%  
}  
}  
\renewcommand{\headrulewidth}{0pt}

%----------------------------------------------------------------  
\begin{document}  
\begin{titlepage}  
\pagenumbering{gobble}  
%Titel Page  
\end{titlepage}
\pagenumbering{arabic}



\section{Section1}
   \blindtext

\section{Section2}
    \blindtext 
\section{Enumerate}
    \begin{enumerate}  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph  
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
        \item Short paragraph
    \end{enumerate}
\end{document}

enter image description here