0

I have a document with a large list of tables that should appear, in order, in an appendix before the bibliography/references. Initially I had a problem with tables appearing all over the place in my document, in the middle of previous sections, in the middle of the bibliography, etc. I solved this by using \FloatBarrier before my bibliography and by using [ht] on each of my tables. This is fine when I only have a couple tables:

\documentclass{article}

\usepackage{tikz}
\usepackage{blindtext}
\usepackage{placeins}

\newcommand{\testtable}{\begin{table}[ht]
    \tiny
    \caption {PSNR Comparison}
    \centering
    \resizebox{\textwidth}{!}{%
    \begin{tabular}{cc|cc|cc|cc|cc|cc}
        \hline \hline
        \multicolumn{2}{c|}{A} &
        \multicolumn{2}{c|}{B} &
        \multicolumn{2}{c|}{C} &
        \multicolumn{2}{c|}{D} &
        \multicolumn{2}{c|}{E} &
        \multicolumn{2}{c}{F} \\
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} \\
        \hline \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\
        \hline \hline
    \end{tabular}}
\end{table}}

\begin{document}

\thispagestyle{empty}

\section*{Introduction}
\blindtext

\section*{Appendix A}
\blindtext

\section*{Appendix B}
\testtable
\testtable

\FloatBarrier
\section*{References}
\blindtext

\end{document}

enter image description here

However, when I add more tables than can fit on a page, suddenly the bibliography ends up on its own page when it could easily fit on the previous page (add five more \testtables to see this):

enter image description here

How do I get the references to appear on the third page after the last table?

1
  • by using [ht] you are restricting the places the float can go so making it more likely that it can not be positioned so will drift to the end of the docuemnt. \FloafBarrier either does nothing (if there are no pending floats) or does \clearpage (if there are) so it always forces a new page if it does anything at all. Nov 3 '15 at 18:24
3

Since your appendix is just a list of tables, you don't really want them to float at all, simplest way to change them to being non-floats is to use H from the float package, (which is often over-used but works OK here)

enter image description here

\documentclass{article}

\usepackage{tikz}
\usepackage{blindtext}
\usepackage{float}

\newcommand{\testtable}{\begin{table}[H]
    \tiny
    \caption {PSNR Comparison}
    \centering
    \resizebox{\textwidth}{!}{%
    \begin{tabular}{cc|cc|cc|cc|cc|cc}
        \hline \hline
        \multicolumn{2}{c|}{A} &
        \multicolumn{2}{c|}{B} &
        \multicolumn{2}{c|}{C} &
        \multicolumn{2}{c|}{D} &
        \multicolumn{2}{c|}{E} &
        \multicolumn{2}{c}{F} \\
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} &
        \textit{Rate} & \textit{PSNR} \\
        \hline \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\ \hline
        x & x & x & x & x & x & x & x & x & x & x & x \\
        \hline \hline
    \end{tabular}}
\end{table}}

\begin{document}

\thispagestyle{empty}

\section*{Introduction}
\blindtext

\section*{Appendix A}
\blindtext

\section*{Appendix B}
\testtable
\testtable
\testtable
\testtable
\testtable
\testtable
\testtable


\section*{References}
\blindtext

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.