Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have written a document that includes many tables, so I have chosen to place all tables at the end of the document, invoked via the [p] option in the table environment. I now have to include a long table via the longtable environment, and am wondering if there is an equivalent form of the [p] option here (or at least some workaround).

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The p option does not put the tables at the end of the document. It puts the floating object on floating pages without text. Each \clearpage can force the pages to be output before end of document, for instance.

You can use package endfloat to move the tables to the end of the document. Even longtable environments can be put there, if they are declared as tables for endfloat. Example follows. See the package documentation for more options.

\documentclass{article}
\usepackage{longtable}
\usepackage[
  tablesonly,
  notablist,
  nomarkers,
]{endfloat}
\DeclareDelayedFloatFlavor{longtable}{table}

\begin{document}
\section{First section}
\begin{table}
  \caption{First table}
\end{table}
\begin{longtable}{l}
  \caption{Long table}\\
  a\\
  b\\
\end{longtable}
\begin{table}
  \caption{Last table}
\end{table}
\section{Last section}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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