I have a very large tabular which I want placed at the end of my chapter. I need it inside a float because I want a caption. I could simply put the code at the end of the chapter and use [h] or even [h!] placement modifier. But I'd prefer to keep the code at a different location in the text. I do not want to use a package like endfloat since this is the only float I wish to stick at the end of a chapter.

  • a) captions are possible outside floats; see the capt-of package and its \captionof{<type>}{<caption text>} command. b) Is there a special reason why you don't want to use positioning arguments? – lockstep Aug 9 '12 at 17:03
  • Try \floatpagefraction=0 -- I don't know exactly. – Marco Daniel Aug 9 '12 at 17:10
  • Should the table appear on its own page? – Gonzalo Medina Aug 9 '12 at 17:26
  • @GonzaloMedina Yes. Although, it is already big enough to do so. lockstep: Thanks for the tip. There is no real reason. It just makes sense for the table to occur at one point in the source, but at the end of the chapter in the typeset document. MarcoDaniel: The problem with solutions like these is that they apply to ALL floats. I only wish to change the placement of a single float. – Dan Aug 9 '12 at 17:36
  • And if you simply use [p] as the placement specifier, asin \begin{table}[p]...\end{table}? – Gonzalo Medina Aug 9 '12 at 17:43

The following setup delays the placement of a single float to the end of a chapter. The environ package allows to capture the contents of an environment into a macro (see How can one pass the contents of a LaTeX environment to a macro?). Making sure that any banked/stored float is flushed \AtEndDocument.

enter image description here

\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{environ}% http://ctan.org/pkg/environ
\chapter{A chapter}
  \centering\rule{.8\textwidth}{.2\textwidth}\caption{A figure}
  \centering\rule{.8\textwidth}{.2\textwidth}\caption{Another figure}
\chapter{Another chapter}

The final figure positioning can be changed inside the \chapendfigure macro (defined inside the chapendfig environment. Even though the above example delays a figure, it can be used for table (or any other float) as well.


In the body of your chapter, put the tabular in a \savebox

a & b \\
c & d \\

Use the saved box at the end of the chapter in a table environment

\caption{a table}\label{t:abc}

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.