[Tex/LaTex] 19 simple tables giving “TeX capacity exceeded” / “Too many unprocessed floats”

floats

When I added a couple of rather unremarkable tables to my document, it stopped compiling (using pdflatex):

"TeX capacity exceeded (main memory)"

I searched the web a bit (well, actually, mostly tex.SE), and found mention that using lualatex should avoid memory issues. So I tried running the code with lualatex, and got

"Too many unprocessed floats"

So, I tried to come up with a minimal working example, and was surprised to find that this little bit of code was sufficient to trigger the problem:

\documentclass{scrbook}

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}

\begin{document}

\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}
\begin{table*}\begin{tabular}{|c|}Foo\\\end{tabular}\end{table*}

\end{document}

Apparently, I am missing something essential here, as 19 "simple" tables shouldn't be bringing LaTeX down…?!?

Best Answer

You can use the command \clearpage. This prints all floats that are not yet placed and starts a new page.