I have a weird problem with the longtable environment.
Once the table finishes near the end of the page, it forces the generation of a new blank page which is left totally empty.
Here's the MWE:
\documentclass[11pt,oneside]{book}
\usepackage{longtable}
\usepackage{lipsum}
\begin{document}
\chapter*{First chapter}
\begin{center}
\scriptsize
\begin{longtable}{|c|c|c|}
\hline \multicolumn{1}{|c|}{First} & \multicolumn{1}{c|}{Second} & \multicolumn{1}{c|}{Third}
\\ \hline \hline
\endhead
\endlastfoot
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
One & Two & Three \\
\hline
\caption*{Wonderful caption} \\
\end{longtable}
\end{center}
\chapter*{Second chapter}
\lipsum
\end{document}
Here's the screenshot of the output produced:
Any idea on why this is happening?
I must use the longtable package because the table is dinamically generated, thus its length is variable and can span over multiple pages.