I would like to put most of the figures and tables together (in the same page) at the end, while leave one of them in the text where it is referred.

Now, I use



The second is to block the separator after each figure.

It works well except it will put figures and tables in separate pages. The requirement is a maximum of two pages of attached figures and tables.

And I still have the problem of how to leave one of the figure in the text.

  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – henrique
    Oct 15 '13 at 3:05

This is all easily possibly using the caption package. Insert the figure you're referencing in your document in the usual way, and add all the remaining figures/tables inside a single float (or two, if need be).

enter image description here

\usepackage{caption,lipsum}% http://ctan.org/pkg/{caption,lipsum}

\section{A section}

  \caption{This is a figure referenced in the document}


  \captionof{table}{This is a table}
  \captionof{table}{This is a table}
  \captionof{figure}{This is a figure}
  \captionof{figure}{This is a figure}
  \captionof{table}{This is a table}


caption's \captionof{<float>}{<caption>} allows you to specify the caption of <float> even if you're in a different floating environment. In my MWE, I've mixed the captions of figure and table inside a single figure floating environment.

  • Will this approach preserve the natural ordering of the floats by call-out? E.g., will a figure that comes logically before the lone in-text figure environment but ends up being placed at the end of the document still be assigned a number that's smaller than that of the in-text figure?
    – Mico
    Oct 15 '13 at 5:21
  • @Mico: No, but I didn't get that much from the OP. It seemed like the only figure being referenced is the one that should stay within the document.
    – Werner
    Oct 15 '13 at 5:30
  • I guess we don't know from the posting if (and how) the OP wants to cross-reference the floats.
    – Mico
    Oct 15 '13 at 5:37

You could do the following:

  • Continue to load the endfloat package, but change its parameter \efloatseparator from \clearpage (the default value) to \bigskip:


    If that generates too much vertical whitespace for your taste, try \medskip or \smallskip. (I wouldn't suppress the inter-float whitespace entirely.)

    To also suppress the \clearpage that's inserted between the end-figures and end-tables, try this (to be inserted in the preamble, after the endfloat package is loaded):

  • For the lone figure that's not supposed to go to the back of the document, don't use an explicit figure environment. Instead, be sure to load the caption package, place the graph in the text where it's supposed to go, and issue the command

    \captionof{figure}{<Caption of figure here>}

    either immediately before or after the code that loads the graph.

    If you need to have the lone in-text figure automatically placed at the top of a page, you could load the afterpage package and do something like

    \afterpage{ <code that loads the figure> <\captionof code>}
  • By default, LaTeX will not allow a lot of floats to be placed on one page. To override the default setting, it may be necessary to issue the commands


    Of course, if you have more than 10 floats per page, adjust the code above to suit your needs.

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.